mirror of
https://github.com/runbear-io/beardrive.git
synced 2026-08-25 08:08:08 +02:00
Every new agent session — on another machine, in a teammate's account, on another platform — re-derives the same working state from scratch. History records what a session *did*, never what it was in the middle of. AGENT_HANDOFF.md at the mount root is now that channel. It is an ordinary synced file (the sync engine has never heard of it); the UserPromptSubmit hook hands its body to a session's FIRST turn and asks every turn to overwrite it before finishing. No new hook event, no new storage, no change to internal/agenthooks. - First turn is decided by the note the hook already writes, read one line before SaveNote overwrites it — so the body is paid for once per session, not once per turn. - Bounded: 4 KB per mount, 8 KB per turn, with a truncation marker. - Multi-mount safe: each block is labelled with its own mount's path, and the reminder names every mount's file. - A scope that excludes the root (`init --only wiki`) is detected and said out loud rather than silently keeping the handoff local. - This is the first PEER-authored content the product injects into an agent's context, so each block is framed as information rather than instruction, and the provenance line goes through safeField. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>