Skip to content

session-flow handoff: print the written-section budget and give the over-cap case a command #17735

Closed as not planned

Description

@kyle-sexton

Refs: #16427

Problem

#16943 bounded the hot file's fixed part and made carried decisions tamper-evident. The owner's Q46 A (decision) left two of #16427's four proposals for later: "The budget printout and the overflow command are not in this slice." Both gaps are still on main at d46efa97:

Open question (owner): which of the two to build

Recommendation: A. Basis:

Unblocks: the rest of #16427's proposed direction.

Done when (for option A)

  • save_point.py new prints the byte budget left for the written sections, computed from the skeleton's core and carried sizes. A test in plugins/session-flow/scripts/tests/test_save_point.py checks the printed number against HOT_FILE_MAX_BYTES minus _size_parts' core plus carried.
  • fill refuses a slots object that would put the hot file over HOT_FILE_MAX_BYTES and writes nothing. The refusal lists each written slot's byte size. A test covers the refusal and an in-budget pass.
  • A subcommand moves a named written section's overflow into the hop file under that section's heading and leaves one pointer line in the hot file. validate then passes, and a test shows it.
  • The FAIL at save_point.py:1822 names that subcommand.
  • plugins/session-flow/skills/handoff/SKILL.md and plugins/session-flow/reference/structure.md describe the budget line, the fill refusal and the overflow command.
  • HOT_FILE_MAX_BYTES stays 24,600, and the existing carry, fold and over-cap tests still pass.

