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
test(harness-ops): add behavior-probes cases for /autocompact window precedence #6930
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
Add plugins/harness-ops/skills/behavior-probes/cases/autocompact/* cases with paired controls, one per row.
Each case writes the settings into the case workdir and matches the first line of /autocompact output.
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.
Point context-guard's observation record at the cases once they exist.
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.
Owner decision (2026-10-13): approved the recommendation.
How are the five precedence rows split? → Ship rows 3, 4 and 5 first (per-model over top-level in one project settings file; the flag; the env var). They need one new runner piece: a verdict that matches /autocompact output text. Rows 1 and 2 (user scope) and their three runner changes wait until the owner asks for them.
Basis: origin/main plugins/harness-ops/skills/behavior-probes/scripts/probe.py:114, :432-445; https://code.claude.com/docs/en/model-config#set-the-auto-compact-window
Can a case write the operator's user settings? → Yes, if it passes an argument: /autocompact <size> saves to user settings, and the runner passes CLAUDE_CONFIG_DIR through. Every case calls /autocompact with no argument and sets the window by flag, env var or settings file.
Basis: commands page /autocompact row; probe.py:114
One capped live run after dry-run validation? → Approved: one capped live run, with the case count and the ceilings (--max-runs, --max-cost-usd, each case's max_budget_usd) stated before it starts.
Basis: origin/main plugins/harness-ops/skills/behavior-probes/SKILL.md:42-46
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.
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.
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).
23 remaining items
melodic-automation-lanes commented on Oct 27, 2026
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.
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.
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.
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:
A change to the original intent or vision.
A finding during implementation (things don't always go to plan) that changes the intent, vision or primary design.
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.
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-probesautocompact 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.
Activity
github-actions commentedon Oct 11, 2026
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.
kyle-sexton commentedon Oct 13, 2026
Owner decision (2026-10-13): approved the recommendation.
Basis: origin/main plugins/harness-ops/skills/behavior-probes/scripts/probe.py:114, :432-445; https://code.claude.com/docs/en/model-config#set-the-auto-compact-window
claude -p "/autocompact"print the window without a metered turn? → Not documented. Confirm it in the first probe before more cases depend on it.Basis: https://code.claude.com/docs/en/commands; https://code.claude.com/docs/en/headless
/autocompact <size>saves to user settings, and the runner passes CLAUDE_CONFIG_DIR through. Every case calls /autocompact with no argument and sets the window by flag, env var or settings file.Basis: commands page /autocompact row; probe.py:114
Basis: origin/main plugins/harness-ops/skills/behavior-probes/SKILL.md:42-46
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.
kyle-sexton commentedon Oct 13, 2026
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.
github-actions commentedon Oct 25, 2026
The triage sweep dispatched intake triage for this issue (attempt 1 of 2).
melodic-automation-lanes commentedon Oct 25, 2026
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).23 remaining items
melodic-automation-lanes commentedon Oct 27, 2026
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-readystarted, before it did any work; that run ended at 2026-10-26T23:03:36Z. work-unblock has now removed and addedagent-readyback 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 addedagent-readyor a run last reported, work-unblock waits longer before each one, up to 24 hours.melodic-automation-lanes commentedon Oct 27, 2026
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-readystarted, before it did any work; that run ended at 2026-10-27T04:32:54Z. work-unblock has now removed and addedagent-readyback 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 addedagent-readyor a run last reported, work-unblock waits longer before each one, up to 24 hours.melodic-automation-lanes commentedon Oct 27, 2026
The work-resolve-issue lane stopped partway through this issue and needs a person.
Why, in the run's own words:
What the run says it did not do:
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.Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40563839806
To retry, remove
needs-humanand addagent-readyagain.kyle-sexton commentedon Oct 27, 2026
Re-triage. The owner restated on 2026-10-27 when an item stops for them:
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):
Target labels: remove
needs-human, addhost-run.kyle-sexton commentedon Oct 28, 2026
Host run. One capped live run of the behavior-probes
autocompactarea (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):
--area autocompact),--max-runs 4,--max-cost-usd 1.0,max_budget_usd0.25 per case, no retries. The rate-limit windows were quiet (five-hour 39%, seven-day 1%).probe.py validate(41 cases, 0 problems) andprobe.py run --dry-run --area autocompact(4 pass), thenprobe.py run --live --area autocompact --max-runs 4 --max-cost-usd 1.0.claude -p "/autocompact"prints the window without a model turn. Every stream ended in a result withnum_turns0 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.inconclusive("a model turn answered instead"). It counted any assistant message as a model turn. The PR below makes it trust a result that reportsnum_turns0.probe.py rejudgeon the same saved streams then gavepassfor all four, with the control chain intact. No second live run was made.plugins/context-guard/reference/reader-contract.mdnow points at the/harness-ops:behavior-probesautocompactcases. Record 14 in the behavior-probesrecords.mdholds the run.(from settings), so the cases match the window value, not the source label.test_probe.py58 OK. A new test fails without the fix, and a guard test keeps a result withnum_turns1inconclusive. Full dry run: 41 of 41 pass.check-affectedpassed on the merged head.PR: #10628
Target labels: add none; remove host-run.