Repository navigation
feat(harness-ops): add a live behavior-probe harness for Claude Code platform behavior - #6647
Conversation
…platform behavior Add /harness-ops:behavior-probes: a stdlib runner (probe.py) and 18 data-driven cases grouped by area (auto-mode, hooks, worktree, concurrency, sandbox). Each case runs claude -p in a temp directory with its own --settings and permission mode, the target call's outcome is read from stream-json, and each case gets pass, fail or inconclusive stamped with the Claude Code version. Every negative case names a positive control; a model that never attempts the call is inconclusive. --dry-run costs nothing, --live is opt-in and capped per case and suite. records.md holds the outcomes of one live run on Claude Code 2.1.295. changelog apply Phase 5 lists the cases a release range touches, and the permission-rule-hygiene convention gains probed-behavior records. Refs: #6645 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
…llcheck
Declare the case directory as probe.test.sh's test-scope so
affected-tests selects the suite for a case change, guard the scaffold
variables with ${VAR:?}, and shorten the skill description below the
skill checker's length warning.
Refs: #6645
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
Keep the plugin description under claude.ai's 500-character limit and regenerate docs/catalog.md and docs/skill-cheat-sheet.md from the manifests. Refs: #6645 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 5m 16s —— View job Security review in progress
|
|
Claude finished @kyle-sexton's task in 7m 35s —— View job Code review complete
Scope. What I checked. Read I was not able to execute the author's local-check commands myself (Bash tool execution of Result: no findings meeting this lane's bar. Notes from the deeper read, none of which rise to a blocking/flagged finding:
The fixtures are internally consistent (every negative case's |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5d1ad19cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review has reviewed this pull request through 7b0fae0; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 7b0fae0; a later push is reviewed from there. |
The comment-hygiene gate flagged the TODO token in diverged-repo.sh, which named the file the force-push cases plant. The file name carries no meaning for the probes, so rename it in the scaffold and the four prompts that read it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
- A negative case whose control did not run in the suite is inconclusive, not pass. - A case that declares target.count is inconclusive when the model made fewer matching calls, so a partial launch cannot confirm the concurrency cap. - Each live case's max_budget_usd is cut to what --max-cost-usd leaves, so one case cannot spend past the suite ceiling. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
|
Claude finished @kyle-sexton's task in 5m 6s —— View job Code review complete
Scope. Incremental review of what changed since this lane's last pass at What I checked. Confirmed the
Finding posted inline. The third fix — capping each run's budget to what the suite ceiling has left (probe.py:654-659) — is correct for the happy path, but the spent-accounting fallback for when a run's I was not able to execute |
|
Claude finished @kyle-sexton's task in 1m 30s —— View job Security review complete
Scope. Incremental: only the files changed since this lane's last review at What changed in scope. Commit
The Result: no security findings in the incremental scope. These are correctness/soundness tightenings of the probe harness's own pass/fail/inconclusive |
When a run reports no cost, run_suite charged the case's uncapped max_budget_usd against the suite ceiling, so one timed-out run could end the suite. Charge the budget actually given to the run. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp
|
Claude finished @kyle-sexton's task in 1m 35s —— View job Code review complete
Scope. Incremental: only what changed since this lane's last pass at What changed. Commit spent += cost if isinstance(cost, (int, float)) else budgetI traced this against the scenario that exposed the bug: a run with no The new test I read the full current Result: no findings in the incremental scope. The one-line fix is correct, matches the suggested remediation exactly, and ships with test coverage for the gap that let it through last round. I was not able to execute |
|
Claude finished @kyle-sexton's task in 1m 2s —— View job Security review complete
Scope. Incremental: only what changed since this lane's last review at What changed in scope. Commit Skip gate. This change has no security-relevant surface: it only corrects how the harness's own Result: no security findings in the incremental scope. |

Closes #6645
Summary
Adds
/harness-ops:behavior-probes, a live probe harness for Claude Code platform behavior, so arecheck of a permission or auto-mode claim is one command instead of a bespoke script.
claude plugin evalcannot carry these cases: it cannot set per-case permission rules,autoMode, a permission mode or project settings (plugin evals docs).Fix
skills/behavior-probes/scripts/probe.py, stdlib Python):validate,run --dry-run | --live,table,rejudge,recheck. Each case runsclaude -p --output-format stream-json --verbosein its owntemp directory with
--setting-sources project,local, the case's--settingsand--permission-mode,--max-budget-usdper case, a suite run and cost ceiling, a driver system prompt, and a child environmentreduced to an allowlist. It reads
permission_denials,system/permission_deniedandtool_resultis_error/text, stampsclaude_code_versionfrom the init event, and gives pass, fail or inconclusive.A model that never attempts the call is inconclusive; a negative case whose paired control did not pass
is inconclusive.
--dry-runswapsclaudefor a fake and costs nothing. Built on thehop_chain.pylive_runner/child_env/kill_tree/dry-run pattern; no file is copied byte for byte, so noshared-copy registration applies.
cases/{auto-mode,hooks,worktree,concurrency,sandbox}/, each withsettings.json,prompt.md,expect.json(outcome, reason type, text match, tags) and an optionalscaffold.sh. Everydeny/refusedcase names its positive control.skills/behavior-probes/records.md, one record per behavior (claim, basis argv, as-of,Claude Code version, recheck trigger, outcome table). Raw streams are never committed.
/harness-ops:changelog applyPhase 5 runsprobe.py recheck --range A..Bto list the caseswhose tags match an item in the range, and offers a live rerun.
docs/conventions/permission-rule-hygiene/gains a Probed behaviors section (1.6.0).Verification
Live suite, run once: Claude Code 2.1.295, Linux, model sonnet, 18 runs, no retries.
The two dry-run-push controls were first written expecting
ran; the diverged remote rejects that pushafter the permission layer allows it, so the first pass reported them fail and their negatives
inconclusive. They now expect
allow, andprobe.py rejudgere-read the saved streams with no new run.Local checks:
probe.test.sh(25 unittest cases, all dry-run or stubbed), pyright 0 errors, pinned ruffcheck and format, shellcheck, shfmt, markdownlint-cli2, biome,
check-changed-skills.sh,check-changelog-fragments.sh --checkand--check-required,check-skill-description-voice.sh,check-shell-portability.sh,check-cross-plugin-source-drift.sh --check,sync-shared-copies.sh --check,check-skill-leaf-names.sh --check,check-skill-count-claims.sh,check-purged-em-dashes.sh,validate-plugins.sh, andaffected-tests.sh --runon the changed paths: all pass.Related
--permission-prompt-toolrecorder, background-subagent cases, tempCLAUDE_CONFIG_DIRisolation)🤖 Generated with Claude Code
https://claude.ai/code/session_01VxGrZW26Qs1qeo3RFgmbvp