Skip to content

feat(session-flow): finish the handoff shape-4 rollout after #17677 #17877

Closed

Description

@kyle-sexton

Context

Handoff shape 4 merged in #17677 on a reduced ship gate (owner, 2026-11-21): a deterministic
content check (17 of 17 seeded cases kept every authored fact) plus a paired before/after smoke
test. The rest of the planned measurement and rollout moved to after the merge. ADR 0115 (#17875)
records the decision. This issue tracks what is left.

Remaining work

  • ADR for shape 4. Done in docs(adr): record handoff shape 4 and its tool-owned byte budget #17875. Record design threads T1 (shape 4 as a new stored shape), T2 (the
    hot-file layout) and T6 (new and fill own the byte budget, fit and verdict) as
    docs/adr/0115-*. Set ADR 0084's status to say ADR 0115 supersedes its decision 3, and
    ADR 0091's to say ADR 0115 supersedes its decision 1 in part (owner-approved, 2026-11-21).
  • AC16 after report. List every source filling a resumed session's context, with its
    token count, before and after shape 4. Done 2026-11-21 from the ship-gate smoke test
    (Claude Code reader, 4 cases, 10 delivered runs per arm):
    - First call (startup, resume prompt, @-attached hot file): 98,090 tokens before,
    97,999 after.
    - Context at the reader's last call: 161,134 before, 162,344 after (+0.8%, inside
    run-to-run noise).
    - Startup is about 92k of that and is out of scope here (context: measure startup under plugin profiles and review which skills must stay model-invocable #17278).
    - The handoff's own sources (the hot file at 3.4k to 9.7k, its re-reads, the hop files
    and the handoff skill) come to about 10k to 18k combined.
  • Continuation router (AC15). Done in feat(session-flow): compact within a task and hand off at a phase or task boundary #18022 (7953f48), ADR 0116; shipped on review with evals stopped (owner, 2026-11-21). Compact within the same task. At a phase or task
    boundary, next-in-sequence or unrelated, hand off and then /clear, or plain /clear when
    nothing carries over. Remove the "Between human stages" rule in
    plugins/session-flow/skills/workflow/context/continuation.md. Done when the three wf-*
    routing cases pass through /evals:plugin-eval. Record an ADR for it.
  • Router gate, a paired smoke, before the router ships (owner 2026-11-21, replacing the
    408-run statistical gate). 17 cases x after and compact x 2 runs = 68 runs, Claude Code
    reader. On same-task cases compact is no worse than after, and on boundary cases
    after is no worse than compact, on every case or all but one. If it fails, stop for the owner.
  • Parked live-reader cases, which need gh inside the eval sandbox.
  • Real-session check (AC9) after the shape-4 merge and after the router. The median
    context at the tenth resumed message must not rise, and no resumed session may miss a
    binding rule, decision or open question. Compare sessions by the session-flow plugin version
    read from each transcript. For shape 4, a regression gets a fix PR and the owner is told.
  • Optional (owner 2026-11-21): the statistical before/after comparison (A/A margin, 6 runs
    per cell), the before + A1 arm (Track A1 apart from shape 4, from copies/before plus A1's
    own diff), and Codex reader runs of the resume-eval cases.

Evals run under the desk heavy-run lock, at most 2 headless sessions, after
load1 < 24 and at least 16 GB available (the host limit every session on this machine follows).

Refs: #17677, #17874

Activity

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

    @github-actions
    Contributor

    Size: Large
    Complexity: High
    Uncertainty: Knowable
    Flags: intent
    Blocked by: none
    Blast radius: the session-flow plugin's handoff and workflow continuation guidance, its resume-eval cases, and the evals and lane runs that use them. Anyone who resumes a session reads or runs this.
    Reversible: partly; the doc and router edits revert with the commit. Measurement reports and the real-session check are records, not changes to undo.
    Open questions:

    1. The compaction gates say "non-inferior at margin M", but the issue never gives M a value. What is M, and on what metric is it measured?
      RECOMMENDED: reuse the margin from the paired before/after smoke test in feat(session-flow): shape-4 handoff with a tool-owned byte budget (Track B) #17677 and ADR 0115 if one is set there. Otherwise take the A/A margin the optional item names. Basis: judgment; the issue text defines neither.

    I understood this as a tracking issue for the work left after #17677. It has eight items: the AC16 report, the continuation router (AC15), the compaction gates, the before + A1 arm, Codex reader runs, parked live-reader cases, the AC9 real-session check, and an optional statistical comparison. It is too big for one change and should be split. Several items need a host, a laptop lane or repeated runs, so the issue lane cannot check them. Only the router has an exact done-when.

    #17874 is related, since it is the other ref, but it is not a duplicate. No merged pull request in the list covers this work.

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

    **Decision recorded.** <answer>
    

    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 triage verdict left this issue at needs-owner-decision:

    • flagged: intent
    • held by needs-owner-decision
    • no lanes App verdict comment shows whether an earlier verdict was flagged

    Reason: intent

  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: Split this tracking issue into separate issues, one per remaining item, with the continuation router (AC15) as the first change an unattended run can finish.

    Related work

    Open questions

    1. What are margin M and its metric for the compaction gates?
      RECOMMENDED: Take M from the resume-eval harness's A/A-derived margins: accuracy margin M with the non-delivery margin 1.43h, rounded up to 0.01. Set a token margin separately if the gates cover tokens. Basis: plugins/session-flow/evals/resume-eval.md:154
    2. Should the eight items be split into separate issues, with the router (AC15) first? Most of the others need a laptop lane, the heavy-run lock, repeated runs or real sessions, so an unattended run cannot check them.
      RECOMMENDED: Yes. File the router plus its ADR as one issue. File the compaction gates as a separate precondition issue the router waits on. File each measurement or run item separately, and keep the AC9 real-session check as a person-run record. Basis: judgment
    3. The router's removal of the 'Between human stages' rule touches three places: continuation.md:155, workflow/SKILL.md:161 and the pinned text in test_workflow_continuation_rule.py:11. Should all three be updated together?
      RECOMMENDED: Yes. Remove the rule from continuation.md and SKILL.md, and update or remove the test that pins it. Basis: plugins/session-flow/scripts/tests/test_workflow_continuation_rule.py:11
    4. What does 'the three wf-* routing cases pass through /evals:plugin-eval' name? The issue does not list the case names, and the gates must pass before the router ships. Should the router wait for the gate results, and who decides if a gate fails?
      RECOMMENDED: Name the three wf-* cases in the router issue. Make the router wait on the gate issue, and on a gate failure stop and leave it to the owner, as the issue says. Basis: judgment

    Sources read

    • plugins/session-flow/skills/workflow/context/continuation.md:155: the 'Between human stages, suggest a handoff only at context-usage zone heavy or on its compaction marker' rule to remove
    • plugins/session-flow/skills/workflow/SKILL.md:161: repeats the 'Between human stages' rule
    • plugins/session-flow/scripts/tests/test_workflow_continuation_rule.py:11: a test pins the rule text
    • plugins/session-flow/evals/resume-eval.md:137: the resume-eval CLI has --nondelivery-margin, --token-margin and --subset same|boundary
    • plugins/session-flow/evals/resume-eval.md:154: noise-report.py takes the margin from A/A pairs, with the non-delivery margin 1.43h rounded up to 0.01
    • plugins/session-flow/scripts/harness/resume_eval.py:2113: the harness checks the non-delivery and token margins

    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

    Remaining eval-only items and AC9 are tracked on #18018 (comment); closing this checklist.

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

    needs-owner-decisionneeds-triage

    Fields

    Work status

    needs-owner-decision

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions