context-handoff
/octopus:context-handoff compacts the current session into a structured
handoff document that a successor agent β or a fresh session β can pick up
without re-discovering context from scratch.
What it solves
When work needs to continue beyond the current session β different agent, different model, or simply a fresh context window β context is lost unless it is explicitly transferred. Describing βwhere we areβ in freeform chat is not enough: the successor needs to know what was decided, which artifacts already exist, and β critically β which skills to invoke next and in what order.
Without a prescriptive handoff, the next agent re-discovers tools, re-reads
files it could have been pointed to directly, and risks re-litigating decisions
already settled. context-handoff prevents that by producing a compact,
structured document that tells the successor exactly what to do.
How it works
The handoff is prescriptive, not just descriptive. It is organized into five steps:
- Session summary β what was attempted, what was decided, what is in-flight, and what is blocked.
- Durable references β every artifact already produced in the repo is linked by path or URL. Content is never duplicated: PRDs, plans, ADRs, specs, issues, PRs, and commits are referenced, not copied. If a decision was made in chat but never written down, the handoff flags it as missing rather than recording it as canon.
- Suggested next skills β the most valuable section: a prescriptive, ordered list of the skills the successor should invoke for the remaining work.
- Redaction pass β before writing, tokens, API keys, passwords, and
session-bound internal URLs are replaced with
<REDACTED>. - Path output β the absolute path of the handoff file is printed so the user can pass it to the successor agent directly.
The handoff is saved to the OS temp directory (/tmp/ or $TMPDIR), not
the workspace. Handoffs are session ephemera β they should not appear in git status and should not be read months later as project canon. If the work is
genuinely ticket-sized and deserves a durable record, route to
/octopus:doc-spec or /octopus:doc-prd instead.
Usage & parameters
/octopus:context-handoff [optional focus for the next session][focus]β optional free-text hint about where the successor should direct attention. Included verbatim in the handoffβs opening section.