Skip to content

refactor(auth): centralize codex oauth ownership in OpenClaw - #68284

Merged
steipete merged 16 commits into
mainfrom
oauth-central-manager-pr
Apr 18, 2026
Merged

steipete merged 16 commits into
mainfrom
oauth-central-manager-pr

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Apr 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • problem: Codex auth ownership was still split between OpenClaw canonical auth, runtime .codex bootstrap/overlay paths, and Codex ambient host auth in codex exec / app-server harness flows.
  • why it matters: OAuth state could drift, health/runtime could disagree, and Codex harness behavior depended on whatever happened to exist in the user's real .codex or host env.
  • what changed: OpenClaw now owns canonical openai-codex auth, .codex is import-only for onboarding/recovery, and both codex-cli plus Codex app-server can run against a generated private CODEX_HOME derived from canonical OpenClaw auth.
  • related upstream work: this builds on the security/auth hardening in [codex] fix(auth): harden OAuth refresh and Codex CLI bootstrap flows #68396 and keeps its stricter identity-copy, refresh-margin, and error-redaction behavior intact.

Change Type

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Root Cause

  • Root cause: we had multiple auth authorities for the same Codex surface. openai-codex login wrote canonical auth, .codex could still influence runtime selection later, and Codex harnesses used ambient host auth instead of the selected OpenClaw profile.
  • Missing guardrail: no explicit ownership model for Codex runtimes, no isolated auth bridge for spawned Codex processes, and no clear separation between one-time import and runtime auth.
  • Contributing context: recent OAuth hardening made the split-brain edges clearer, but did not change the underlying fact that Codex runtimes still consumed host auth outside OpenClaw's control.

Regression Test Plan

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target tests/files:
    • extensions/openai/openai-codex-provider.test.ts
    • extensions/openai/openai-codex-cli-bridge.test.ts
    • extensions/codex/src/app-server/auth-bridge.test.ts
    • extensions/codex/src/app-server/shared-client.test.ts
    • extensions/codex/src/app-server/run-attempt.test.ts
    • extensions/codex/src/app-server/compact.test.ts
    • src/agents/cli-auth-epoch.test.ts
    • src/agents/cli-backends.test.ts
    • src/agents/auth-profiles.external-cli-sync.test.ts
    • src/agents/auth-health.test.ts
    • src/agents/auth-profiles/oauth.openai-codex-refresh-fallback.test.ts
  • Scenario the tests lock in:
    • .codex is not a runtime overlay source for openai-codex
    • the login surface offers explicit one-time Codex CLI import
    • codex-cli uses canonical openai-codex:default via generated CODEX_HOME
    • Codex app-server uses canonical auth via generated CODEX_HOME
    • app-server session bindings preserve authProfileId for resume/compaction
    • profile-owned Codex CLI auth epochs ignore ambient local .codex drift
    • near-expiry canonical OAuth still refreshes before hard expiry

User-visible / Behavior Changes

  • .codex is no longer a normal runtime auth source for openai-codex; it is a one-time import path.
  • openai-codex login now exposes an explicit Import Codex CLI login auth method for onboarding/recovery.
  • codex-cli now defaults to the canonical openai-codex:default profile and runs with an isolated generated CODEX_HOME instead of the user's real .codex.
  • Codex app-server shared/isolated clients, run attempts, and compaction reuse the selected canonical auth profile through the same isolated bridge.
  • .codex is still never written by OpenClaw.

Diagram

Before:
OpenClaw OAuth -> canonical auth-profiles.json
.codex -> runtime bootstrap/overlay side door
codex-cli / app-server -> ambient host auth (.codex/env/keychain)

After:
.codex -> explicit one-time import only
OpenClaw auth-profiles.json -> canonical owner
codex-cli / app-server -> generated private CODEX_HOME from canonical auth

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? Yes
  • New/changed network calls? No
  • Command/tool execution surface changed? Yes
  • Data access scope changed? No
  • Risk + mitigation: spawned Codex processes now receive OpenClaw-derived auth through a generated private auth home instead of ambient host auth. This reduces accidental credential drift and cross-account confusion. .codex remains read-only import input and is never written back.

Repro + Verification

Environment

  • OS: Darwin 25.4.0
  • Runtime/container: Node v24.13.0, pnpm 10.11.1
  • Model/provider: openai-codex OAuth and Codex harness paths
  • Integration/channel: codex-cli, Codex app-server, local .codex

Verified

  • OPENCLAW_LOCAL_CHECK=0 pnpm test extensions/openai/openai-codex-provider.test.ts extensions/openai/openai-codex-cli-bridge.test.ts extensions/codex/src/app-server/auth-bridge.test.ts extensions/codex/src/app-server/shared-client.test.ts extensions/codex/src/app-server/run-attempt.test.ts extensions/codex/src/app-server/compact.test.ts src/agents/cli-auth-epoch.test.ts src/agents/cli-backends.test.ts src/agents/auth-profiles.external-cli-sync.test.ts src/agents/auth-health.test.ts src/agents/auth-profiles/oauth.openai-codex-refresh-fallback.test.ts
  • pnpm plugin-sdk:api:gen
  • OPENCLAW_LOCAL_CHECK=0 pnpm build
  • pnpm exec oxfmt --check ... on the touched files

Notes

  • scripts/committer/repo-wide pnpm check is still blocked by unrelated generated-file drift in apps/macos/Sources/OpenClaw/HostEnvSecurityPolicy.generated.swift, so I used scoped verification plus FAST_COMMIT=1 for the final commit.
  • the build initially failed in this worktree because sparse checkout excluded ui/; I expanded the sparse set to include ui/ and reran the full build successfully.

Human Verification

  • Verified that Codex CLI and Codex app-server can now derive auth from canonical OpenClaw OAuth instead of ambient .codex.
  • Verified that runtime .codex overlay behavior for openai-codex is gone and health/runtime now reflect canonical auth only.
  • Verified that the near-expiry refresh margin from [codex] fix(auth): harden OAuth refresh and Codex CLI bootstrap flows #68396 still applies after the manager refactor.
  • Did not verify a live real-service Codex harness roundtrip on this branch after the full bridge refactor; the previous live login probe was done before the final ownership changes.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No
  • Upgrade note: users with an existing .codex login now need to explicitly import it into OpenClaw once if they want OpenClaw to own that session.

Risks and Mitigations

  • Risk: Codex runtime behavior now depends on the generated bridge auth home instead of ambient host auth.
    • Mitigation: added dedicated bridge tests plus harness/session-binding coverage.
  • Risk: stale .codex expectations from earlier code paths could confuse reviewers/users.
    • Mitigation: explicit import auth method, PR/body update, and removal of runtime overlay behavior from openai-codex.
  • Risk: plugin-sdk export changes could drift.
    • Mitigation: regenerated docs/.generated/plugin-sdk-api-baseline.sha256 and passed the d.ts build.

@vincentkoc vincentkoc self-assigned this Apr 17, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling extensions: openai size: XL maintainer Maintainer-authored PR labels Apr 17, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review April 17, 2026 21:59
@vincentkoc
vincentkoc requested a review from a team as a code owner April 17, 2026 21:59
@aisle-research-bot

aisle-research-bot Bot commented Apr 17, 2026 •

Copy link
Copy Markdown

🔒 Aisle Security Analysis

We found 3 potential security issue(s) in this PR:

# Severity Title
1 🟠 High OAuth credential confusion: identity-less profiles can adopt/mirror another account's tokens via main-store sharing
2 🟡 Medium Auth profile mismatch not enforced when resuming Codex thread binding (potential cross-account thread access)
3 🟡 Medium Credential mix-up risk: CODEX_HOME isolation uses truncated SHA-256 of authProfileId (64-bit)
1. 🟠 OAuth credential confusion: identity-less profiles can adopt/mirror another account's tokens via main-store sharing
Property Value
Severity High
CWE CWE-284
Location src/agents/auth-profiles/oauth-shared.ts:135-152

Description

The new OAuth identity adoption/mirroring logic allows cross-account credential adoption when the existing credential has no identity metadata (accountId/email).

In isSafeToAdoptMainStoreOAuthIdentity, if the local/sub-agent credential has no identity, the function returns true, permitting adoption of the main store's credential purely based on provider equality. This means a process that can write an identity-less OAuth entry for a shared profileId (e.g., openai-codex:default) can then:

  • Adopt the main store's OAuth access/refresh tokens into its own agent store (adoptNewerMainOAuthCredential, and inside the refresh lock path)
  • Mirror its refreshed credential back into the main store even when the main store entry is also identity-less, effectively poisoning the main store for other agents

