Skip to content

test(harness-ops): add behavior-probes cases for /autocompact window precedence #6930

Description

@kyle-sexton

Problem

The auto-compact window precedence that context-guard records (#6906) was observed once, by hand, on Claude Code 2.1.296 on 2026-10-10. The probe used claude -p "/autocompact" under a throwaway CLAUDE_CONFIG_DIR. Nothing re-checks it when a release changes the resolver. The per-spawn effort precedence, by contrast, is covered by behavior-probes cases (#6913).

Observed:

Setup Reported by /autocompact (no argument)
/autocompact 400000 saves user settings.json at modelSettings.<model id>.autoCompactWindow
+ project top-level autoCompactWindow: 300000 300k: project top-level beats user per-model
user file with top-level 250000 and per-model 400000 400k: per-model beats top-level in the same file
--autocompact 200000 200k: the flag beats settings
CLAUDE_CODE_AUTO_COMPACT_WINDOW=150000 + flag 150k: the env var beats the flag

Proposed next step

  1. Add plugins/harness-ops/skills/behavior-probes/cases/autocompact/* cases with paired controls, one per row.
  2. Each case writes the settings into the case workdir and matches the first line of /autocompact output.
  3. Check whether the runner can isolate CLAUDE_CONFIG_DIR per case. Today it passes the parent's through, so the user-scope rows need that before they can run without touching real settings.
  4. Point context-guard's observation record at the cases once they exist.

Activity

  1. added
    needs-triage
    on Oct 11, 2026
  2. github-actions commented on Oct 11, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: add behavior-probes cases under harness-ops for the /autocompact window precedence rows (with paired controls), and point context-guard's observation record at them. PR #10351 merged with Refs: and covered the dry-run criteria, so the issue stayed open. What is left is the attended live probe, which an unattended lane cannot run, plus any record pointer the PR did not cover. Nothing else is missing. I found no duplicates.

    Automated triage, applied by the lanes App.

  3. removed
    needs-triage
    on Oct 12, 2026
  4. added theissue type on Oct 12, 2026
  5. kyle-sexton commented on Oct 13, 2026

    @kyle-sexton
    MemberAuthor

    Owner decision (2026-10-13): approved the recommendation.

    Next: an agent lane, via admission, adds the verdict and the three cases and validates them by dry run. The one live run happens in an attended session, since the skill runs live only on an ask in that turn.

    This was generated by AI.

  6. kyle-sexton commented on Oct 13, 2026

    @kyle-sexton
    MemberAuthor

    Owner batch-ratified this admission in an attended session on 2026-10-12: work-class: scoped. Rule: class C1-C3, no trust surface, the independent check confirmed the recorded decision, and no owner step remains.

  7. added
    agent-ready
    and removed
    agent-ready
    on Oct 13, 2026
  8. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (attempt 1 of 2).

  9. added
    status: ready
    needs-owner-decision
    and removed
    status: ready
    on Oct 25, 2026
  10. melodic-automation-lanes commented on Oct 25, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  11. 23 remaining items

  12. melodic-automation-lanes commented on Oct 27, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 40413378737, the work-resolve-issue run that agent-ready started, before it did any work; that run ended at 2026-10-26T23:03:36Z. work-unblock has now removed and added agent-ready back to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last added agent-ready or a run last reported, work-unblock waits longer before each one, up to 24 hours.

  13. added
    agent-ready
    and removed
    agent-ready
    on Oct 27, 2026
  14. melodic-automation-lanes commented on Oct 27, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 40447185596, the work-resolve-issue run that agent-ready started, before it did any work; that run ended at 2026-10-27T04:32:54Z. work-unblock has now removed and added agent-ready back to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last added agent-ready or a run last reported, work-unblock waits longer before each one, up to 24 hours.

  15. added
    agent-ready
    needs-human
    and removed
    agent-ready
    on Oct 27, 2026
  16. melodic-automation-lanes commented on Oct 27, 2026

    @melodic-automation-lanes
    Contributor

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

    Why, in the run's own words:

    The lane's part of this issue is already merged, so there is nothing left to change. Criteria 1-11 shipped in harness-ops 4.10.0 (plugins/harness-ops/CHANGELOG.md:56-59): probe.py's prints outcome and print_verdict, the cli_args allowlist limited to --autocompact (probe.py:88-90, :193-205), the fake_runner stream for prints cases (probe.py:686-706), four cases/autocompact/ cases with a control chain (project-top-level-window-applies, project-per-model-beats-top-level, flag-beats-project-settings, env-beats-flag), the shared scaffold cases/lib/autocompact-project.sh, and the SKILL.md paragraph (SKILL.md:63-69). What is left needs a person: criterion 12, the one capped live run, has to happen in an attended session at the owner's request (the 2026-10-13 owner comment and the 2026-10-26 comment both say so), and step 4, pointing context-guard's reader-contract.md:499-511 observation at the cases, waits until that live run passes. This run changed nothing.

    What the run says it did not do:

    • Did not run probe.py --dry-run or test_probe.py again: this lane runs no interpreter, and the run changed no file. The CHANGELOG says the dry run passed when 4.10.0 shipped.
    • Criterion 12, the one capped live run of the autocompact area that checks whether claude -p "/autocompact" prints the window without a model turn: it needs an attended session at the owner's request, with the case count and ceilings stated first.
    • Proposed step 4, pointing context-guard's reader-contract.md observation at the cases: it waits for that live run to pass.
    • Rows 1 and 2 (user-scope settings) and the CLAUDE_CONFIG_DIR isolation they need: deferred by the 2026-10-13 owner decision until the owner asks for them.

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

    To retry, remove needs-human and add agent-ready again.

  17. kyle-sexton commented on Oct 27, 2026

    @kyle-sexton
    MemberAuthor

    Re-triage. The owner restated on 2026-10-27 when an item stops for them:

    Signal me (a needs-human / needs-decision label, or a direct question) only for:

    1. A change to the original intent or vision.
    2. A finding during implementation (things don't always go to plan) that changes the intent, vision or primary design.
    3. A real HIGH/CRITICAL security or cost risk, as defined in section 3.

    Everything else moves through the factory floor on its own. [...] Any other stop is a defect to fix, not a reason to ask me.
    Not cost, so spend it freely: model usage under the Claude subscriptions, and each account's promotional $200 API credits.

    The lane found criteria 1-11 already shipped in harness-ops 4.10.0. What is left is criterion 12, one capped live run checking whether claude -p "/autocompact" prints the window without a model turn, then step 4, pointing context-guard's reader-contract observation at the cases once that run passes (#6930 (comment)).

    Decided: the live run's "at the owner's request" condition guarded model spend. The owner now names model usage as capacity, not cost, so it needs no request. An attended host session runs criterion 12, stating the case count and ceilings first as the lane comment asks, and then makes the step 4 edit. Rows 1 and 2 (user-scope settings) stay deferred, as the 2026-10-13 decision says.

    Host run (host-run label):

    • Criterion 12: the one capped live run of the autocompact area, with the case count and ceilings stated first; post the CLI version and result here.

    Target labels: remove needs-human, add host-run.

  18. added
    host-run
    and removed
    needs-human
    on Oct 27, 2026
  19. kyle-sexton commented on Oct 28, 2026

    @kyle-sexton
    MemberAuthor

    Host run. One capped live run of the behavior-probes autocompact area (criterion 12), then the step 4 pointer from context-guard's reader contract to the cases.

    What ran (Claude Code 2.1.312, Linux WSL2, subscription login, 2026-10-28):

    • Before starting, I stated the case count and ceilings: 4 cases (--area autocompact), --max-runs 4, --max-cost-usd 1.0, max_budget_usd 0.25 per case, no retries. The rate-limit windows were quiet (five-hour 39%, seven-day 1%).
    • probe.py validate (41 cases, 0 problems) and probe.py run --dry-run --area autocompact (4 pass), then probe.py run --live --area autocompact --max-runs 4 --max-cost-usd 1.0.
    • Criterion 12, confirmed: claude -p "/autocompact" prints the window without a model turn. Every stream ended in a result with num_turns 0 and cost 0. The output came as an assistant message whose model is <synthetic>. Observed windows: project top-level 250k, project per-model 400k, flag 200k, env var 150k. Each matches its case.
    • The runner first reported all four cases inconclusive ("a model turn answered instead"). It counted any assistant message as a model turn. The PR below makes it trust a result that reports num_turns 0. probe.py rejudge on the same saved streams then gave pass for all four, with the control chain intact. No second live run was made.
    • Step 4, done: the dated observation in plugins/context-guard/reference/reader-contract.md now points at the /harness-ops:behavior-probes autocompact cases. Record 14 in the behavior-probes records.md holds the run.
    • The flag case labels its source (from settings), so the cases match the window value, not the source label.
    • Tests: test_probe.py 58 OK. A new test fails without the fix, and a guard test keeps a result with num_turns 1 inconclusive. Full dry run: 41 of 41 pass. check-affected passed on the merged head.
    • Rows 1 and 2 (user-scope settings) stay deferred per the 2026-10-13 decision.

    PR: #10628

    Target labels: add none; remove host-run.

  20. removed
    host-run
    on Oct 28, 2026
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

    status: ready

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions