episode_handoff
Retrieve the most recent journal takeaways from a prior session to get context on what the last session concluded, without needing a memory search.
Instructions
Read the most-recent journal takeaways from a prior session in this worktree. Call this FIRST at a /loop iteration entry — it answers 'what did the last session conclude here?' without needing memory_search. Episodes are the sibling-to-memory primitive for journal-shaped writes (see episode_write).
When prior_session_id is omitted the handler auto-resolves it — the most-recent event-log session_id other than this process's own — under two implicit filters that mirror the opt-out cascade memory_search / memory_list honor: caller-worktree strict equality (None matches only None, so sibling worktrees stay isolated) and the disabled_scopes cascade (a session whose only takeaways are scope-disabled is skipped; surviving episodes are scope-filtered). Pass it explicitly to override (e.g. a child agent's parent id).
Returns a dict:
prior_session_id: the resolved session id, or None when no prior session exists in the log.episodes: list of {id, created, takeaway, body, scopes} dicts, oldest first, capped atmax_episodes(default 5, cap 50); each surfaces the writer'stakeawayplus the fullbody.note(optionalstr): set ONLY when the immediately-prior worktree session left nothing visible; names the cause — floor-only, zero-episode, promoted-out, or all-scope-hidden. The last two DID journal, so anotenever means 'wrote no journal'.episodesMAY be non-empty — the walk rewinds to an older takeaway.
For ad-hoc lookup of an older session's journal, prefer episode_search with an explicit parent_session_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_episodes | No | ||
| prior_session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||