This is a broken authorization/identity-binding boundary if multiple tenants/users share the same OS account or otherwise share the same main auth store but are expected to be isolated by agentDir.

Vulnerable logic:

  • isSafeToAdoptMainStoreOAuthIdentity: treats missing identity on existing as safe to adopt
  • mirrorRefreshedCredentialIntoMainStore: uses that same check before overwriting the main store
if (!hasOAuthIdentity(existing)) {
  return true;
}

Impact:

  • Cross-account token adoption between agents sharing a profileId
  • Potential privilege escalation/account confusion and main-store credential poisoning

Recommendation

Require positive identity binding (accountId/email) before adopting from or mirroring into the main store.

Safer options:

  1. Do not adopt/mirror when existing lacks identity, unless an out-of-band binding exists (e.g., agentDir ownership/tenant ID, or a stored subject/issuer claim):
export function isSafeToAdoptMainStoreOAuthIdentity(existing: OAuthCredential | undefined, incoming: OAuthCredential): boolean {
  if (!existing || existing.type !== "oauth") return false;
  if (existing.provider !== incoming.provider) return false;
  if (!hasOAuthIdentity(existing) || !hasOAuthIdentity(incoming)) return false; // require identity on both
  return hasMatchingOAuthIdentity(existing, incoming);
}
  1. Alternatively, namespace profileIds by tenant/user (avoid shared openai-codex:default across tenants) and/or store a non-spoofable binding in the credential record (e.g., OS user id, tenant id).

Also apply the same stricter rule in mirrorRefreshedCredentialIntoMainStore to prevent main-store poisoning.

2. 🟡 Auth profile mismatch not enforced when resuming Codex thread binding (potential cross-account thread access)
Property Value
Severity Medium
CWE CWE-863
Location extensions/codex/src/app-server/thread-lifecycle.ts:45-70

Description

When resuming an existing Codex app-server thread, the code allows a caller-provided authProfileId to override the authProfileId stored in the persisted session binding without any mismatch check.

  • Input: params.params.authProfileId (runtime request)
  • State: binding.authProfileId from the persisted session binding file
  • Behavior: on resume, the code chooses params.params.authProfileId ?? binding.authProfileId and then writes it back to the binding alongside the existing threadId
  • Missing control: no check that a requested authProfileId matches the binding’s original authProfileId (contrast with maybeCompactCodexAppServerSession, which fails closed on mismatch)

If an attacker can influence authProfileId for a run attempt while pointing at a session file created under a different profile, the process will attempt to resume the existing threadId using a different profile’s credentials (via the auth bridge) and will update the binding accordingly. Depending on upstream Codex authorization semantics, this can enable cross-account thread access or at least cause identity confusion and session takeover within shared environments.

Vulnerable code:

const boundAuthProfileId = params.params.authProfileId ?? binding.authProfileId;
await writeCodexAppServerBinding(params.params.sessionFile, {
  threadId: response.thread.id,
  cwd: params.cwd,
  authProfileId: boundAuthProfileId,
  ...
});

Recommendation

Enforce binding/profile consistency when a binding already exists.

  • If binding.authProfileId is set and params.params.authProfileId is provided, require them to match.
  • If they don’t match, fail closed (do not resume the thread and do not rewrite the binding). Require explicit user action to “migrate” or start a new thread.

Example fix:

const requested = params.params.authProfileId?.trim() || undefined;
const bound = binding.authProfileId?.trim() || undefined;

if (requested && bound && requested !== bound) {
  throw new Error("auth profile mismatch for session binding");
}

const effectiveAuthProfileId = requested ?? bound;
​// proceed to resume and write effectiveAuthProfileId

Also consider applying the same check earlier in runCodexAppServerAttempt after reading the binding, for consistent behavior across code paths.

3. 🟡 Credential mix-up risk: CODEX_HOME isolation uses truncated SHA-256 of authProfileId (64-bit)
Property Value
Severity Medium
CWE CWE-359
Location extensions/codex/src/app-server/auth-bridge.ts:32-35

Description

CODEX_HOME is derived from a truncated SHA-256 digest of authProfileId (first 16 hex chars = 64 bits). Two different profile IDs that collide on this 64-bit prefix will be mapped to the same directory, causing them to share the same auth.json.

