Skip to content
Agent Field Notes
Course contentsExpand a topic to choose a lesson.

SYSTEMATIC LEARNING / FOUR-LEVEL COURSE

Modern harnesses: replaceable controllers, external sessions and controlled execution

Derive session, context, sandbox, tool gateway and business-ledger boundaries from one return task, then govern dynamic tools, skills/hooks and model+harness upgrades.

Learning objectives: Split components by authority and lifetime, run an identity/recovery example, diagnose cross-boundary failures and justify hosted/self-managed and simplification decisions.

Content checked: 2026-10-30 · Each level has independent explanations, tasks and inspections

Choose a starting point based on your familiarity with this topic. Current level: Foundation · Understand the concepts. After completing the task, continue to the next level. Reading and self-checks alone do not establish mastery.

On this level

Review the prerequisites

Suitable for: Backend developers who understand task contracts and handoff.

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
  1. State follows authority, not a container

    Persist session, artifacts and merchant ledger separately and verify each through its owner.

  2. Separate discovery, computation and approval

    Dynamic loading reduces input and programmatic calls process results; current authorization and approval still gate the actual action.

  3. Mechanisms evolve with evidence

    Version model and harness together, using held-out tasks and counterexamples to keep or remove one orchestration mechanism.

Foundation · Understand the concepts

Derive the authority and failure boundaries

Objectives of this level: Assign session, working context, execution and business truth to explicit owners.

Visual guide · Replace the controller, keep facts

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.

A lost worker must not become a lost business task

A support task asks to create one return request for tenant A, order o-17. The model may interpret the request and propose a plan. The application must still know who owns the order, whether a reviewer approved this exact action and whether a return was already created. The model's next input is a working view; the business receipt belongs to the merchant.

Use three records with separate authority:

Record Owner and purpose What it cannot prove
Session event log Application/session service; retain accepted input, action intents, observations and receipt references A recorded intent does not prove external execution; an observation can itself be wrong
Working context Replaceable harness; select, summarize and load events within a model budget A summary cannot grant permission, erase a receipt or certify completion
Business ledger Merchant service; bind operation identity and payload to the actual effect A merchant receipt does not establish answer quality or that the user saw it

The session is not an unrestricted archive of credentials or personal data. Classify events, redact payloads, retain artifact references and define deletion/retention policy. In this lesson “append-only” is the normal event API's write rule, not a promise to retain every byte forever or proof that a database administrator cannot alter a file.

Give every component one boundary

The session service allocates an ordered event sequence and rejects conflicting reuse of event_id. A scheduler assigns a worker epoch. A harness loads the session and a pinned release manifest, prepares context and routes model proposals. A sandbox/executor performs permitted computation. A tool gateway authenticates the trusted principal, checks current resource authority and approved action binding, then sends a business operation. A receipt reconciler asks the merchant what actually happened.

The session identifier, event identifier, model call_id, network attempt_id and business operation_id answer different questions. A new worker and new network attempt may resume the same operation_id. Reusing a model call_id does not create merchant deduplication. An epoch only fences a remote write if the receiving boundary actually checks it.

Contemporary sources and the proposed design

Anthropic's 2026-04-08 Managed Agents article separates session, harness and execution environment; its 2026-03-24 research revisits orchestration as model capability changes. OpenAI's 2026-09-10 Agents API announcement and architecture guide describe a managed Codex harness with selectable environments. These are product/research scopes, not proof that this site's design has been deployed with either service. The ownership split, event envelope and release gates in this lesson are an application design derived from those sources.

Treat host-managed recovery as recovery of host-managed state. An external merchant's exactly-once behavior, approval semantics and current authorization remain an integration contract to test.

code example

Three records after a missing response

Session: intent(return-17), no receipt. Context: 'probably complete'. Merchant: receipt r-return-17 bound to tenant A/order o-17/quantity 1. Only the merchant observation can justify reconciling completion; neither context nor a fresh worker grants another write.

Acceptance task for this level

Draw the owners and trust boundaries for order o-17. Give each of five identifiers one purpose and state which component can establish completion.

Acceptance self-checks

Reading this browser’s record…

Hide the answer and check your understanding

Does a surviving session prove that an artifact and a merchant effect survived?

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.