feat: add Grok as a --guest runtime for Codex $cc commands - #19
Closed
CBEPX wants to merge 1 commit into
Closed
Conversation
Codex can now run Grok instead of Claude Code via `--guest grok` or `CC_GUEST=grok`. The default guest remains Claude. Grok turns use `grok --prompt-file` with `--output-format json` and a read-only tool allowlist for reviews. Claude MCP tools stay Claude-only.
4 tasks
Owner
Author
|
Superseded by #36 — same Grok-guest feature, rebased onto v1.7.3. This branch was cut from v1.6.1 and is DIRTY against current main. |
Owner
Author
|
Closing in favor of #36. |
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
Add an opt-in Grok guest path to the Codex-hosted Claude Code companion so
$cc:review,$cc:adversarial-review,$cc:rescue, and$cc:setupcan run Grok instead of Claude Code.--guest <claude|grok>flag (default claude).CC_GUESTis the env fallback; the CLI flag wins.grok --prompt-file … --output-format json --always-approve, notclaude -pand notcodex exec.read_file,grep,list_dir,web_search,web_fetch.--guest grokis set.--user-mcp-tool/--allow-project-mcp-serversstay Claude-only and error on--guest grok.opus. Omit--modelto use Grok's default, or pass a Grok model ID.Please review this PR with Codex and Claude. Do not merge until both reviews land.
Test plan
npm testin the worktree: 792/792 pass (770 previous + 22 new guest/grok-cli/companion tests)npm run typechecknpm run lintgrokcoverage is intests/grok-cli.test.mjs; live$cc:review --guest grok --waitis intentionally not run here (paid API)Hermetic coverage added:
resolveGuestdefault / env / override / rejectionbuildGrokArgsuses--prompt-file+ json, never Claudestream-json/--allowedToolsrunGrokTurnwrites the prompt file and parses{ text, sessionId, modelUsage }--helpdocuments--guestreview --guest chatgptfails withUnsupported guestbefore git/Claude