You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
last-save.json is single-slot — interleaved sessions clobber each other's saved positions, producing duplicate memory entries #140
Observed (production, 0.8.3 via marketplace; mechanism re-verified on main @ 7db7866)
The same span of one session ("99 exchanges (11 human)" in the extract log) was summarized twice, ~2.5h apart (06:06 and 08:33), yielding a near-identical triplet of entries in the daily file.
Mechanism
pipeline/shell.py:cmd_save_position writes a single-slot store:
and pipeline/extract.py:get_last_save_line returns 0 whenever the stored session differs:
Returns 0 if the file is missing, corrupt, or belongs to a different session.
So with two live sessions A and B alternating saves (multiple terminals, or a background/worktree session sharing the store): A saves (slot=A), B saves (slot=B), A's next save finds slot=B → resumes from 0 → re-extracts and re-summarizes A's entire span → duplicates. The dedup context (last memory entry) doesn't catch it when other entries landed in between.
Suggested fix
Key positions by session: either last-save-<session>.json files, or one JSON object {"<session_id>": line, ...} with a small LRU cap (sessions are UUIDs; a dozen entries suffice). Read path change is one lookup; write path merges instead of replacing.
Activity
fix(save): make both position readers agree on floats and bools
fix(save): keyed positions, corrected header times, and a validator t…
test: kill the mutations that survived a green suite
test: kill the mutations that survived a green suite
test: kill the mutations that survived a green suite (#192)
fix: what review found — a notice that could eat the prompt, and a ve…
feat: name the silent no-op, and a doctor to ask about it (#200) (#201)
post-tool-hook.sh: keep pipeline.shell read-position off the hot path (…