Repository navigation
feat(account): read Codex's account domain from auth.json - #398
Merged
Merged
Conversation
Codex sat in "Accounts with no domain", because its session file holds only IDs, so the Identity page could not say whether its account was personal. In the case this feature exists for, that is the question. The maintainer decided to read the sign-in file to answer it. Only the `email` claim of `id_token` is read and only the domain is kept, with source `codex_auth`. Nothing else in the file is copied, stored, logged or sent, and an error carries no content from it. The signature is not checked, so this is what the file says, not proof of who made a call. An API-key sign-in reports no domain, and AGENTMETRY_CODEX_AUTH_DOMAIN=0 turns it off. This reverses "auth.json is never read", which the code and docs from #395 said, so those now say what happens. The cost is real: the hook loads a file holding live tokens on every Codex tool call, and endpoint security tools may flag that read. It should be reconsidered as opt-in before a public release or a pilot. The Identity view also lost a domain row's IDs when another agent reported that domain first, so Codex's IDs now survive joining a row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Codex sits in "Accounts with no domain", because its session file holds only IDs, so the Identity page cannot say whether its account is personal. The maintainer decided on 2026-11-07 to read its sign-in file to answer that.
Review this one carefully: it makes a security sensor read a file holding live credentials.
What it reads
From
auth.jsonunderCODEX_HOMEor~/.codex:emailclaim oftokens.id_token, and only whenauth_modeischatgpt.codex_auth. The full address follows the existingAGENTMETRY_LOG_ACCOUNT_EMAIL=1opt-in.The signature is not checked, so this is what the file says, not proof of who made a call. An API-key sign-in reports no domain.
AGENTMETRY_CODEX_AUTH_DOMAIN=0turns it off.The cost
auth.jsonis never read" from feat(dashboard): add an Identity section, with Codex and Antigravity accounts #395. The code, schema doc and changelog are updated. A search of the README, docs and site found no other page making that promise.It is on by default for now. Reconsider making it opt-in before a public release or a pilot.
Also fixed
The Identity view lost a domain row's IDs when another agent reported that domain first, so Codex's IDs now survive joining a row.
Checks
Run from this branch on Windows:
pytest -q: 2287 passed, 7 skippedruff check agentmetry tests: cleanagentmetry benchmark: 0 missed, 0 false positives15846a0915769d4a, with no frozen file touchedNot proven
🤖 Generated with Claude Code