Repository navigation
Replies: 2 comments
|
Your report is accurate, precisely cited, and — for the version you tested — already fixed. Three things worth having: the fix that landed (with the version boundary), the window the fix deliberately leaves open, and a plugin that covers that window plus older releases. 1. The code you cited is the pre-fix shape; it changed on 2026-09-11At let cut = SessionLogOffset(boundary.seq + 1)
while (cut < source.events.length && source.events[cut]?.type !== 'turn/start') {
cut = SessionLogOffset(cut + 1)
}At HEAD ( const cut = SessionLogOffset(boundary.seq + 1)That change is Version boundary: the fix is in Your second proposed shape is the one that landed ("the running-source case could stop the seed at the selected 2. The fix closes the between-turn window. The during-turn window stays open — same symptomThe note's Consequences carve this out explicitly: "Events already inside the selected prefix retain their ordinary replay semantics; this decision does not redefine pending input inserted before the selected closing event." That is reachable, and it is a one-line change to your reproduction. The durable inbox splice is written at submit time, not at claim time: So a prompt submitted while the selected turn is still running is appended at a seq below that turn's Honesty about evidence: I verified this by reading the sources above, not by running it — the machine I had gives me a source checkout without The existing coverage matches the carve-out: 3. A plugin, for the residual window and for pinned versionsFor anyone on ≤ Two things about it that matter here. The gate is Scope, stated plainly: upstream's seed-side fix is the better shape and the note explains why; this plugin is a mitigation for (a) releases that predate it and (b) the §2 window, not a competing design. On |
|
Confirmed on 0.2.1-alpha.2: the fork cut uses the selected turn end (dsh-session buildForkSeed, lib/index.js:925-934); the residual case, a prompt spliced before that turn's turn/end, still replays, so our client keeps refusing /btw during a running turn. Thank you. |
Uh oh!
There was an error while loading. Please reload this page.
In DSH 0.1.5-rc.2, forking a running source session at its latest completed
turn does not produce a child containing only that completed history. The
child also inherits the inbox insertion for the source's in-progress prompt
and begins answering that prompt.
Reproduction
to invoke another SessionController operation.
sessionController.forkwithatSeqequal to the first turn'sturn/endsequence.Actual: the child contains the second prompt's
agent/inbox/splicedinsertionand starts a turn for it. The caller cannot clear the inherited item before it
runs because the child id is returned only after agent creation and
publication. A caller intending to ask an isolated side question therefore
gets an unwanted answer to the source's open prompt first.
The fork code selects the completed boundary at
packages/api/session-controller/src/commands.ts:225-242, then advances itscut from
turn/end + 1until the nextturn/startatcommands.ts:243-245.That range includes the durable inbox insertion immediately before the open
turn. The whole prefix is passed as the child seed at
commands.ts:257-275.Agent-loop reconstructs inbox state from that seed while creating the child at
packages/core/agent-loop/src/index.ts:764-800, and publishes the preparedagent before returning at
index.ts:824-828.Expected: SessionController should support an exact completed-boundary fork
that excludes later inbox splices. This could be an explicit fork option, or
the running-source case could stop the seed at the selected
turn/endratherthan advancing across pre-turn inbox events.
Target: DSH Discussion (Bug)
All reactions