[codex] Fix Claude Code auth preflight for Codex host#1767
Open
spacegeologist wants to merge 1 commit into
Open
[codex] Fix Claude Code auth preflight for Codex host#1767spacegeologist wants to merge 1 commit into
spacegeologist wants to merge 1 commit into
Conversation
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.
Summary
Fix the Codex-hosted
gstack-claudeskill so it does not reject a working Claude Code install just because$HOME/.claude/.credentials.jsonis absent.With increased use of Codex, I have been experimenting heavily with the gstack setup and trying to smooth out the Codex <-> Claude Code handoff. This came from that dogfooding:
claude -pworks in the host environment even when.credentials.jsonis absent.Root Cause
The generated Codex skill preflighted Claude authentication by probing an implementation detail:
$HOME/.claude/.credentials.jsonorANTHROPIC_API_KEY. Modern Claude Code auth may be stored in OS Keychain or another host-managed location, so credential-file probing can false-negative before the skill ever invokes Claude.Fix
.credentials.jsonauthentication preflight.claude -pinvocation as the real auth check.is_errorstill surfacesCLAUDE_ERROR: true, and auth/login failures also surfaceCLAUDE_AUTH_ERROR: true..credentials.jsonprobing.Safety Boundary
The safety boundary is unchanged:
Read,Grep,GlobBash,Edit, andWriteremain disallowedValidation
claude -p "Reply with exactly OK." --output-format json --disable-slash-commands --tools ""returnedresult: "OK"when run with host auth/keychain access.bun test test/gen-skill-docs.test.ts -t "Codex output includes Claude outside-voice skill"bun run scripts/gen-skill-docs.ts --host codex --dry-rungit diff --check