Repository navigation
[FEAT] codex gets a plugin, and the protocol did not have to move - #71
Merged
Merged
Conversation
The protocol was designed while looking at claude, so "a third party could implement this" rested on one example — the one the design was fitted to. This is the second, and the result worth reporting is that AIToolKit needed no change at all: no new method, no widened type, no special case. Codex earns its place as the second case by being unlike claude. Its credentials are one file rather than a platform keychain. Its identity comes out of a JWT claim rather than a JSON field. And it has an API-key mode with no user at all, which claude has no analogue for — a real login carrying no email. That reports as plan "api key" with a nil email, because calling it absent would hide an account that works and inventing an email would be worse. listIdentities and showIdentity read the same file here, and that is not an argument against having both. Claude has a cheap source and a costly one; codex has one source and answers both the same way, paying nothing for a distinction it does not need. A protocol that forced the cheap/costly split on every tool would have been fitted to claude in exactly the way this change is testing for. Shipped in every install path — three tarballs, two debs, the install script — but deliberately NOT added to pluginProvidedTools yet. That switch makes codex's identity depend on a binary being present, and the binary has to reach machines first. It is the same sequence claude went through (3.5.4 shipped it, the switch came after), and that sequence was right. The host still reads codex's auth.json for Account.refreshInfo, so two readers of one format exist until that call site moves. Pinned by a parity test rather than trusted, the same as claude's.
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 result worth reporting is a negative one: AIToolKit needed no change at
all. No new method, no widened type, no special case. Nine tests, green on the
first run.
The protocol was designed while looking at claude, so "a third party could
implement this" rested on one example — the one the design was fitted to. This is
the second.
Why codex is the useful second case
Because it is unlike claude:
That last one has no claude analogue. It reports as
plan: "api key"with a nilemail — calling it absent would hide an account that works, and inventing an
email would be worse.
The part that tests for overfitting
listIdentitiesandshowIdentityread the same file here, and that is notan argument against having both.
Claude has a cheap source and a costly one, which is why the split exists. Codex
has one source, answers both the same way, and pays nothing for a distinction
it does not need. A protocol that forced the cheap/costly split on every tool
would have been fitted to claude in exactly the way this change set out to test.
Shipped, deliberately not switched on
Added to every install path — three tarballs, two debs, the install script — but
not added to
pluginProvidedTools.That switch makes codex's identity depend on a binary being present, and the
binary has to reach machines first. It is the same sequence claude went through
(v3.5.4 shipped it; the switch came after), and that sequence was right: doing
both at once would break codex for anyone who had not yet upgraded.
Duplication, pinned not trusted
The host still reads codex's
auth.jsonforAccount.refreshInfo, so tworeaders of one format exist until that call site moves. There is a parity test
asserting the plugin and the host agree about the same directory, the same as
claude's.
Verification
730 tests pass. Also driven by hand against the real binary over the real
protocol, covering all three shapes:
The gap stays in place, which is what keeps every later row paired with the right
directory.
🤖 Generated with Claude Code