Review the prerequisites
Suitable for: Developers who have run the identity example.
- Session log and working context
- The session retains governed events and references; context is a lossy view built from cursors, summaries and artifact versions, not an authority grant or business fact.
- Replaceable controller
- A new worker reconstructs work from external records; disposable local memory does not make external actions repeatable or guarantee recovery of workspace bytes.
- Release manifest
- Bind model, harness, tools, policies, context and skill/hook bytes to a traceable behavior release; the manifest alone does not enforce isolation.
How does the mechanism work?
Step-by-step explanation
- State follows authority, not a container
Persist session, artifacts and merchant ledger separately and verify each through its owner.
- Separate discovery, computation and approval
Dynamic loading reduces input and programmatic calls process results; current authorization and approval still gate the actual action.
- Mechanisms evolve with evidence
Version model and harness together, using held-out tasks and counterexamples to keep or remove one orchestration mechanism.
Debugging · Diagnose failures
Locate five independent failure windows
Objectives of this level: Choose evidence and recovery actions at the actual persistence/execution boundary.
Visual guide · Replace the controller, keep facts
This is the proposed architecture. The local identity demo has no model, network or sandbox; a surviving session does not guarantee surviving workspace files. Select the figure to open it at full size.
Diagnose by the last authoritative boundary, not by a reconnect message
| Failure window | Observation to collect | Safe next step and invariant |
|---|---|---|
| Harness dies after intent, before dispatch | Session has intent; gateway has no confirmed result | Ask the operation authority; dispatch only under a contract that makes retry safe; unknown is not failure |
| Merchant commits, receipt event is absent | Merchant has a bound receipt; session stops at intent | Reconcile original operation_id and payload, append the missing observation, never allocate a new key merely because the worker changed |
| Sandbox disappears after producing a file | Session refers to an artifact; durable artifact store may or may not contain that digest | Verify the digest; restore from retained artifact or recompute a safe read-only step; a surviving session cannot recreate lost bytes by assertion |
| Stream disconnects after an event was stored | Session sequence advanced; client cursor did not | Resume event delivery and deduplicate event_id; delivery replay is distinct from business execution |
| Plugin or hook changes while the task waits for approval | Release digest differs from the approved binding | Keep the task on the pinned release or stop for explicit migration/review; do not silently reinterpret approval |
For the runnable example, predict events/effects before each command, then inspect both files using Python sqlite3. Add three negative controls in your own copy: reuse intent-17 with a different tenant; reuse return-17 with a different quantity; look up an absent operation. The first must raise event_identity_conflict, the second operation_identity_conflict, and the last must return None without creating a merchant row. An exception before dispatch is not evidence that a previous write never occurred.
Recover the controller without changing business history
Suppose worker w1 sent operation return-17 and then lost its connection. Worker w2 receives epoch 8. A local lock may stop w1 updating the session, but it does not stop an already transmitted merchant request. Inspect merchant-side deduplication/fencing and receipt retention. If the merchant offers neither stable deduplication nor authoritative outcome query, hold the operation for reconciliation rather than promising automatic recovery.
Also test a context bug: a summary says “return complete” while the session has only intent. The UI must show outcome_unknown until a bound merchant receipt is verified. Editing the summary must not edit the ledger.
Investigate secrets as architecture, not a prompt trick
An environment variable set in the code environment can be read by generated code. Review process environment, mounted files, tool outputs and inherited child processes. A vault/proxy design keeps real values outside that environment, while the gateway limits destinations and actions. OpenAI's current hosted-vault docs distinguish network allowed_domains from credential allowed_hosts; a placeholder is not a locally usable signing secret. This lesson does not configure or test that service. A secret-free local demonstration is not proof that arbitrary generated code is safely contained.
code example
A local fence cannot recall a transmitted request
w1 sends return-17 and disconnects. w2 owns epoch 8. The session rejects stale w1 events, but the merchant can still receive w1's prior request. Merchant-side checks and original operation identity remain necessary.
Acceptance task for this level
Write incident timelines for missing receipt, lost sandbox artifact and stale plugin approval. For each, list confirmed facts, unknowns, forbidden retry and the minimum recovery query.
Reading this browser’s record…
Hide the answer and check your understanding
A stream resumes and displays completed. What should be verified before reporting a return exists?
Expand reference derivation
Identify whether completed is a task observation or verified business result; fetch the original bound merchant receipt and ensure it applies to the current authorized task.
Further explanations and practice
When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.
All linked explanations and exercises (1 )
Sources and verification scope
The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.
- Anthropic · Managed Agents architecture · 2026-04-08
- Anthropic · Harness design for long-running apps · 2026-03-24
- OpenAI · Introducing the Agents API · 2026-09-10
- OpenAI Agents API · Architecture · checked 2026-10-30
- OpenAI · Tool search · checked 2026-10-30
- OpenAI · Programmatic tool calling · checked 2026-10-30
- OpenAI Agents API · Vaults · checked 2026-10-30
- OpenAI Agents API · Plugins · checked 2026-10-30
- Codex · AGENTS.md discovery and precedence · checked 2026-10-30
- Codex · Hooks and permission events · checked 2026-10-30