Repository navigation
Description
Problem
A shape-3 handoff (/session-flow:handoff, scripts/save_point.py) has a fixed 24,600-byte cap on the hot file. The part of the file that "never moves" grows every hop, so on a long chain the cap can only be met by shortening what the session writes, and the validator cannot tell a harmless shortening from one that drops a detail the next session needs.
Evidence
One session, hop 7 of a chain, 2026-11-15:
validatereportedcore 13071 bytes, carried 5054 bytes: 18,125 of 24,600 bytes were fixed before the session wrote anything, leaving about 6,500 bytes for nine written sections (review, criteria, remaining actions, open questions, observations, commands, environment, decisions, suggested skills).- The first
fillproduced 30,286 bytes. Reachingvalidate: PASStook 11validateruns and about 25Editcalls. - To fit, the session shortened decisions carried from earlier hops. Two lost binding text ("committing to main stays rejected"; which route a design answer takes) and the reading list lost the file holding the owner's verbatim answers.
validatepassed: it checks that a carried decision's id is present, not that its text survived. A side agent caught it; nothing in the tool did. - Restoring the text with
amendput the file back over the cap (25,505 bytes).amendwrote it, as documented.
Across this project's transcripts (one grep pass, 802 .jsonl files): 115 contain at least one is over the 24600-byte hot-file cap line, 603 such lines in total, 14 in the worst file. UNVERIFIED as a count of sessions or of validate runs: a transcript line can repeat tool output, and subagent transcripts are included.
Causes, as read from the skill and the script's messages
- The core grows without bound.
## Direction changescarries one line per change per hop and is in the core, with## Original goal,## Current rulesand## Standing preferences. The cap is fixed. At roughly 1 KB of new core per hop, the written sections have no room left a few hops on. - Decisions are retyped, not carried.
newcopies rules, the goal and the trail off disk.## Decisions in forceand## Open questionsare slots the model fills again each hop, so a carried decision can be reworded or shortened with no record. - The size check comes last. The session learns the budget only from a
validateFAIL afterfill.newknows the core and carried sizes when it writes the skeleton and could print the remaining budget. - The FAIL names a remedy with no command. "Move written non-core content into
archive/.../h<N>-….md" has no subcommand beforevalidatepasses (amendis for after emit), so the remedy in practice is hand-editing until the number fits. validateafterfillallows unbounded retries in practice. The skill says at most three attempts, then anUNVALIDATEDbanner; a session that can see the fix is one more trim away keeps trimming.
Proposed direction (for a design pass, not decided)
- Carry
## Decisions in forceand## Open questionsoff disk like rules:newcopies them, changes go throughretireor an in-place rewrite under the id, andvalidatefails a carried entry whose text changed without one. - Bound the core: fold
## Direction changeslines older than N hops into the hop archive behind one pointer line, the way retired rules already move. - Have
newprint the byte budget left for the written sections, and havefillrefuse an over-budget object with per-slot sizes before it writes. - Give the over-cap case a command that moves a named written section's overflow into the hop file and leaves a pointer.
Acceptance
- A hop-8 handoff on a chain like the one above validates on the first
fill, or fails once with per-slot sizes. - A carried decision whose text was shortened without a
retireor an explicit rewrite failsvalidate. - The hot file's fixed part stops growing with hop count.
Next step
An audit of all handoff chains (how often carried text was reworded between hops, how many validate attempts per handoff) would size this properly; the grep above is only a first sign.
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 15, 2026
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: none
Blast radius: plugins/session-flow handoff script (save_point.py), its tests and the handoff skill text; read by anyone running /session-flow:handoff.
Reversible: yes; each change is a code or doc edit that can be reverted.
Open questions: none
Decision comment. It settles the open design questions.
What I understood: the handoff hot-file cap forces lossy trimming of carried decisions on long chains. Pull request #16943 merged with
Refs:on this issue, so part of the first slice may already be done. The recent merged-PR list I was given was empty, so I could not check what it covered. What remains is whichever of the decision's acceptance items #16943 left, plus the items the decision deferred: the budget printout innewand the over-cap overflow command. Confirming what #16943 left is the next step.Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 15, 2026
Not admitted to the issue lane: merged pull request #16943 names it with
Refs:after its newest decision or refinement comment, so its work may already be done: close the issue if it is, or post a comment whose first line is**Decision recorded.**saying what is left, which sends it back through intake. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Nov 15, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Bound the shape-3 hot file's fixed part and make carried decisions tamper-evident, so a long handoff chain fits the 24,600-byte cap without lossy hand-trimming.
Related work
Open questions
RECOMMENDED: Two slices: carry Decisions in force and Open questions off disk with a validate check on changed text, and fold old Direction changes into the hop archive. Leave the budget printout and the overflow command to a follow-up. Basis: judgment
RECOMMENDED: 3 hops, as a named constant in save_point.py, so the core stops growing from hop 4 on. Basis: plugins/session-flow/scripts/save_point.py:169
RECOMMENDED: Only a retire entry, or an in-place rewrite recorded under the same id in a marked field. A bare text change fails validate. Basis: judgment
RECOMMENDED: Keep it fixed. The acceptance item that the fixed part stops growing implies the cap stays. Basis: plugins/session-flow/scripts/tests/test_save_point.py:2463
RECOMMENDED: No audit first. Treat the three acceptance items as the done-when, written as checkable tests on a synthetic hop-8 chain. Basis: judgment
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 17, 2026
Decision recorded. The owner chose a first slice: carry decisions off disk and fold old direction changes into the hop archive.
Question as put to the owner (Q46): the handoff size cap forces lossy trimming.
Owner's answer, 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."
The slice follows the refinement's recommendations:
## Decisions in forceand## Open questionsare carried off disk, with avalidateFAIL on carried text changed without aretireentry or a rewrite recorded under the same id in a marked field;## Direction changeslines older than 3 hops fold into the hop archive behind one pointer line; the 24,600-byte cap stays fixed; no audit first. The budget printout and the overflow command are not in this slice.Acceptance criteria
plugins/session-flow/scripts/save_point.pynewcopies## Decisions in forceand## Open questionsfrom the previous hop off disk, as it does rules.validatefails a carried decision or open question whose text changed without aretireentry or a rewrite recorded under the same id in a marked field, and passes one changed through either; tests inplugins/session-flow/scripts/tests/test_save_point.pycover the fail and both pass cases.## Direction changeslines older than 3 hops (a named constant insave_point.py) move into the hop archive behind one pointer line in the hot file; a test shows it.validateon the firstfill.HOT_FILE_MAX_BYTES), and the existing over-cap FAIL test still passes.Posted by an agent session.
github-actions commentedon Nov 17, 2026
A listed human released the issue's Work status hold, so it goes back to intake triage.
melodic-automation-lanes commentedon Nov 17, 2026
{"v":1,"actor_id":337595936,"title_sha256":"882c28b38f4e55198aa63dca8a35dfd215583eb627d1d3f00b9545ec53f3229b","body_sha256":"5173493f892bb2b3d5bc83c32a052442f6bdea0d4600797643cd1041d412d109"}
melodic-automation-lanes commentedon Nov 17, 2026
This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44127452530, the work-resolve-issue run that
agent-readystarted, before any model turn, because the GITHUB_TOKEN budget was under its start-gate share (limits.api github-token start-gate); that run ended at 2026-11-17T17:36:29Z. work-unblock has now removed and addedagent-readyback to start a fresh run. A budget stop is the lanes' load, not a fault in this issue: it never counts toward limits.limit-stops-per-issue or thekill-switchwait.github-actions commentedon Nov 17, 2026
github-actions commentedon Nov 17, 2026
melodic-automation-lanes commentedon Nov 17, 2026
Pull request #16943 merged with
Refs:, so this issue stays open and nothing starts the lane on it again. work-unblock removedstatus: readyandagent-ready, so the hourly triage sweep sends it back to intake triage. Admission then parks it atstatus: confirmedfor a check of what that pull request left, until a**Decision recorded.**comment says what is left or someone closes it.github-actions commentedon Nov 17, 2026
The triage sweep dispatched intake triage for this issue (dispatch 1; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).
kyle-sexton commentedon Nov 21, 2026
Closing as completed: #16943 delivered the first slice the owner chose (decision comment). Each of the decision's seven acceptance criteria is met on
mainatd46efa97:newcopies## Decisions in forceand## Open questionsoff disk. The carry is in_carries, save_point.py:1579, and the test istest_carry_new_copies_questions_and_decisions_off_disk, test_save_point.py:3938.validatefails a carried entry whose text changed without aretireor aRewritten h<N>: <why>mark naming this hop (_check_carry_3, save_point.py:2053-2092). The tests cover all three cases:retire: test_save_point.py:3990.- Folded:pointer line. The named constant isDIRECTION_HOPS_KEPT = 3, save_point.py:182, and the test is test_save_point.py:4035. Reading: the hot file keeps the last 3 hops, this one included, so a line folds once it is 3 hops old. Keeping 4 hops, the other literal reading of "older than 3 hops", would make hop 8's fixed part one pointer line larger than hop 4's and fail the next criterion. feat(session-flow): carry handoff decisions off disk and fold old direction changes #16943's body records this choice.validateon the firstfill: test_save_point.py:4090.HOT_FILE_MAX_BYTES = 24_600, save_point.py:244, and the over-cap tests remain (test_save_point.py:2840, :2875). The carry, fold and cap tests ond46efa97pass:pytest test_save_point.py -k "carry or fold or over_the_cap or cap"gave 20 passed.The decision left two items out of this slice: the budget printout in
newandfill, and an over-cap overflow command. #17735 carries them as a follow-up.