Repository navigation
Token-efficiency coverage check: adoption profile plus value-free --client-wiring for every host - #264
Merged
seathatflowsinourveins merged 3 commits intoSep 25, 2026
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
1 task done
seathatflowsinourveins
force-pushed
the
claude/token-coverage-profile-20260925
branch
2 times, most recently
from
September 25, 2026 18:30
9baeb7a to
b107e02
Compare
5 tasks done
seathatflowsinourveins
force-pushed
the
claude/token-coverage-profile-20260925
branch
from
September 25, 2026 18:34
b107e02 to
6e2ec43
Compare
9 of 22 tasks
…t-wiring One value-free command shows on any host whether the selected token practice is installed and wired into both native clients: python3 scripts/adoption_status.py --profile token-efficiency --client-wiring --json - adoption/manifest.json: a token-efficiency profile, labelled drafted and not accepted (the manifest has no per-profile status field; the label follows macos-arm64-foundation). It encodes the landscape selection: the token-efficiency layer's current choice (RTK, Context Mode, Repomix, Headroom, TOON, ccusage), the Serena, QMD, MarkItDown, SocratiCode, ai-memory and MCPorter winners, and both native clients. The reference-only rows (jCodeMunch, ast-grep, codebase-memory-mcp, Context Hub, AgentsView, Claude HUD, otel-tui, OmniRoute) stay optional. Bootstrap pins cover 8 of 14 components on Linux and 6 of 14 on macOS (README table, test-enforced). - scripts/adoption_status.py: --client-wiring parses the user Claude settings and plugin registry, the Codex config.toml, hooks.json and AGENTS.md, and the checkout's .claude/settings.json and .codex/config.toml in-process. It returns fixed keys with booleans, two hook-event counts or null only, and a guard refuses any other shape. It adds no subprocess, never reads ~/.claude.json, and checks the effort and agent-teams variables by name. Codex MCP servers are reported at user and project scope, because the recipes register them per project. The limitations are restated when the flag is set; the exit code is unchanged. - tests/test_adoption_status.py: fake-HOME fixtures (wired, unwired, malformed, wrong types, oversized, dangling links, matcher and opt-in edge cases), the CLI opt-in, real-manifest profile resolution and a guard against drift from the landscape winners. 17 hand mutations are caught. - docs/token-efficiency-stack.md: a Coverage check section. The .json install lines now name repomix 1.18.1 and ccusage 20.0.24, the manifests/stack.json pins qualified in recipes/native-upgrades-20260921.md. - Regenerated docs/new-host-grand-list.md and its JSON with --write and re-registered the changed hashed files with register_file. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… scope Repair round for the independent review of the token-efficiency coverage check. - scripts/adoption_status.py: codex.hooks_feature_enabled resolves Codex's lifecycle-hook feature the way upstream 0.155.1 does (codex-rs/features at rust-v0.155.1: "hooks" is Stage::Stable with default_enabled true, the legacy alias "codex_hooks" is applied first in sorted key order, so "hooks" wins, and plugin_hooks is Stage::Removed). An explicit false, a non-boolean or a non-table [features] zeroes the Codex ai-memory hook count, as disableAllHooks does for Claude. An unreadable config.toml leaves both null. client_wiring gains a computed "complete" that applies the documented rule: every file parsed, every boolean true with each Codex server in the user or the project config.toml, and both hook counts above zero. Text mode prints it and the exit code is unchanged. The docstring and limitations now say the client files are parsed whole and in-process, no value is emitted and no credential store is opened, and that Codex profiles, project features and command-line overrides are not evaluated. - tests/test_adoption_status.py covers the hooks feature cases (absent, true, false, legacy alias, precedence in both file orders, non-boolean, non-table, and an unreadable config.toml beside a valid hooks.json) and the complete rule. 39 tests: 20 at the base, 17 added by the first commit and 2 here. 13 of 13 hand mutations of the new logic are caught. - docs/token-efficiency-stack.md: the uv form is the primary command. Any interpreter other than 3.13, or a platform the manifest does not list, keeps the top-level status missing with exit 2. "Applied" now requires client_wiring.complete plus a separate pinned-version condition (the bootstrap's installed-versions.txt, or each recipe's version command), and the section says plainly that this command does not establish the pins. The optional rows are described as the landscape encodes them. Adds a changed-after-v2026.09.24.1 note. - adoption/README.md: changed-after-v2026.09.24.1 notes in step 3, beside the command and in the profile row. - manifests/evidence.json: re-registered the four changed hashed files with register_file. Not adopted: a version probe inside adoption_status.py (review option 1). The pin files declare probes for only 8 of the profile's 14 components on Linux and 6 on macOS. The bootstrap already runs them into installed-versions.txt. The script's documented and tested contract is that it never runs the commands it checks. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…file Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
seathatflowsinourveins
force-pushed
the
claude/token-coverage-profile-20260925
branch
from
September 25, 2026 18:54
6e2ec43 to
ceaede1
Compare
seathatflowsinourveins
added a commit
that referenced
this pull request
Sep 25, 2026
- Opt-out: set switchModelsOnFlag true and the variable "0". Removing the keys does not undo an earlier merge. The client parses the variable with M.bool. - switchModelsOnFlag cannot stop a subagent's fallback. Its reads in wpo(), apo() and Spo() are listed. - The silent-retry lane is armed by the server (model configuration convolute_arcades or header x-cc-tender-quilt), not by a client experiment. - The built-in agents that omit CLAUDE.md include Plan. - Workers returning null: check the transcript for a refusal before retrying. - Correct the population and cutoff for the source-scout figure. - Mark the client-wiring report as a proposal in PR #264. Rebased onto dcd6f0c. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Collaborator
Author
|
Counter semantics for the token-practice docs and reporter. This is evidence from #270 (merged), independently reviewed (agree ×4). I haven't edited this PR's files. Please fold in whatever fits at integration. Receipts, generation 2, on What each counter actually counts:
|
seathatflowsinourveins
deleted the
claude/token-coverage-profile-20260925
branch
September 25, 2026 19:12
2 tasks done
seathatflowsinourveins
added a commit
that referenced
this pull request
Sep 25, 2026
- Opt-out: set switchModelsOnFlag true and the variable "0". Removing the keys does not undo an earlier merge. The client parses the variable with M.bool. - switchModelsOnFlag cannot stop a subagent's fallback. Its reads in wpo(), apo() and Spo() are listed. - The silent-retry lane is armed by the server (model configuration convolute_arcades or header x-cc-tender-quilt), not by a client experiment. - The built-in agents that omit CLAUDE.md include Plan. - Workers returning null: check the transcript for a refusal before retrying. - Correct the population and cutoff for the source-scout figure. - Mark the client-wiring report as a proposal in PR #264. Rebased onto dcd6f0c. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
seathatflowsinourveins
added a commit
that referenced
this pull request
Sep 25, 2026
- The client-wiring check is merged (#264) and does not check the variable yet. - Drop the count of switchModelsOnFlag reads and list them. - The built-in Explore and Plan bodies cannot be edited; the rule reaches them only through a same-name custom agent. - /config omits the toggle row while the variable is set (verified in the client's row builder). - Rebased onto 5abd17e. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
seathatflowsinourveins
added a commit
that referenced
this pull request
Sep 25, 2026
- Opt-out: set switchModelsOnFlag true and the variable "0". Removing the keys does not undo an earlier merge. The client parses the variable with M.bool. - switchModelsOnFlag cannot stop a subagent's fallback. Its reads in wpo(), apo() and Spo() are listed. - The silent-retry lane is armed by the server (model configuration convolute_arcades or header x-cc-tender-quilt), not by a client experiment. - The built-in agents that omit CLAUDE.md include Plan. - Workers returning null: check the transcript for a refusal before retrying. - Correct the population and cutoff for the source-scout figure. - Mark the client-wiring report as a proposal in PR #264. Rebased onto dcd6f0c. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
seathatflowsinourveins
added a commit
that referenced
this pull request
Sep 25, 2026
- The client-wiring check is merged (#264) and does not check the variable yet. - Drop the count of switchModelsOnFlag reads and list them. - The built-in Explore and Plan bodies cannot be edited; the rule reaches them only through a same-name custom agent. - /config omits the toggle row while the variable is set (verified in the client's row builder). - Rebased onto 5abd17e. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
seathatflowsinourveins
added a commit
that referenced
this pull request
Sep 25, 2026
…uredOutput fields at the top level (#272) * Portable Claude profile: no silent model fallback, top-level StructuredOutput fields The settings template now sets CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1 and switchModelsOnFlag false. When a request is flagged, it ends in a refusal instead of silently re-running on Opus 4.8, in the main thread and in every subagent. switchModelsOnFlag alone governs only the main thread in Claude Code 2.1.282. The example user CLAUDE.md asks workers to put StructuredOutput fields at the top level of the call arguments: in an interleaved A/B, schema errors fell from 5/30 to 0/30 (p = 0.026). The dated record in docs/decisions/2026-09-25-model-fallback-guard.md names the evidence, the alternatives and the overturn conditions. The fallback variable is undocumented, so that part stays keep-but-compare. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Resolve the independent review of the fallback-guard record - Scope: the ultracode recipe's settings file stays unguarded, and the omitClaudeMd agents (source-scout, blind-*) and built-in Explore do not read the user file. - Biology flags fall back to Opus 5 as well as cyber flags to Opus 4.8. - The client gating is stated precisely: WM() gates target selection in aHn(), and a silent-retry experiment lane retries only on the refusing model. - availableModels is recorded as documented and subagent-wide. It is rejected because excluding versions needs pins that also exclude the next Opus release. - Record template precedence, the hidden /config toggle and the opt-out. - Add a manual watch command. The catalog has no automated one yet. - Cite the host-local evidence archive and the result's version scope. - The example CLAUDE.md says what to do when a worker returns null after a safety flag. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Resolve the second independent review of the fallback-guard record - Opt-out: set switchModelsOnFlag true and the variable "0". Removing the keys does not undo an earlier merge. The client parses the variable with M.bool. - switchModelsOnFlag cannot stop a subagent's fallback. Its reads in wpo(), apo() and Spo() are listed. - The silent-retry lane is armed by the server (model configuration convolute_arcades or header x-cc-tender-quilt), not by a client experiment. - The built-in agents that omit CLAUDE.md include Plan. - Workers returning null: check the transcript for a refusal before retrying. - Correct the population and cutoff for the source-scout figure. - Mark the client-wiring report as a proposal in PR #264. Rebased onto dcd6f0c. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Resolve the third independent review of the fallback-guard record - The client-wiring check is merged (#264) and does not check the variable yet. - Drop the count of switchModelsOnFlag reads and list them. - The built-in Explore and Plan bodies cannot be edited; the rule reaches them only through a same-name custom agent. - /config omits the toggle row while the variable is set (verified in the client's row builder). - Rebased onto 5abd17e. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Name the dispatching brief as the per-run carrier of the StructuredOutput rule Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Name the SubagentStart hook as a further persistent carrier of the StructuredOutput rule Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Record the rebase base 3e4054d Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Re-register the settings template and CLAUDE.md example hashes Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: seathatflowsinourveins <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
token-efficiencyprofile inadoption/manifest.json.--client-wiringflag inscripts/adoption_status.py. It emits fixed keys holding only booleans and counts.6752ede5(currentorigin/main). Rebased with the hot-file protocol indocs/lanes.md.lane:foundationadoption/manifest.json,adoption/README.md,scripts/adoption_status.py,tests/test_adoption_status.py,docs/token-efficiency-stack.mdand.json. Regenerated:new-host-grand-list.{json,md}andmanifests/evidence.json.What "applied" means here. It follows the landscape's current choice for context and usage (
catalogs/landscape/foundation.jsonlayers[9].current_choice) plus the layer winners:client_wiring.completefrom these keys:CLAUDE_CODE_EFFORT_LEVELunset[features] hooksflag (the replacement for the removedplugin_hooks, verified in the codex-rs source)How this host measures:
adoption_status.py --profile token-efficiency --json: 13 of 13 commands present. repomix 1.18.1 and toon 4.1.1 were installed today at their pins; they are recorded in Record token-stack host receipts on the workstation: RTK hook path, repomix, toon, Context Mode, jCodeMunch, Serena, ccusage #263.--client-wiring --repo-root <main checkout>:complete: true. From a fresh worktree it reportscomplete: false, because this host's Codex MCP servers are registered in the main checkout's untracked per-project.codex/config.toml. The docs say to run the check from the checkout the clients actually use.Evidence-class table
local_integration(read-only run on this host; no receipt)uv run --no-project --python 3.13 python scripts/adoption_status.py --profile token-efficiency --client-wiring --repo-root <checkout> --json--client-wiringemits only booleans and counts, never file content. Wired, unwired and malformed fake-HOME fixtures behave as documented.synthetictests/test_adoption_status.py: 39 tests, 20 before this PR and 19 added; 13/13 hand mutations of the new logic are caughthooksfeature is stable and on by default;plugin_hooksis removedsource_reviewgh api repos/openai/codex/contents/codex-rs/features/src/lib.rs(+legacy.rs)Local commands run
uv run …stands foruv run --no-project --python 3.13 --with-requirements .github/requirements-ci.txt python.Review
needs_changeswith 2 medium and 7 low findings. The repair commit (5e331b24) fixes:complete, which the JSON now computes;version_probe.tools/token-report/token_manifest.py:385still derives the hook engine fromhooks AND plugin_hooks.Decision record
None. This PR encodes the existing
layers[9].current_choice; no new selection is made.Host evidence
Not applicable: no
evidence/hosts/change. The Macs can run the same command and record the result by PR.Checklist
🤖 Generated with Claude Code