Activity

  1. added
    needs-triage
    on Nov 21, 2026
  2. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: session-flow save_point.py (new, fill, a new overflow subcommand, the over-cap FAIL text), its tests, and the handoff SKILL.md and structure.md docs; read by anyone running the handoff skill.
    Reversible: yes; revert the change. The 24,600-byte cap stays as it is.
    Open questions: none

    Decision recorded. Owner, 2026-11-21, typed in the owning session (verbatim): "Go with recommendations." This answers Q133, option A.

    Q133 (A)

    Build both handoff fixes in one change. new prints the bytes left for the written sections (HOT_FILE_MAX_BYTES minus core and carried). fill refuses an over-budget slots object before it writes anything, listing each slot's size. A new subcommand overflow takes a section name, moves that section's trailing whole lines into the hop file until the hot file fits, and leaves one pointer line (the refinement's recommendation on naming). The 24,600-byte cap stays fixed. Options B and C are not built.

    [quote truncated; the full decision is at the link]

    #17735 (comment)

    This decision settles the open question (option A, build both), and the done-when items are exact. I found no duplicate among the open issues and no merged fix.

    Automated triage. A maintainer reviews it.

  3. added
    needs-owner-decision
    on Nov 21, 2026
  4. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: the issue is at status: ready.

  5. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    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: Option A: new prints the written-section byte budget, fill refuses over-budget slots before writing, and a new overflow subcommand moves a section's overflow into the hop file, with the cap unchanged at 24,600.

    Related work

    Open questions

    1. Which option should be built: A (budget printout, fill refusal and a new overflow subcommand), B (printout and refusal only, with the FAIL text naming the section to shorten), or C (none, close as not planned)?
      RECOMMENDED: A Basis: plugins/session-flow/scripts/save_point.py:1822 names a remedy (move written content into the hop file) that no command performs before validate passes; the issue cites 11 validate runs and about 25 Edit calls on one handoff.
    2. What should the overflow subcommand be called, and which part of a section is overflow: the trailing bytes, or whole entries, once the section is trimmed to fit?
      RECOMMENDED: Name it overflow, take a section name, and move whole trailing lines until the hot file fits, leaving one pointer line. Basis: judgment

    Sources read

    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base/plugins/session-flow/scripts/save_point.py:244: HOT_FILE_MAX_BYTES = 24_600
    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base/plugins/session-flow/scripts/save_point.py:1771: _size_parts(doc) returns the size breakdown tuple
    • /home/runner/work/claude-code-plugins/claude-code-plugins/.base/plugins/session-flow/scripts/save_point.py:1822: the over-cap FAIL says to move written non-core content into the hop file before validating

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

  6. kyle-sexton commented on Nov 21, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. Owner, 2026-11-21, typed in the owning session (verbatim): "Go with recommendations." This answers Q133, option A.

    Q133 (A)

    Build both handoff fixes in one change. new prints the bytes left for the written sections (HOT_FILE_MAX_BYTES minus core and carried). fill refuses an over-budget slots object before it writes anything, listing each slot's size. A new subcommand overflow takes a section name, moves that section's trailing whole lines into the hop file until the hot file fits, and leaves one pointer line (the refinement's recommendation on naming). The 24,600-byte cap stays fixed. Options B and C are not built.

    Basis

    Done when

    • save_point.py new prints the byte budget left for the written sections, computed from the skeleton's core and carried sizes, and a test in plugins/session-flow/scripts/tests/test_save_point.py checks the number against HOT_FILE_MAX_BYTES minus _size_parts' core plus carried.
    • fill refuses a slots object that would put the hot file over HOT_FILE_MAX_BYTES, writes nothing, and lists each written slot's byte size; a test covers the refusal and an in-budget pass.
    • A subcommand overflow takes a section name, moves that section's trailing whole lines into the hop file under the section's heading, and leaves one pointer line in the hot file; validate then passes, and a test shows it.
    • The over-cap FAIL in save_point.py names the overflow subcommand.
    • plugins/session-flow/skills/handoff/SKILL.md and plugins/session-flow/reference/structure.md describe the budget line, the fill refusal and the overflow command.
    • HOT_FILE_MAX_BYTES is still 24,600, and the existing carry, fold and over-cap tests pass.
  7. removed
    needs-owner-decision
    on Nov 21, 2026
  8. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (dispatch 1; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).

  9. removed
    needs-triage
    on Nov 21, 2026
  10. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"8a0faea91332fe863d28a45ad6f91c723989c5bd209713978c67e215c5e0a892","body_sha256":"d1659b81a4508e715df3f29d6ac16423ffa123cc78aeda64c6bfb72d0b54e784"}

  11. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44877078449, the work-resolve-issue run that agent-ready started, before any model turn, because the GITHUB_TOKEN budget was under its start-gate share, or the window was projected to have under its start-project share of the header's limit left by the run's expected end (github-token start-gate, start-project and start-run-minutes in rate-limits.json; the run's start-gate notice names which); that run ended at 2026-11-21T06:47:20Z. work-unblock has now removed and added agent-ready back 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 the kill-switch wait.

  12. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor
    No description provided.
  13. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped partway through this issue and needs a person.

    Reason: intent

    Why, in the run's own words:

    intent-change: the shape-4 handoff in session-flow 9.16.0 (plugins/session-flow/CHANGELOG.md:33-61) replaced the design Q133 option A was chosen against. Q133 was drafted at d46efa9, when new wrote shape 3. Bare new now writes shape 4. That new already prints a budget: line (save_point.py:4618-4631). Its fill already moves whole Observations, Suggested skills and Direction changes sections into the hop file behind a pointer until the file fits the 24,600-byte cap (save_point.py:3118-3128, handoff_fit.fit). fill refuses only per-slot overruns (Resumption brief 979 bytes, below-the-rails note 281). structure.md:91 says 'Fitting is fill's on shape 4'. Building option A as written would make shape-4 fill refuse an over-cap object instead of fitting it, which reverses shipped behavior, and an overflow command would repeat what fill already does. Option A would only add something new on shape 3, which new writes now only with --shape 3. The owner needs to choose one: (1) close #16427's leftover as superseded by shape 4; (2) build option A for shape-3 files only (budget printed from core plus carried, fill refusing over the cap, overflow, and the FAIL at save_point.py:1956-1959 naming it); or (3) a narrower shape-4 follow-up, such as having the shape-4 FAIL at save_point.py:1920-1924, which a hand edit after fill can trigger, name a command.

    What the run says it did not do:

    • Every done-when item of #17735 is left unbuilt, waiting on the owner's choice in reason.
    • Tidy, review, verify and checks prep did not run because there is no diff.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44911764424

    To retry, set Work status to agent-ready again (clearing the needs-human hold).

  14. kyle-sexton commented on Nov 21, 2026

    @kyle-sexton
    MemberAuthor

    Closed as superseded by the shape-4 handoff, on the owner's choice of option (1) from the lane's intent stop (run 44911764424). The owner was asked in the hub session ~16:4xZ and answered at ~16:5xZ, verbatim: "go w/ recommendations". Shape 4's new already prints a budget: line (save_point.py:4618-4631), and its fill already fits an over-cap file by moving whole sections behind a pointer (save_point.py:3118-3128). So option A of Q133 would reverse shipped behavior, and it adds something new only on shape 3, which new now writes only with --shape 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Work status

    needs-human

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions