Runtime and context construction
This technical reference was reconciled statically with current implementation on 8 November 2026. Explicit historical examples, screenshots and pinned public links remain historical; they are not evidence of current runtime acceptance. Start with the current operator guide for installation and check your installed build before using newer capabilities.
A normal chat turn is coordinated by runAskChat. Its contract requires a root, a message, and composed PostgreSQL application stores. Transport adapters supply trusted agent context separately from serialized request arguments.
Turn lifecycle
The source order includes support preparation before early user-turn persistence, then final prompt assembly and execution. Recording the originating instruction before model/tool work makes interrupted work attributable. Peer delivery already persisted its attributed ingress and is not duplicated as an operator message.
Session ownership and stale results
A per-session in-process queue prevents simultaneous operator turns and nested replies from invalidating each other within one process. PostgreSQL continuity heads and transactional ownership checks protect cross-process completion.
The runtime checks ownership before starting model work and again afterward. Terminal finalization runs through a continuity commit. If ownership changed, the result is superseded, the stale answer is not published as current, and a compact recovery manifest records the need to reconcile durable state. This guards terminal persistence; it cannot undo a tool's already-completed external effect.
In public release 2026.10.19, continuity_state owns the head, interruption manifest, and recovery queue; continuity_log records changed snapshots. Indexed state columns support active/pending recovery selection. Session-list compatibility can still expose a joined head, but ordinary session metadata is no longer the storage authority for those records. See Persistence recovery and Storage schema.
Newer development cancellation and reset handling
The inspected development build 2026.10.21.2 reports aborted but still registered runs as cancelling, closes steering for them, and introduces reset admission generations. Queued work from a superseded generation fails before execution; new work waits behind the reset barrier. A cancellation deadline releases admission only after durable fencing succeeds. These changes are newer than public 2026.10.19 and do not undo external effects already performed.
Context preparation is a first-class boundary
ContextBuilder consumes a versioned prepared envelope. Normal preparation reads canonical conversation state, considers compression, and verifies that selected history is covered rather than silently dropping uncovered turns. It can rebuild after compression before assembling the final provider request.
Important failure categories include uncovered history, unavailable compression, and an assembled prompt that remains over budget. Exact behavior of exceptional branches and the estimate's limits are tracked in Known limitations.
Provider-ready order
Before provider-specific serialization, the assembled message projection separates:
- Identity/profile system material
- Stable operating instructions
- Prior conversation summary and recent role-preserving dialogue
- Fresh runtime/support context on its separate developer channel, with provenance
- Current shared mod guidance
- The current user instruction and current attachments, or runtime-owned developer recovery context for a claimed restart recovery turn
This is different from the flattened diagnostic prompt and from the broad section names in the runtime contract. Prior summaries are support for continuity, not replacement source evidence. Attributed peer messages preserve their origin instead of masquerading as user instructions.
Checked 21 November 2026: on the direct OpenAI OAuth/ChatGPT backend Responses path, the adapter moves only the tagged fresh runtime-support developer item immediately after the intact current user item on the wire. Shared mod guidance stays before the user item. Historical context and source roles do not change, and an untagged transcript or a recovery turn with no current user item does not trigger this reorder. Public OpenAI and compatible proxy Responses paths retain the assembled order. See provider caching.
Budgets and current-message integrity
The current message is atomic. Context handling may reduce older dialogue and lower-priority support, but does not silently cut the current instruction to an arbitrary character limit. Profiles, skills, attachments, summaries, and evidence projections have their own bounds.
The final request is inspected against configured model capacity. The estimate is not an exact tokenizer and does not account equally for every transport field. Treat it as a pressure signal; see Models.
Mod-owned native context
A mod-owned native agent uses the owning mod's live per-turn context provider, rather than the ordinary Core profile/engineering context path. The provider receives the logical conversation session ID even when execution uses an isolated internal session. Its profileFiles become identity/system material; its context records become current support material. mod://<owner>/agent/profile/... and mod://<owner>/agent/context/... are provenance labels, not editable filesystem paths.
The runtime does not preload ordinary global profile/rules, engineering working continuity, Dream context or host metadata into this path. Current mod context supersedes earlier support snapshots retained as history. The provider result is snapshotted for prompt-pressure rebuilds; normal conversation continuity, compression and whole-request budget checks still apply. An unavailable, replaced or invalid owner provider blocks the dependent turn instead of falling back to ordinary agent context.
The native mod_agent_tool bridge exposes only the owning mod's currently published tools. Other supported capabilities must be explicitly enabled; this path does not implicitly grant engineering, shell, file, git, task or minion tools. Ordinary non-mod agents retain their existing context path. See extension contracts.
Shared guidance from enabled mods
Enabled mods can separately contribute current guidance to ordinary native agents and mod-owned residents, including A2A recipients. This is independent of the owning profile provider. Core renders it as a developer message, labels its mod provenance, and retains the captured contribution during prompt-pressure rebuilds. It never grants ownership/tools or replaces the agent's identity. Disabled, unloaded or replaced contributions do not carry into fresh turns; malformed or failed active providers block with mod_agent_unavailable. Historical shared snapshots are not current instructions.
Side questions resolve shared guidance separately from their frozen conversation snapshot, record that resolution time, and retain the snapshot-only/no-tools boundary. See the shared provider contract.
How evidence returns to later turns
These mechanisms solve different problems:
- Execution digest: a bounded account of important tool outcomes for continuity
- Run evidence: compact objective/outcome/target records retrieved explicitly through
run_evidence_search; current pre-turn support does not automatically inject historical run proof - Read evidence: retained excerpts with source range and freshness metadata
- Raw artifacts: detailed output available for explicit inspection
Run evidence is bounded to 32 records and 14 days in its helper. Read evidence is bounded to 12 items/64 KiB and checks size/mtime before reuse; it does not revalidate a content hash. Neither mechanism grants action authority.
For the complete continuity model, read Memory and Conversation history.
Planning and compatibility
An optional configured planner can return structured intent/support information. Without that planner, fallback labels derive from explicit transport controls. Normal chat still uses a model-owned tool loop; planner metadata is not an automatic worker spawn or authorization decision.
Explicit work-item continuation takes a retained compatibility branch. The public runBurrow entrypoint is also a declared compatibility adapter around proposal, verification, and commit logic. Do not assume its gates are the normal-chat execution path.
Bounded live model recovery
The current development runtime can repeat a failed model request inside the existing turn, not replay the planner, ingress or completed tools. It retains completed tool call/result pairs for the continuation. Defaults are three physical dispatch attempts per logical request and four extra attempts across the run, with cancellable waits of one then three seconds. Native signed-history repair and inner provider-pool alternates spend the same physical budget; normal successful tool rounds are not capped by that retry budget.
Observed HTTP 408/429/5xx, actual transport/read failure and parser-observed premature EOF can authorize bounded retry. Current development also retries observed generic provider_generation_failed error envelopes, including unfamiliar vendor codes, unless structured terminal evidence is present. Credential, permission, invalid-request, quota/billing, context-limit and policy/refusal fields or nontransient numeric statuses remain authoritative and nonretryable. This is a recovery policy, not proof that every unfamiliar error is transient. A normal refusal, incomplete/max-token terminal or malformed response without an observed provider error envelope is not converted into a generic retry. Arbitrary exception text is not evidence of an upstream outage. Burrow-internal or unknown failures stop for investigation; cancellation wins. Paid output-only image/audio operations are not automatically retried. Provider switching still requires the existing safe continuation boundary; a portability blocker does not replace the original upstream failure in diagnostics.
A replacement attempt abandons the previous provisional text. Clients must use modelCall to replace the active partial answer and wait for authoritative completion, not concatenate failed attempts. Recovery is neither byte-stream resumption nor exactly-once provider generation/billing; a lost response may already have incurred a charge. Run/child/task progress remains active while recovering and produces one terminal outcome. Chat API describes the event and bounded receipts.
Stop/reset signals are checked around model dispatch/settlement, persistence/finalization and before new tools. PostgreSQL work propagates cancellation to its owned query and drains/rolls back before release; session admission is not simply freed while an old owner can still commit. A durable fence is required for deadline release. Consequently, a cancelling indicator may remain while work drains; cancellation cannot undo an already completed external effect. Reset generation checks reject stale late writes.
This live-request mechanism does not add durable native-request reconstruction or automatic crash replay. Process-loss handling remains the separate reconciliation path below.
Restart recovery
Graceful interruption writes compact runtime-owned manifests, then aborts active runs. Recovery considers a bounded same-session transcript and requires a reliable objective. It chooses resume, reconcile_first, or needs_user_input. Pending recovery continuations are durably claimed before work begins.
Recovery is therefore reconciliation, not blind replay. It must inspect already-completed effects and pending verification before repeating actions.
Targeted source review
The immutable links below record earlier public evidence. Current contracts were reconciled against the 8 November implementation baseline; static inspection is not a live deployment test.
28 October development delta
Changed behavior above was checked statically against Backend a04acb16b0eab2a910c3ef0fb452622df81a05cb on 2026-10-28. This is not a live provider, database or collector test, nor a revalidation of unchanged historical sections. See source coverage.
29 October development delta
Changed contracts above were checked statically against Backend 4057b50a5d5a9b14d36bb3b70f35781c4b29a9b9 on 2026-10-29. This is not a runtime, provider or collector test, nor a revalidation of unchanged historical sections. See source coverage.
3 November development delta
The changed context and host contracts above were checked statically against Backend 32dde3266a231777ddfec6dba141d6b9972a21fd on 2026-11-03. No application, provider or database tests were run; unchanged historical sections retain their earlier qualifications. See source coverage.
5 November development delta
The changed preference, recall, embedding or shared-guidance contracts above were checked statically against Core 6465a9b200bc550697ddfc41959d671eac9abf33 on 5 November 2026. No application, database or live-provider tests were run; unchanged historical sections retain their earlier qualifications. See source coverage.
Current request replay and bounded pool waits
Checked 6 November 2026: immutable provider dispatch snapshots remain evidence of the original request. Later replay drops only runtime-provenance-tagged historical support messages and preserves original user/image content; current support is assembled once. It does not strip user text by headings or rewrite the evidence.
Pool hard eligibility failures constrain required owners as well as new turns. The five-hour headroom floor alone permits an otherwise usable required owner to finish a nonportable continuation; an existing portable continuation may retain its owner only as a last resort. Proven portable text/tool continuations can select an eligible alternate before dispatch. Anthropic replay proves the original transcript before omitting opaque thinking from only its outbound copy; account-bound images/files and missing proof remain blockers. A failed account's Retry-After does not delay a healthy alternate. If every destination is blocked, a known short availability deadline can extend the usual recovery delay up to the 30-second cap. Longer or unknown unavailability stops the live request instead of repeatedly probing. These rules retain the original provider failure and existing physical attempt budgets.
Active-run continuation compaction
Checked 7 November 2026: under configured context pressure, native Chat Completions preparation can project older assistant prose into a lossy semantic task-state recap before the next tool continuation. It preserves system/developer messages, user tasks and steering, and recent dialogue. Repeated preparation explicitly merges the prior recap with newly eligible older prose in chronological order. Persisted originals are unchanged: this is request-local projection, not durable conversation rotation.
Tool calls/results follow a separate protocol-safe budget projection, preserving paired rounds and receipt-backed recovery references. They are not semantically summarized by the recap model. Preparation tries the protocol-safe tool projection first. If the request then fits the hard input allowance, dialogue remains intact even above the soft threshold. Otherwise the async path makes at most one tool-free recap request for a fitting chronological batch, seeded with the prior recap. Remaining replies stay unchanged. An individually oversized oldest reply uses disclosed start/end excerpts rather than silently dropping its middle. This extra request adds usage and latency. Recaps are not verified execution evidence. Without a usable summary adapter or batch, no recap request is made. Adapter errors and cancellation propagate; invalid summary responses fail with continuation_summary_invalid, and irreducible requests fail with context_preparation_prompt_over_budget rather than silently dropping authoritative state.
Provider budget inspection also distinguishes shared input/output windows from separate input limits. A discovered public OpenAI total window reserves the request's output allowance; Anthropic and Google native input limits are not reduced by output twice. Image payload bytes are not treated as prose tokens. Unknown capacity stays unknown, while a known zero remaining input allowance fails closed. Loaded-skill and delegation receipts remain atomic through protocol projection rather than being clipped into misleading instruction or ownership fragments.
Runtime context and current authority
Checked 17 November 2026: fresh runtime support follows reusable dialogue and precedes the current request in assembly on a separate developer channel; it is not replayed as user/assistant conversation. Ordinary operator/chat and manual task-board inputs keep operator provenance through production context assembly. Peer, scheduled, mod/private-API and unknown ingress are not promoted to operator authority. Captured provider support excludes already replayed conversation.
Full host inventory, browser target and retained attachment listings are available on demand through runtime_context_inspect, rather than injected into every conversational message. Current uploads remain attached to the current request. The scoped tool cannot select another agent, session, host or arbitrary path. Old execution digests are not fresh dialogue. Interrupted recovery support requires an interrupted state plus pending work or current ownership; recent file references are rebuilt from bounded eligible persisted turns/receipts and clear on an explicit workspace change.
Shared mod context receives Core-resolved addressed participants and registry-owned tags. Outgoing A2A delivery can add a canonical peer for the sender's continuation after the tool batch; fresh shared guidance replaces its predecessor. Failed pre-ingress sends do not add participants. The next turn rebuilds its own addressed set. See shared guidance.
Recovery attribution and execution-root provenance
Checked 18 November 2026: a restart recovery turn requires a durable recovery claim. Its synthetic instruction and checkpoint enter the provider request as runtime-owned developer context, not a new operator message. The trigger is not appended to ordinary operator dialogue, reclassified by the planner, or used as fresh conversational residue. Checkpoint details are evidence to reconcile within the original objective, not permission for new work. This also applies when recovery resumes a native child.
A peer A2A delivery uses the recipient's configured execution assignment without recording that default as an explicit project/workspace request. Explicit structured targets still take precedence. Ambiguous older workspace hints are retired without erasing separate file evidence or changing execution settings. The workspace resolver does not inspect the filesystem, infer a project from prose, or look up project metadata.
Terminal receipt and recovery repair
Checked 19 November 2026: terminal finalization uses an exact finalization identity. A transient receipt-write failure may retry the transactional receipt, but must not re-enter the completed action callback. An abandoned finalizing owner with that identity requires receipt repair and does not auto-resume the work. If a recovery attempt itself loses its owner, Core retains the original interruption and marks that recovery lineage failed instead of creating recovery-of-recovery work. Reconcile durable effects before an explicit retry.
Scheduled tasks and mod-submitted external turns likewise retain the first known outcome while retrying its terminal receipt, rather than rerunning the task/turn or converting a successful result into a failure merely because persistence failed. Receipt recovery is not an exactly-once guarantee for external effects. A failed scope's reconciliation is isolated so independent queued/recovery work can continue.
For native OpenAI pools, a structured upstream rate-limit or unavailable response inside HTTP 2xx can now qualify for account cooldown/failover only before parsed or visible output and without a callback failure. Existing dispatch budgets and replay/ownership gates still apply; arbitrary error prose does not authorize failover.
Group-room peer delivery
When both peers are members of the current group, native A2A places the targeted request and attributed reply in the shared room, not the recipient’s ordinary peer inbox. The reply runs in an isolated room-specific lane; Core rechecks membership and detects waits that would return to a held lane. A failed partial reply can remain visible as failure evidence without becoming prompt history. Calls to nonmembers still use normal private A2A routing, subject to its checks.
An initiating operator room turn can finish using finish_group_reply after a successful published peer reply without adding an empty or duplicate assistant message. Core only offers it after a clean eligible tool batch with no pending operator steer. It is not an independent persistent tool or a terminal shortcut for private or nested recipient turns.