Handoff and recall

A handoff is a digest computed from the event log plus a summary the agent writes. The summary is checked against the digest, and anything the log can't support is kept and tagged, never dropped. The next session gets it back before its first turn.

The agent writes it

orstrum_handoff takes the agent's own summary: a goal, what's done, what's in progress, decisions, next steps, and the files it touched. Orstrum never calls a model to write one; the agent that did the work is the one that knows what happened, and it's already in context. /orstrum:orstrum handoff asks it to.

The digest checks it

The digest is recomputed from .orstrum/events.db every time: files edited, tool calls and errors, and the last test, build or run with a readable result. Four rules:

  • A file in files_touched that the log shows no edit to is tagged.
  • If the last check failed, any "done" item claiming success (fixed, passes, green, works, complete…) is tagged with the failing command.
  • If there were no tool calls, every "done" item is tagged.
  • If no check ran with a readable result (a piped npm test | tail doesn't count), a "done" item claiming a test, build or lint passed is tagged.
Handoff saved for the next session. From the log: 1 files edited · last `npm test` failed · 12 tool calls, 3 errors.
Tagged [unverified]: "All tests pass now" (last `npm test` failed). Correct it if the log is right.

When no handoff was written

If a session ends without one, the session end stores the digest alone, so the next session at least knows which files changed and how the last check went. It never replaces a handoff the agent wrote for the same session, and it skips sessions with no tool calls.

Recall

After /compact, --resume, or a forked session, the handoff is injected into the agent's context before the first turn, prefixed Orstrum recall:. At most ten lines: the digest, then goal, done (with tags), in progress, decisions and next steps, then pointers to .orstrum/spec.md and .orstrum/rules.md. A fresh session gets only the budget line; the agent can call orstrum_recall if it wants the handoff.

Last handoff (Oct 14, 3:05 PM, session 49257167): 1 files edited · last `npm test` failed · 12 tool calls, 3 errors.
Goal: Make the formatter tests pass
Done: All tests pass now [unverified: last `npm test` failed]; Read the spec
Decisions: Round to 2 decimals
Next: Ship it
Spec: .orstrum/spec.md (Money formatter)

Project rules

.orstrum/rules.md, written by /orstrum:orstrum start, is pushed at every session start as Orstrum rules:. It's capped at 40 lines and 2,000 characters, because every line is paid for in every session; keep the detail in spec.md.