Skip to content
LogoLogo

Runs

Threads, runs, and steps organize execution history from persistent context down to individual operations.

Execution hierarchy

ConceptMeaning
ThreadPersistent execution context and logical history
RunOne execution with inputs, a result, and status
StepOne 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

LimitMeasuresScope
agic_model_callsModel callsEach agic invocation
agic_tool_callsTool callsEach agic invocation
tokensInput plus output tokensRun tree
costUSD model costRun tree
timeElapsed secondsRun 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.

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.