Skip to content

check the agent id, not just that a server entry exists - #37

Merged
ayushcodes10 merged 1 commit into
mainfrom
fix/adopt-checks-agent-id
Sep 2, 2026
Merged

check the agent id, not just that a server entry exists#37
ayushcodes10 merged 1 commit into
mainfrom
fix/adopt-checks-agent-id

Conversation

@ayushcodes10

Copy link
Copy Markdown
Owner

Found the moment Codex became available.

What adopt was saying

Codex            already registered  as codex

What was actually in ~/.codex/config.toml

[mcp_servers.echo-memory.env]
ECHO_MEMORY_AGENT_ID = "claude-code"

Written before install.py learned to give each client its own id, and never corrected — because _has_codex_entry tested only whether the mcp_servers key 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 reading 0/3 with the second tool writing normally, and adopt would 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_state returns missing / 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":

! Codex            registered, but its ECHO_MEMORY_AGENT_ID is not 'codex'
  Every fact it writes is filed under the wrong tool. Fix /Users/…/.codex/config.toml:

Testing

406 pass, 5 added — wrong id, correct id, entry with no env block at all, missing/unparseable config, and the loud render.

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.
@ayushcodes10
ayushcodes10 merged commit e1d978c into main Sep 2, 2026
2 checks passed
@ayushcodes10
ayushcodes10 deleted the fix/adopt-checks-agent-id branch September 2, 2026 12:49
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant