check the agent id, not just that a server entry exists - #37
Merged
Conversation
Codex's config on this machine carried ECHO_MEMORY_AGENT_ID = "claude-code", written before install.py learned to give each client its own id. `adopt` reported "Codex already registered as codex" and had done so every time it was run, because _has_codex_entry tested only whether the mcp_servers key was present. Every fact Codex wrote would have been filed as claude-code. That is not a cosmetic mislabel: it is exactly the fault that left the v1a cross-tool criterion unable to return a signal for the first eight days of the trial, and it would have gone on reading 0/3 with the second tool writing normally. A presence check that does not check correctness reports a broken install as a healthy one, and it is worse than no check because it is trusted. _codex_state now returns missing / wrong-agent-id / registered, and a wrong id is reported loudly with the corrected TOML block rather than folded into "manual". 406 tests pass, 5 added.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Found the moment Codex became available.
What
adoptwas sayingWhat was actually in
~/.codex/config.tomlWritten before
install.pylearned to give each client its own id, and never corrected — because_has_codex_entrytested only whether themcp_serverskey existed.Why it matters
Every fact Codex wrote would have been filed as
claude-code. That is not a cosmetic mislabel — it is exactly the fault that left the v1a cross-tool criterion unable to return a signal for the first eight days of the trial. The gate would have gone on reading0/3with the second tool writing normally, andadoptwould have gone on confirming everything was fine.A presence check that doesn't check correctness reports a broken install as a healthy one, which is worse than no check because it gets trusted.
The change
_codex_statereturnsmissing/wrong-agent-id/registered. A wrong id gets its own action and is reported loudly with the corrected TOML block, rather than folded into "manual" or hidden behind "already registered":Testing
406 pass, 5 added — wrong id, correct id, entry with no
envblock at all, missing/unparseable config, and the loud render.