← all cases

handoff

Three Claude Agent Skills that carry an agent's working context across the session boundary. A parent contract defines the document; a producer writes and read-back-verifies it and owns storage; a consumer resumes from it. The point is that context survives a session reset without the next agent re-asking what was already established — and without trusting a job's self-reported success.

Claude Agent SkillsMarkdown contract skill inheritanceMIT

Problem

A long agent session ends — context window exhausted, container recycled, or just a fresh chat the next morning. The naïve fix, "summarize the conversation," loses the two distinctions that actually matter for a successor: what was verified versus what was assumed, and where a running background job's real state lives. A summary that promotes a guess to a fact sends the next session down a path the last one already ruled out; a summary that says "the job succeeded" because a RESULT: ok line said so inherits the lie. And a summary written by a helpful model happily copies the API token it saw into a durable file. The work needed a contract, not a paragraph.

Architecture

handoff parent contract · owns no state session Aends / context full handoff-promptproducer · read-back storage (owned)local dir · discovered handoff-pickupconsumer · re-verify session BNext action
The parent skill is a behavioural contract only — it owns no state and never touches storage. The producer is the sole owner of persisted documents: it resolves where handoffs live, writes one, then immediately reads it back before reporting success. The consumer never constructs a path — it asks the producer for latest() / read(), so moving storage never breaks pickup.

Design decisions

Numbers

3skills · one commit · v1.0.0 · MIT
35real handoffs written across 16 projects
~8.4 KBaverage handoff · 13-day span on disk
7handoffs chained on one project in ~11 h

The deepest chain is on the nightshift project: seven handoffs written between 2026-09-22 20:55 and 2026-09-23 07:45, each session's document seeding the next — a real producer→consumer→producer relay across seven sessions, not a single demo.

The corpus is older than the schema: only 14 of the 35 handoffs use the v1.0 headings (Durable context / Verified facts / Next action), 10 carry an explicit Hypotheses section, and 21 record a background job's PID, log, or exit-code inline. Adoption is partial, and the page says so rather than counting only the compliant files.

Failure modes the contract is built against

Limits

What's next

Links