Impact:

  • A colliding profile can overwrite another profile’s auth.json (token substitution).
  • A colliding profile can potentially read/use another profile’s tokens via the shared CODEX_HOME directory, leading to cross-profile credential disclosure and authentication mix-up.

This affects both:

  • extensions/codex/src/app-server/auth-bridge.ts (harness-auth/codex/<digest>)
  • extensions/openai/openai-codex-cli-bridge.ts (cli-auth/codex/<digest>)

Vulnerable code:

const digest = crypto.createHash("sha256").update(profileId).digest("hex").slice(0, 16);
return path.join(agentDir, "harness-auth", "codex", digest);

Although accidental collisions are unlikely, intentional collisions against a 64-bit truncated hash are within reach of a determined attacker (~2^32 work). If authProfileId can be influenced by an untrusted party in a shared agentDir / multi-tenant environment, this becomes a practical cross-tenant token leak.

Recommendation

Avoid truncating the digest used for isolation, or include additional namespace and verification.

Preferred: use the full SHA-256 hex (256-bit) as the directory name:

function resolveCodexBridgeHome(agentDir: string, profileId: string): string {
  const digest = crypto.createHash("sha256").update(profileId).digest("hex");
  return path.join(agentDir, "harness-auth", "codex", digest);
}

Additional hardening options:

  • Include the profileId (or provider + profileId) inside auth.json and verify it matches before reuse.
  • Consider using a safe encoding of profileId directly (e.g., base64url) if path-length constraints allow.
  • If multiple principals can write to the same agentDir, enforce per-principal directory separation and permissions.

Analyzed PR: #68284 at commit 2c4fde7

Last updated on: 2026-04-18T20:31:17Z

@greptile-apps

greptile-apps Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extracts a central OAuthManagerAdapter/createOAuthManager lifecycle boundary from the previously spread-out OAuth helpers, delegating provider-specific refresh/bootstrap/identity hooks via injection. The Codex CLI importer bootstrap-precedence fix is correct and well-tested. Two issues in the new oauth-manager.ts deserve attention before merging:

  • adoptNewerMainOAuthCredential adopts an expired main-store credential: the pre-lock adoption checks Number.isFinite(mainCred.expires) and recency, but not hasUsableOAuthCredential(mainCred). The inside-lock adoption in doRefreshOAuthTokenWithLock explicitly checks usability; this path should be consistent.
  • Uncaught retry error bypasses recovery: in the isRefreshTokenReusedError branch, if the second refreshOAuthTokenWithLock call throws, the error exits the outer catch block, skipping both the main-store credential inheritance fallback and OAuthManagerRefreshError wrapping.

Confidence Score: 3/5

Hold for the two logic gaps in oauth-manager.ts before merging.

The P1 (uncaught retry error bypassing main-store fallback) and P2 (expired credential adoption inconsistency) are both present defects in the new centralized path. The P1 silently skips a recovery step that the original catch block logic intends to always execute, and the inconsistency between the pre-lock and inside-lock adoption paths creates a correctness gap that could cause unnecessary store writes and future confusion.

src/agents/auth-profiles/oauth-manager.ts — both findings are in adoptNewerMainOAuthCredential and resolveOAuthAccess.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/agents/auth-profiles/oauth-manager.ts
Line: 218-224

Comment:
**Pre-lock adoption missing usability check**

`adoptNewerMainOAuthCredential` adopts the main-store credential when its `expires` timestamp is finite and newer than the local one, but never checks `hasUsableOAuthCredential(mainCred)`. The inside-lock adoption path in `doRefreshOAuthTokenWithLock` (lines 347–351) does check `hasUsableOAuthCredential(mainCred)`, creating an inconsistency.

Concretely: if the local credential has `expires = undefined` (or any non-finite value), the condition `!Number.isFinite(params.credential.expires)` is `true`, so any main-store credential with a finite `expires` (even one already expired) will be adopted and written to the local store. The local credential is then overwritten with an unusable one right before the refresh path.

```suggestion
      if (
        mainCred?.type === "oauth" &&
        mainCred.provider === params.credential.provider &&
        hasUsableOAuthCredential(mainCred) &&
        Number.isFinite(mainCred.expires) &&
        (!Number.isFinite(params.credential.expires) ||
          mainCred.expires > params.credential.expires) &&
        adapter.isSafeToCopyOAuthIdentity(params.credential, mainCred)
      ) {
```

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: src/agents/auth-profiles/oauth-manager.ts
Line: 519-531

Comment:
**Retry throw bypasses main-store fallback and `OAuthManagerRefreshError` wrapping**

When `refreshOAuthTokenWithLock` (the retry on line 523) throws, the exception exits the surrounding `catch` block immediately. This means:
1. The main-store credential inheritance path (lines 532–557) is silently skipped.
2. The error is never wrapped in `OAuthManagerRefreshError`, so callers that check `error instanceof OAuthManagerRefreshError` (e.g., `oauth.ts` line 471) fall to the branch that reloads the store fresh, missing the chance to inherit a valid credential from the main agent store.

The retry should be wrapped so an uncaught throw doesn't escape the recovery block:

```typescript
try {
  const retried = await refreshOAuthTokenWithLock({
    profileId: params.profileId,
    provider: params.credential.provider,
    agentDir: params.agentDir,
  });
  if (retried) {
    return retried;
  }
} catch {
  // retry also failed; fall through to main-store fallback below
}
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Merge branch 'main' into oauth-central-m..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97daa41683

ℹ️ 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2bf852569

ℹ️ 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".

@vincentkoc
vincentkoc force-pushed the oauth-central-manager-pr branch from d2bf852 to 4d87f4b Compare April 18, 2026 13:49
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex labels Apr 18, 2026
@vincentkoc vincentkoc changed the title fix(auth): centralize oauth lifecycle manager refactor(auth): centralize codex oauth ownership in OpenClaw Apr 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d87f4b26c

ℹ️ 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".

Comment thread src/agents/cli-runner/prepare.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df4c2aa112

ℹ️ 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".

@vincentkoc

Copy link
Copy Markdown
Member Author

follow-up fix pass is up in 4edc9be.

addressed in this push:

  • bootstrap adoption now distinguishes strict store overwrite from external bootstrap recovery, so identity-less CLI OAuth can still rescue unusable local state without reopening main-store poisoning.
  • refresh now uses the adopted external credential when bootstrap supplies a newer refresh token.
  • codex-cli auth epoch only drops ambient local fingerprints when a profile-owned bridge was actually prepared.
  • Codex bridge auth files are now written through a private atomic writer with owner-only perms and symlink rejection.
  • app-server compaction now fails closed on auth-profile mismatch instead of trusting a tampered binding.

verification run on this branch:

  • pnpm test src/infra/secret-file.test.ts src/agents/cli-runner/prepare.test.ts src/agents/auth-profiles/oauth-manager.test.ts src/agents/auth-profiles/oauth.openai-codex-refresh-fallback.test.ts src/agents/cli-auth-epoch.test.ts
  • pnpm test extensions/codex/src/app-server/auth-bridge.test.ts extensions/codex/src/app-server/compact.test.ts extensions/openai/openai-codex-cli-bridge.test.ts
  • pnpm plugin-sdk:api:gen
  • pnpm exec oxlint ...
  • pnpm exec oxfmt --check ...
  • OPENCLAW_LOCAL_CHECK=0 pnpm build

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3505c64ace

ℹ️ 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27d0028175

ℹ️ 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".

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Apr 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c771bb9a4

ℹ️ 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c6d4ab9fc

ℹ️ 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12f1aa9b17

ℹ️ 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".

await writeCodexAppServerBinding(params.params.sessionFile, {
threadId: response.thread.id,
cwd: params.cwd,
authProfileId: params.params.authProfileId,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve inherited auth profile on replacement thread start

When a run request omits authProfileId, runCodexAppServerAttempt can still launch the app-server using the previously bound profile, but if startOrResumeThread falls back to thread/start (for example after a stale thread resume failure or dynamic-tools fingerprint reset) this path writes authProfileId from params.params.authProfileId directly. In that case the new binding is persisted without the inherited profile, so later resume/compaction calls can silently fall back to openai-codex:default and run the same session under a different auth context.

Useful? React with 👍 / 👎.

globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
Heetisk pushed a commit to Heetisk/openclaw that referenced this pull request Sep 28, 2026
Heetisk pushed a commit to Heetisk/openclaw that referenced this pull request Sep 28, 2026
Heetisk pushed a commit to Heetisk/openclaw that referenced this pull request Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: codex extensions: openai gateway Gateway runtime maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants