Runs
Threads, runs, and steps organize execution history from persistent context down to individual operations.
Execution hierarchy
| Concept | Meaning |
|---|---|
| Thread | Persistent execution context and logical history |
| Run | One execution with inputs, a result, and status |
| Step | One recorded model call, tool call, or flow operation |
Calls and lifetimes
A request starts a root run. Nested calls create child runs in the same thread, forming a run tree. Each run records its inputs, status, and result or error. Delegation and handoffs determine whether work belongs to that tree, replaces the current runnable, or starts an independent root.
Canceling a run stops its owned work; it does not undo completed external effects. A runtime can host multiple threads, so canceling one run and stopping the entire agent are different operations.
History and context
Recall selects earlier context: far is the summary; near is recent
messages. Root agics prepend selected history; child agics reference it explicitly.
Compaction summarizes older model context while preserving stored records.
Fork starts a thread from selected history. Rewind changes visible history without deleting run records. Rewind excludes the selected anchor run and its visible successors; fork includes its selected anchor in the new thread's history. Neither operation reverses file changes, sent messages, or chore progress.
Run limits
Limit scope
| Limit | Measures | Scope |
|---|---|---|
agic_model_calls | Model calls | Each agic invocation |
agic_tool_calls | Tool calls | Each agic invocation |
tokens | Input plus output tokens | Run tree |
cost | USD model cost | Run tree |
time | Elapsed seconds | Run tree |
Call counters reset per agic invocation. Token, cost, and time budgets are shared within the tree; a spawned root starts a fresh budget.
Enforcement
Call limits are checked before invocation. Token and cost limits are checked after completed model calls, so the last call can exceed the budget. Cost uses reported or estimated USD amounts; unknown costs do not count.
Related controls
Set defaults under [limit] or use --limit for one invocation.
Resource selection stays within inherited permissions; model max_output
controls a single response rather than the whole run budget. See
Configuration for values and defaults.
See Chat and Inspect and control runs.