doctor: report every agent, not just Codex - #364
Merged
Conversation
The runtime half described one agent. The invocation log has been partitioned per agent since it learned to record one, and the finding rules take the agent as a parameter — only the collection and the rendering singled Codex out. So a machine running Claude Code got a detailed report about the agent it uses less and nothing about the one it uses most. Doctor now walks a list of agents, each contributing install state, its own slice of the hook log, adoption from its own transcripts, and its own findings, tagged so a reader can tell whose is whose. Adding an agent is now the cost of one probe entry; the rules, the log partition, and the renderer are already generic. Claude Code gains the two readers Codex already had. Inspect covers the hooks in settings.local.json, the MCP stanza in ~/.claude.json, and the rule block in ~/.claude/CLAUDE.md, reusing this package's own path helpers so a file the adapter writes and a file the reporter looks for cannot drift. The transcript scanner reads assistant messages' tool_use parts; a native Read/Grep/Glob counts in the same denominator as a shell read, because it is the same competing behaviour. Only Codex carries the trust gate, so only Codex gets the /hooks remedy — the rules already handled that distinction, it just had no second agent to prove it against.
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.
The runtime half of
doctordescribed one agent. The invocation log has been partitioned per agent since it learned to record one, and the finding rules take the agent as a parameter — only the collection and the rendering singled Codex out. So a machine running Claude Code got a detailed report about the agent it uses less and nothing about the one it uses most.Doctor now walks a list of agents, each contributing install state, its own slice of the hook log, adoption from its own transcripts, and its own findings, tagged so a reader can tell whose is whose. Adding an agent is now the cost of one probe entry; the rules, the log partition, and the renderer are already generic.
Claude Code gains the two readers Codex already had.
Inspectcovers the hooks insettings.local.json, the MCP stanza in~/.claude.json, and the rule block in~/.claude/CLAUDE.md, reusing this package's own path helpers so a file the adapter writes and a file the reporter looks for cannot drift. The transcript scanner reads assistant messages'tool_useparts; a native Read/Grep/Glob counts in the same denominator as a shell read, because it is the same competing behaviour.Only Codex carries the trust gate, so only Codex gets the
/hooksremedy — the rules already handled that distinction, it just had no second agent to prove it against.Why this is a separate PR
This commit was pushed to
fix/doctor-mixed-attribution-and-redactabout thirty minutes after #353 had already merged. A merged PR does not reopen on a push to its head branch, so the change was never proposed anywhere and never reachedmain. Cherry-picked here onto currentmain, unchanged — identical patch-id to the original.Verification
go vetandgo testpass for both touched packages: