We run pi-durable 1.4.0 in a Cloudflare Durable Object for a coding agent. We want to use the whole context window and never compact: near the limit, the model writes a handoff note, and the work continues in a fresh context built from the note.
reset(note) and a tool's control: { handoff } start the new context, but they also end the current run (finishToolRound → final boundary). To carry on, the host has to notice that, submit a new input itself, and pick what that input should be.
Automatic compaction does continue the run. It can be bent into a handoff (keepRecentTokens: 1, backgroundTokens: 0, a beforeCompact hook that returns a model-written note), but the summary is framed by the fixed SUMMARY_PREFIX, and mid-run it keeps the last tool round rather than the latest user message.
Request: a first-class "handoff and continue" mode, for example compaction.mode: "handoff" or reset(note, { continue: true }). In that mode:
- the run carries on in the new context: system prompt, the note, then the latest user input;
- the host supplies the note, from a hook or the model;
- the wording around the note is configurable.
Happy to test a prerelease.
Activity
0No activity yet.