Enable Codex account-authenticated runs - #253
Conversation
|
@codex review |
|
@claude review |
|
@cursor review |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_2f400543-7d33-49a8-adfa-0abef6ba4572) |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
🟡 Changes recommended
There’s a verified edge-case bug around whitespace-only API keys preventing the intended account-auth fallback, plus a test assertion that can pass even if apiKey is inadvertently included as undefined.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Enables running Codex locally using an existing signed-in Codex CLI profile (when no API key env vars are set), updates viability/preflight checks to recognize that profile, bumps the bundled Codex SDK to a version that can run the new default model, and sets the default local Codex model accordingly.
Changes:
- Allow Codex local runs to omit
apiKeyso the Codex CLI can use account-auth (CODEX_HOMEprofile), and teach driver viability checks to detectauth.json. - Update default Codex model to
gpt-5.6-sol. - Bump
@openai/codex-sdkto0.149.1and update tests/docs for the new credential shape.
File summaries
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates lockfile entries for the newer @openai/codex(-sdk) versions. |
| packages/driver/src/viability.ts | Adds Codex account-auth detection to viability checks via auth.json. |
| packages/driver/src/viability.test.ts | Adds regression coverage for Codex account-auth viability and deps wiring. |
| packages/driver/src/fallback-hop.test.ts | Updates viability deps stubs to include the new codexAccountAuthExists port. |
| packages/driver/src/assign.test.ts | Updates viability deps stubs to include the new codexAccountAuthExists port. |
| packages/core/src/default-wiring.ts | Changes the default Codex model id to gpt-5.6-sol. |
| packages/codex-runner/src/local-runner.ts | Conditionally supplies apiKey only when present, enabling account-auth fallback. |
| packages/codex-runner/src/local-runner.test.ts | Adjusts tests to validate the account-auth/no-apiKey option shape. |
| packages/codex-runner/README.md | Documents the new behavior and SDK version/capability gaps reference. |
| packages/codex-runner/package.json | Bumps @openai/codex-sdk dependency to 0.149.1. |
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
- Files reviewed: 9/10 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 401150fadc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
🟡 Changes recommended
Codex account-auth detection may fail on Windows because the executable resolver doesn’t consider common .cmd/.bat PATH shims, leading to false “not signed in” results.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
- Files reviewed: 17/18 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5e53cb582
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
🔵 Needs a closer look
It modifies authentication behavior and expands sandbox write roots for Git metadata, which warrants final human review for security and operational correctness.
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
packages/codex-runner/src/local-runner.ts:166
linkedWorktreeWriteDirectories(input.cwd)can throw for malformed or unexpected.gitpointer layouts, but that exception is currently caught and rethrown asAgentRunFailedError("Codex construction failed"), which obscures the real failure mode (worktree/Git metadata validation). Consider catching around the directory-derivation call and throwing a more specificAgentRunFailedErrorso users get an actionable message while still rejecting unsafe layouts.
function buildThreadOptions(
input: AgentRunInput,
): NonNullable<Parameters<Codex["startThread"]>[0]> {
return {
additionalDirectories: linkedWorktreeWriteDirectories(input.cwd),
approvalPolicy: "never",
sandboxMode: resolveSandboxMode(),
skipGitRepoCheck: false,
workingDirectory: input.cwd,
...(input.model.id.length > 0 && { model: input.model.id }),
};
- Files reviewed: 21/22 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07a4e1e84d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are consistent with the PR’s stated goals and include targeted regression tests covering the new auth and linked-worktree behaviors.
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
- Files reviewed: 21/22 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34205a11af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
🔵 Needs a closer look
A new failure mode from linked-worktree detection can currently surface as a generic “Codex construction failed” message, which is likely to be confusing and should be made more specific.
Review details
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
packages/codex-runner/src/local-runner.ts:160
linkedWorktreeWriteDirectories()can throw (e.g., malformed.gitpointer), but because it’s called insidebuildThreadOptions()and that’s executed within thetrythat wraps Codex construction, the user-facing error becomes a generic "Codex construction failed" with the real cause only in.cause. Consider catching and rethrowing with a more specific message so failures are diagnosable without inspecting nested causes.
function buildThreadOptions(
input: AgentRunInput,
): NonNullable<Parameters<Codex["startThread"]>[0]> {
return {
additionalDirectories: linkedWorktreeWriteDirectories(input.cwd),
- Files reviewed: 21/22 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
@claude review |
|
@cursor review |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_d666e9b3-1a19-487c-a3dc-70f8a9561f02) |
|
Claude finished @itsHabib's task in 2m 53s —— View job Claude's Review
SummaryThis is a well-structured PR with correct security decisions throughout. The iterative review process was effective — the stale Auth flow: correct
The final design is correct:
One note:
The
One style observation: Linked worktree sandbox: tight
The path validation is thorough:
Lines 55–57 make two separate
|
|
Reviewer: claude |
Summary
Ship could not use an existing Codex ChatGPT login and its
workspace-writesandbox could not commit from linked worktrees because their Git metadata lives outside the checkout. This change admits file- and keyring-backed Codex account auth, moves the default togpt-5.6-sol, updates the bundled SDK, and grants only the linked-worktree Git stores required for a bounded repair commit.What this adds
Signed-in Codex execution:
apiKeyoption whenCODEX_API_KEYandOPENAI_API_KEYare absent or blank, allowing the CLI to use its isolatedCODEX_HOMElogincodex login status, so the CLI's active file or keyring store remains authoritativeBounded linked-worktree commits:
workspace-writerefsand/orreftable), and optional reflogs as writable rootsCurrent Codex runtime:
gpt-5.6-sol@openai/codex-sdkfrom0.142.3to0.149.1Regression coverage:
Validation
make checkat exact headba053967f3e35da3ecac13e85bdd433a35d09c72PATHwf_01M0YF167MMAFH0TNJPD6YR2EP, providercodex, runtimelocal, modelgpt-5.6-sol, duration 94,883 msgnt_20260826T082017Z_61c7a053866efc1f, Ship workflowwf_01M0YJJ0MYN9B30KJGSXT1ADJ4, all required stages through audit, clean candidate5d85f6430de9ad129af1d7b6bd30d0ac14ec5c53pass/T0d89223937dbc7414f1a664299acf9232c4568be4ba87c27d8adf51959866c04bauth.jsonwas removed before trace grading and evidence retentionResidual review judgment
Copilot's final exact-head summary generated no new inline comments and repeated one suppressed P2 suggestion: expose malformed linked-worktree metadata with a more specific top-level error than
Codex construction failed. The underlying cause is preserved, malformed layouts are still rejected, and the concern does not alter auth, sandbox, or commit correctness. Per the repository's two-fix-round ceiling, this residual diagnosability improvement is deferred to Gate's judge rather than creating another review head.Claude and Cursor review requests did not produce completed reviews because those seats are unavailable. They are not represented here as completed review evidence; Gate must evaluate the missing-panel condition within the operator's grant ceiling.