# Advanced topics

The basic loop asks a model what to do next. Advanced harness engineering asks what happens when the world changes while that loop is running: new user input arrives, a tool catalog refreshes, context fills up, a client disconnects, or a process crashes after an external action.

These topics compare the inspected snapshots. They separate implemented behavior from the design implications we draw from it. The [Codex](../snapshots/codex/8c076942cb70/chapter.md), [pi](../snapshots/pi/482c1381a00d/chapter.md), [Goose](../snapshots/goose/34a222e3f2b9/chapter.md), and [Sidekick](../snapshots/sidekick/463d653124e1/chapter.md) chapters contain the detailed evidence and reading paths. Sidekick's source repository is private; its citations require access.

## Explore the topics

Each topic has its own page. Read them in order to follow execution, state, coordination, tool integration, and recovery, or choose the boundary you are designing now.

- **[Event-driven execution](advanced/event-driven.md)** — Use Sidekick to trace durable work across workers and compare the tradeoffs with loops, session tasks, and operation-based state machines.

- **[Compaction](advanced/compaction.md)** — Understand when a summary replaces model context, what survives, and how to adopt it without losing new input.

- **[Steering & cancellation](advanced/steering.md)** — Distinguish input admission, follow-up queues, and cancellation at model and tool boundaries.

- **[Multi-player](advanced/multiplayer.md)** — Explore shared observation, competing input, approval authority, and reconnection across humans and clients.

- **[Multi-agent delegation](advanced/multiagent.md)** — Define ownership, workspace isolation, cancellation, and result contracts when a parent delegates work.

- **[MCP](advanced/mcp.md)** — Follow tool discovery, catalog changes, authorization, and connection lifetimes across server boundaries.

- **[Code mode for MCP](advanced/code-mode.md)** — Compare model-written tool orchestration, nested-call policy, execution limits, and result shapes.

- **[Tool safety classification](advanced/tool-safety.md)** — Separate action risk from user authorization, and understand where model-based review fits into tool execution policy.

- **[Skills](advanced/skills.md)** — Follow discovery, selection, and loading of reusable instructions, including their context cost and trust boundaries.

- **[Next user prompt suggestions](advanced/prompt-suggestions.md)** — Understand how a harness predicts a useful next message, presents it, and waits for the user to accept it.

- **[Persistence & recovery](advanced/persistence.md)** — Separate recorded history from durable effects and handle uncertainty after a crash.

- **[Observability](advanced/observability.md)** — Trace the boundaries that explain latency, completion, and the meaning of tool timing.

## Put the ideas into practice

Use the [builder's lab](build-a-harness.md) to exercise these boundaries with deterministic scenarios. The [design comparison](comparison.md) connects individual topics to each harness's overall design.
