Skip to content

fix(agents): use ChatGPT routes for isolated Codex completions - #168552

Merged
obviyus merged 4 commits into
mainfrom
fix/isolated-admitted-route
Oct 10, 2026
Merged

obviyus merged 4 commits into
mainfrom
fix/isolated-admitted-route

Conversation

@obviyus

@obviyus obviyus commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: isolated and utility completions can require an OpenAI API key even when the selected model is available through the user's ChatGPT sign-in.

Related: #168033.

User Impact

User impact: Codex utility completions can use the same subscription route as the model picker. Explicit auth profiles and utility-model overrides remain in force. A missing pinned profile fails instead of using another account.

Why This Change Was Made

The status path used the first logical catalog row. Dispatch used the resolved model's transport. Either row could describe the Platform API, while a separate physical row described the available ChatGPT route.

Both paths now pass the catalog's physical routes to the existing auth planner through the same catalog view used by foreground runs. Dispatch reads the published catalog captured at admission. It keeps the existing model transport when no catalog route is available. No new route selector, config field, or stored state is added.

The isolated-session contract in #159246 is unchanged; its changes in this file concern the documented isolation boundary, not auth route selection.

Evidence

  • On baseline 0a687e8e01d, both route-order cases fail through runIsolatedCompletion with No route-compatible authentication source is configured for openai.
  • With this fix, both orders select the subscription route, display the Codex runtime, and dispatch to the isolated harness with the subscription profile. The harness returns text through the real completion entry point. A missing pinned profile does not dispatch.
  • The focused completion and plugin-scope suites pass: 56 tests. These include utility-model overrides, CLI profile selection, quota rotation, cancellation, and authority lifetime controls.
  • The final focused regression in src/agents/isolated-completion-route.test.ts passes both route orders. The agent-root TypeScript check and changed-source lint pass.

The original route-order regression uses a synthetic catalog and mocked dispatch. The additional adapter-boundary regression below covers native login and inference serialization without contacting ChatGPT.

Adapter boundary proof

The permanent plugin-owned adapter regression drives the real runIsolatedCompletion and auth planner through the existing test-only SDK barrel into the real Codex harness/client and a stdio JSON-RPC executable. The core-only test fixture keeps bundled plugin implementation files out of core TypeScript graphs.

  • Allowed: ChatGPT route is second behind Platform. The scoped synthetic account reaches account/login/start exactly once, then turn/start; completion returns Completed as synthetic-allowed-account. Redacted transcript.
  • Nearest forbidden: a stored OAuth account explicitly pinned against config declaring that profile API-key-only is rejected by real eligibility policy; zero RPC messages. Transcript.
  • Revoked: remove the allowed profile and revoke caller authority while the real model-materialization await is held; release it and observe rejection before any RPC, including login/inference. Transcript.

All three moved cases pass (23.8 s test time; 78.8 s including cold transformation). Core-agent and extension-test TypeScript checks and targeted lint pass. check-changed passes extension/core-import and SDK boundary checks, then stops only at the known UI E2E root budget (722/720). Merged current origin/main, including its managed-cleanup lint fix. Synthetic principals and isolated state only; no live ChatGPT request, real credentials, user Gateway, or default login. Admission/catalog inputs and the deferred model resolver are fixture-controlled; auth planning, profile scoping, native serialization, process transport, and result handling are real. No production execution changes.

Merge danger: two-way door. Reverting the patch fully restores the old behavior; it writes no state. The blast radius is auth planning for harness-owned isolated completions and their runtime labels when a model has multiple physical catalog routes.

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@obviyus
obviyus marked this pull request as ready for review October 10, 2026 17:11
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S labels Oct 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR lets isolated Codex completions plan authentication from all physical catalog routes instead of a single Platform route.

Example: The catalog lists openai/gpt-test on Platform and ChatGPT, and only openai:allowed OAuth credentials are configured.

  • Before: The isolated completion rejects authentication because the resolved model describes the Platform route.
  • After: The completion selects the ChatGPT route and returns Completed as synthetic-allowed-account.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused repair with inspected adapter-boundary authority evidence and no actionable finding; fixture-controlled admission and transport responses limit end-to-end confidence.
Proof confidence 🦐 gold shrimp (3/6) Sufficient (logs): Inspected adapter transcripts exercise runIsolatedCompletion, real route/auth planning, the Codex harness/client, and stdio JSON-RPC in isolated synthetic state: the allowed account logs in and returns completion text, while forbidden and revoked authority emit no RPC. This satisfies the scoped authority-boundary proof; it does not establish live provider acceptance.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A utility completion can demand an OpenAI API key even though the selected model is available through the user's ChatGPT sign-in.
Reason: It completes an explicitly identified gap in the merged foreground repair and preserves pinned accounts and utility overrides.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes an isolated-completion routing defect still present on current main, and no actionable introduced bug was found.

Priority: P2
Reviewed head: 408cc759db6741b58063d348a765d0ff1a2c347f

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied proof covers the production adapter boundary with synthetic admission and a fake app server, rather than a full Gateway or live ChatGPT request.
Agent review details

How this fits together

Utility and isolated requests enter the shared completion owner, which combines captured catalog routes with account policy and dispatches a scoped authorization plan to the selected harness.

flowchart TD
  A[Utility completion request] --> B[Prepared runtime admission]
  B --> C[Captured physical catalog routes]
  C --> D[Existing authentication planner]
  D --> E[Scoped Codex authorization]
  E --> F[App server login and inference]
  F --> G[Completion text]
Loading

Technical review

Best possible solution:

Use captured physical routes through the existing authentication planner while retaining explicit account choices and final-effect authority checks.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main source shows the single-route restriction, and the supplied baseline regression reports rejection through runIsolatedCompletion for both physical-route orders; no target code was executed during this review.

Is this the best way to solve the issue?

This addresses the routing owner directly using the established catalog view and auth planner, with no competing selector or persistent state.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 65eb32679047.

Provenance checked

  • Utility runtime-label projection keeps the original intent (79810b9: The shared projection was introduced to report the runtime isolated completions actually use.)
  • Harness-owned isolated authentication keeps the original intent (ec4ae78: Native subscription authentication was routed through isolated completion with core-owned ordering and one scoped account per dispatch.)
  • Plugin test-runtime facade keeps the original intent (9e24399: Lazy local test helpers keep bundled-plugin regressions behind the SDK boundary without unnecessarily loading unrelated runtime graphs.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit ec4ae78 adds src/agents/isolated-completion.ts:539 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ec4ae78b752e; files: src/agents/isolated-completion.ts)
  • Mitchell Etzel: Raw commit 79810b9 adds src/agents/isolated-completion-route.ts:192 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 79810b9480ac; files: src/agents/isolated-completion-route.ts)

PR surface

Source +30, Tests +497, Docs +6. Total +533 across 8 files. Added test files: 4.

View PR surface stats
Area Files Added Removed Net
Source 3 37 7 +30
Tests 4 497 0 +497
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 540 7 +533

Review metrics

Metric Value Why it matters
Production versus test support Production +25/-7; tests and test support +509/-0. The small routing repair is supported by catalog-order/runtime-label coverage and a separate native serialization and authority boundary regression.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A bounded authentication-routing defect affects utility and isolated Codex completions; foreground routing already has its own merged repair.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-10T17:17:54.360Z sha 763186c :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-10T17:59:18.402Z sha c99689e :: needs maintainer review before merge. :: none

Reviewed October 10, 2026, 2:43 PM ET / 18:43 UTC (Revision 3).

@obviyus

obviyus commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 10, 2026
@obviyus

obviyus commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus
obviyus merged commit 6fd3171 into main Oct 10, 2026
138 checks passed
@obviyus
obviyus deleted the fix/isolated-admitted-route branch October 10, 2026 18:48
@obviyus

obviyus commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in 6fd3171. Isolated and utility Codex completions now plan sign-in from the admitted catalog route, the same one the picker uses, so ChatGPT-only accounts no longer fail with "No route-compatible authentication source is configured for openai". Proof: route-order regression red on main; the real Codex adapter against a recording app-server showed the allowed account reaching login and turn start, while a forbidden account and a revoked-during-preparation account sent zero messages.

steipete added a commit that referenced this pull request Oct 10, 2026
…th fixtures

check-dependencies has been red on hourly main. Its three Knip scripts
failed for separate reasons:

- deadcode:full (production pass) reported
  canUseProfileAsProviderEntryApiKey. #168552 made
  src/plugin-sdk/plugin-test-runtime.ts, a production root, lazily load
  isolated-completion.adapter.test-support.ts. That fixture passes the
  model-auth and prepared-model-runtime namespaces to vi.spyOn. In Knip
  6.32.2, any opaque import (here the lazy loaders in the media-understanding
  runner and config model validation) counts every export of a module as
  used, unless every namespace importer references only the bare namespace
  (is-referenced.js hasOnlyNsRefs). The spies flip that, so the facade's
  dead re-exports surfaced, and deadcode:exports reported nine
  "exports in used namespace" findings for test seams and the lazy-loaded
  isProviderAuthError.
- deadcode:exports' script scan reported the default export of
  tools/solid-lint/index.mjs, which Oxlint loads by path through
  .oxlintrc.json jsPlugins (#168376).
- deadcode:unused-files' full-tree scan reported six files that are only
  loaded by path: scripts/control-ui-parity/{vitest.config,capture-suite,
  fixtures,scenarios}.ts (`pnpm ui:parity`, #168597),
  src/proxy-capture/child-transport.process.test-support.ts
  (resolveRuntimeWorkerUrl in proxy-owner.test.ts, #168459) and
  test/e2e/qa-lab/runtime/codex-isolated-app-server.fixture.mjs (spawned by
  the Codex adapter test, #168552).

Changes:

- Make canUseProfileAsProviderEntryApiKey module-private and drop four other
  model-auth facade re-exports with no consumers anywhere (EnvApiKeyResult,
  ProviderEntryApiKeyBindingResolution, ProviderCredentialPrecedence,
  resolveAwsSdkEnvVarName). Their owners keep their real consumers.
- Ignore only nsExports in the production scan for model-auth.ts,
  model-auth-runtime.ts, model-auth-runtime-shared.ts and
  prepared-model-runtime.ts. Each has a verified opaque lazy importer; plain
  unused exports stay reported, and the full-tree scan still audits every
  export against its test consumers. plugin-test-runtime stays a production
  root: un-rooting it surfaced 24 false positives, because extension tests
  import it through the openclaw/plugin-sdk alias.
- Register the solid-lint default export as Oxlint-consumed, matching
  oxlint-boundary-guards.mjs.
- Add full-tree entries for the six by-path files. No files are deleted.

Proof: deadcode:full, deadcode:unused-files and deadcode:exports all exit 0
on the final tree; the model-auth focused tests pass.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
…law#168552)

## What Problem This Solves

Fixes: isolated and utility completions can require an OpenAI API key even when the selected model is available through the user's ChatGPT sign-in.

Related: openclaw#168033.

## User Impact

User impact: Codex utility completions can use the same subscription route as the model picker. Explicit auth profiles and utility-model overrides remain in force. A missing pinned profile fails instead of using another account.

## Why This Change Was Made

The status path used the first logical catalog row. Dispatch used the resolved model's transport. Either row could describe the Platform API, while a separate physical row described the available ChatGPT route.

Both paths now pass the catalog's physical routes to the existing auth planner through the same catalog view used by foreground runs. Dispatch reads the published catalog captured at admission. It keeps the existing model transport when no catalog route is available. No new route selector, config field, or stored state is added.

The isolated-session contract in openclaw#159246 is unchanged; its changes in this file concern the documented isolation boundary, not auth route selection.

## Evidence

- On baseline `b046f0c6532`, both route-order cases fail through `runIsolatedCompletion` with `No route-compatible authentication source is configured for openai.`
- With this fix, both orders select the subscription route, display the Codex runtime, and dispatch to the isolated harness with the subscription profile. The harness returns text through the real completion entry point. A missing pinned profile does not dispatch.
- The focused completion and plugin-scope suites pass: 56 tests. These include utility-model overrides, CLI profile selection, quota rotation, cancellation, and authority lifetime controls.
- The final focused regression in `src/agents/isolated-completion-route.test.ts` passes both route orders. The agent-root TypeScript check and changed-source lint pass.

The original route-order regression uses a synthetic catalog and mocked dispatch. The additional adapter-boundary regression below covers native login and inference serialization without contacting ChatGPT.

## Adapter boundary proof

The permanent [plugin-owned adapter regression](https://github.com/openclaw/openclaw/blob/408cc759db6741b58063d348a765d0ff1a2c347f/extensions/codex/isolated-completion.adapter.e2e.test.ts) drives the real `runIsolatedCompletion` and auth planner through the existing test-only SDK barrel into the real Codex harness/client and a [stdio JSON-RPC executable](https://github.com/openclaw/openclaw/blob/408cc759db6741b58063d348a765d0ff1a2c347f/test/e2e/qa-lab/runtime/codex-isolated-app-server.fixture.mjs). The [core-only test fixture](https://github.com/openclaw/openclaw/blob/408cc759db6741b58063d348a765d0ff1a2c347f/src/agents/isolated-completion.adapter.test-support.ts) keeps bundled plugin implementation files out of core TypeScript graphs.

- **Allowed:** ChatGPT route is second behind Platform. The scoped synthetic account reaches `account/login/start` exactly once, then `turn/start`; completion returns `Completed as synthetic-allowed-account`. [Redacted transcript](https://gist.github.com/obviyus/ba2dd960adfd458f96736bf39d459f12#file-allowed-json).
- **Nearest forbidden:** a stored OAuth account explicitly pinned against config declaring that profile API-key-only is rejected by real eligibility policy; **zero RPC messages**. [Transcript](https://gist.github.com/obviyus/ba2dd960adfd458f96736bf39d459f12#file-forbidden-json).
- **Revoked:** remove the allowed profile and revoke caller authority while the real model-materialization await is held; release it and observe rejection before any RPC, including login/inference. [Transcript](https://gist.github.com/obviyus/ba2dd960adfd458f96736bf39d459f12#file-revoked-json).

All three moved cases pass (23.8 s test time; 78.8 s including cold transformation). Core-agent and extension-test TypeScript checks and targeted lint pass. `check-changed` passes extension/core-import and SDK boundary checks, then stops only at the known UI E2E root budget (722/720). Merged current `origin/main`, including its managed-cleanup lint fix. Synthetic principals and isolated state only; no live ChatGPT request, real credentials, user Gateway, or default login. Admission/catalog inputs and the deferred model resolver are fixture-controlled; auth planning, profile scoping, native serialization, process transport, and result handling are real. No production execution changes. No overlap with Pash/Sarah changes.

Merge danger: two-way door. Reverting the patch fully restores the old behavior; it writes no state. The blast radius is auth planning for harness-owned isolated completions and their runtime labels when a model has multiple physical catalog routes.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
…th fixtures

check-dependencies has been red on hourly main. Its three Knip scripts
failed for separate reasons:

- deadcode:full (production pass) reported
  canUseProfileAsProviderEntryApiKey. openclaw#168552 made
  src/plugin-sdk/plugin-test-runtime.ts, a production root, lazily load
  isolated-completion.adapter.test-support.ts. That fixture passes the
  model-auth and prepared-model-runtime namespaces to vi.spyOn. In Knip
  6.32.2, any opaque import (here the lazy loaders in the media-understanding
  runner and config model validation) counts every export of a module as
  used, unless every namespace importer references only the bare namespace
  (is-referenced.js hasOnlyNsRefs). The spies flip that, so the facade's
  dead re-exports surfaced, and deadcode:exports reported nine
  "exports in used namespace" findings for test seams and the lazy-loaded
  isProviderAuthError.
- deadcode:exports' script scan reported the default export of
  tools/solid-lint/index.mjs, which Oxlint loads by path through
  .oxlintrc.json jsPlugins (openclaw#168376).
- deadcode:unused-files' full-tree scan reported six files that are only
  loaded by path: scripts/control-ui-parity/{vitest.config,capture-suite,
  fixtures,scenarios}.ts (`pnpm ui:parity`, openclaw#168597),
  src/proxy-capture/child-transport.process.test-support.ts
  (resolveRuntimeWorkerUrl in proxy-owner.test.ts, openclaw#168459) and
  test/e2e/qa-lab/runtime/codex-isolated-app-server.fixture.mjs (spawned by
  the Codex adapter test, openclaw#168552).

Changes:

- Make canUseProfileAsProviderEntryApiKey module-private and drop four other
  model-auth facade re-exports with no consumers anywhere (EnvApiKeyResult,
  ProviderEntryApiKeyBindingResolution, ProviderCredentialPrecedence,
  resolveAwsSdkEnvVarName). Their owners keep their real consumers.
- Ignore only nsExports in the production scan for model-auth.ts,
  model-auth-runtime.ts, model-auth-runtime-shared.ts and
  prepared-model-runtime.ts. Each has a verified opaque lazy importer; plain
  unused exports stay reported, and the full-tree scan still audits every
  export against its test consumers. plugin-test-runtime stays a production
  root: un-rooting it surfaced 24 false positives, because extension tests
  import it through the openclaw/plugin-sdk alias.
- Register the solid-lint default export as Oxlint-consumed, matching
  oxlint-boundary-guards.mjs.
- Add full-tree entries for the six by-path files. No files are deleted.

Proof: deadcode:full, deadcode:unused-files and deadcode:exports all exit 0
on the final tree; the model-auth focused tests pass.
@obviyus

obviyus commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator Author

Evidence: OpenClaw PR 168552: synthetic Codex adapter boundary proof

Moved here from a one-off gist so the proof lives on this PR.

allowed.json
{
  "scenario": "allowed",
  "outcome": {
    "text": "Completed as synthetic-allowed-account",
    "owner": {
      "kind": "harness",
      "id": "codex"
    }
  },
  "messages": [
    {
      "id": 1,
      "method": "initialize",
      "params": {
        "clientInfo": {
          "name": "openclaw",
          "title": "OpenClaw",
          "version": "2026.9.9"
        },
        "capabilities": {
          "experimentalApi": true,
          "optOutNotificationMethods": [
            "account/login/completed",
            "app/list/updated",
            "command/exec/outputDelta",
            "deprecationNotice",
            "externalAgentConfig/import/completed",
            "externalAgentConfig/import/progress",
            "fs/changed",
            "fuzzyFileSearch/sessionCompleted",
            "fuzzyFileSearch/sessionUpdated",
            "mcpServer/event/stream/notification",
            "mcpServer/oauthLogin/completed",
            "mcpServer/startupStatus/updated",
            "process/exited",
            "process/outputDelta",
            "project/changed",
            "remoteControl/status/changed",
            "thread/environment/connected",
            "thread/environment/disconnected",
            "thread/goal/cleared",
            "thread/project/updated",
            "thread/queue/changed",
            "thread/realtime/closed",
            "thread/realtime/error",
            "thread/realtime/item/completed",
            "thread/realtime/item/started",
            "thread/realtime/item/transcript/delta",
            "thread/realtime/itemAdded",
            "thread/realtime/outputAudio/delta",
            "thread/realtime/sdp",
            "thread/realtime/started",
            "thread/realtime/transcript/delta",
            "thread/realtime/transcript/done",
            "windows/worldWritableWarning",
            "windowsSandbox/setupCompleted",
            "turn/diff/updated",
            "item/fileChange/outputDelta",
            "thread/compacted"
          ],
          "extensions": {
            "openai/standard-form-input": {},
            "openai/form": {},
            "openai/elicitation": {
              "form": {}
            },
            "io.modelcontextprotocol/ui": {
              "mimeTypes": [
                "text/html;profile=mcp-app"
              ]
            }
          }
        }
      }
    },
    {
      "id": 1,
      "result": {
        "protocolVersion": "2",
        "serverInfo": {
          "name": "isolated-codex-proof",
          "version": "0.160.0"
        },
        "userAgent": "openclaw/0.160.0 (test)"
      }
    },
    {
      "method": "initialized"
    },
    {
      "id": 2,
      "method": "account/login/start",
      "params": {
        "type": "chatgptAuthTokens",
        "accessToken": "<synthetic-token:allowed>",
        "chatgptAccountId": "synthetic-allowed-account",
        "chatgptPlanType": null
      }
    },
    {
      "id": 2,
      "result": {
        "type": "chatgptAuthTokens"
      }
    },
    {
      "id": 3,
      "method": "model/list",
      "params": {
        "limit": null,
        "cursor": null,
        "includeHidden": true
      }
    },
    {
      "id": 3,
      "result": {
        "data": [
          {
            "id": "gpt-test",
            "model": "gpt-test",
            "displayName": "Synthetic model",
            "description": "Synthetic",
            "hidden": false,
            "isDefault": true,
            "defaultReasoningEffort": "low",
            "supportedReasoningEfforts": [
              {
                "reasoningEffort": "low",
                "description": "Low"
              }
            ],
            "inputModalities": [
              "text"
            ]
          }
        ],
        "nextCursor": null
      }
    },
    {
      "id": 4,
      "method": "config/read",
      "params": {
        "cwd": "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/workspace",
        "includeLayers": true
      }
    },
    {
      "id": 4,
      "result": {
        "config": {
          "features": {
            "hooks": true,
            "plugins": false
          },
          "project_root_markers": []
        },
        "origins": {},
        "layers": [
          {
            "name": {
              "type": "user",
              "file": "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/codex-home/config.toml"
            },
            "config": {}
          }
        ]
      }
    },
    {
      "id": 5,
      "method": "config/read",
      "params": {
        "cwd": "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/workspace",
        "includeLayers": true
      }
    },
    {
      "id": 5,
      "result": {
        "config": {
          "features": {
            "hooks": true,
            "plugins": false
          },
          "project_root_markers": []
        },
        "origins": {},
        "layers": [
          {
            "name": {
              "type": "user",
              "file": "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/codex-home/config.toml"
            },
            "config": {}
          }
        ]
      }
    },
    {
      "id": 6,
      "method": "hooks/list",
      "params": {
        "cwds": [
          "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/workspace"
        ]
      }
    },
    {
      "id": 6,
      "result": {
        "data": [
          {
            "cwd": "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/workspace",
            "hooks": [],
            "errors": [],
            "warnings": []
          }
        ],
        "nextCursor": null
      }
    },
    {
      "id": 7,
      "method": "configRequirements/read"
    },
    {
      "id": 7,
      "result": {
        "requirements": null
      }
    },
    {
      "id": 8,
      "method": "thread/start",
      "params": {
        "model": "gpt-test",
        "cwd": "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/workspace",
        "approvalPolicy": "on-request",
        "sandbox": "read-only",
        "serviceName": "OpenClaw",
        "baseInstructions": "",
        "developerInstructions": "Return text.",
        "config": {
          "project_doc_max_bytes": 0,
          "agents.enabled": false,
          "features.multi_agent": false,
          "features.multi_agent_v2": false,
          "features.apps": false,
          "features.plugins": false,
          "features.image_generation": false,
          "features.standalone_web_search": false,
          "web_search": "disabled",
          "features.hooks": false,
          "project_root_markers": [],
          "notify": [],
          "skills.include_instructions": false,
          "include_environment_context": false,
          "features.artifact": false,
          "features.browser_use": false,
          "features.browser_use_external": false,
          "features.browser_use_full_cdp_access": false,
          "features.chronicle": false,
          "features.code_mode": false,
          "features.code_mode_only": false,
          "features.computer_use": false,
          "features.context_management": false,
          "features.current_time_reminder": false,
          "features.default_mode_request_user_input": false,
          "features.deferred_executor": false,
          "features.goals": false,
          "features.memories": false,
          "features.request_permissions_tool": false,
          "features.skill_search": false,
          "features.shell_tool": false,
          "features.token_budget": false,
          "features.unified_exec": false,
          "features.view_image": false,
          "features.web_search_cached": false,
          "features.web_search_request": false,
          "features.workspace_dependencies": false,
          "orchestrator.mcp.enabled": false,
          "orchestrator.skills.enabled": false,
          "skills.bundled.enabled": false,
          "tools.experimental_request_user_input.enabled": false,
          "hooks": {
            "PreToolUse": [],
            "PermissionRequest": [],
            "PostToolUse": [],
            "PreCompact": [],
            "PostCompact": [],
            "SessionStart": [],
            "UserPromptSubmit": [],
            "SubagentStart": [],
            "SubagentStop": [],
            "Stop": []
          },
          "tools.update_plan.enabled": false
        },
        "environments": [],
        "dynamicTools": [],
        "experimentalRawEvents": true,
        "ephemeral": true
      }
    },
    {
      "id": 8,
      "result": {
        "thread": {
          "id": "synthetic-thread",
          "sessionId": "synthetic-session",
          "forkedFromId": null,
          "preview": "",
          "ephemeral": false,
          "projectId": null,
          "modelProvider": "openai",
          "createdAt": 1791656605720,
          "updatedAt": 1791656605720,
          "status": {
            "type": "idle"
          },
          "path": null,
          "cwd": "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/workspace",
          "cliVersion": "0.160.0",
          "source": "unknown",
          "agentNickname": null,
          "agentRole": null,
          "gitInfo": null,
          "name": null,
          "turns": []
        },
        "model": "gpt-test",
        "modelProvider": "openai",
        "serviceTier": null,
        "cwd": "/private/tmp/openclaw/codex-bounded-turn-45d76629-6a5c-4c7e-9d00-3d54f107e7b4-oP64xw/workspace",
        "runtimeWorkspaceRoots": [],
        "instructionSources": [],
        "approvalPolicy": "on-request",
        "approvalsReviewer": "user",
        "sandbox": {
          "type": "dangerFullAccess"
        },
        "activePermissionProfile": null,
        "reasoningEffort": null,
        "multiAgentMode": "explicitRequestOnly"
      }
    },
    {
      "id": 9,
      "method": "mcpServerStatus/list",
      "params": {
        "threadId": "synthetic-thread",
        "detail": "toolsAndAuthOnly"
      }
    },
    {
      "id": 9,
      "result": {
        "data": [],
        "nextCursor": null
      }
    },
    {
      "id": 10,
      "method": "turn/start",
      "params": {
        "threadId": "synthetic-thread",
        "input": [
          {
            "type": "text",
            "text": "Do the task.",
            "text_elements": []
          }
        ],
        "approvalPolicy": "on-request",
        "effort": "low"
      }
    },
    {
      "id": 10,
      "result": {
        "turn": {
          "id": "synthetic-turn",
          "items": [],
          "itemsView": "notLoaded",
          "status": "inProgress",
          "error": null,
          "startedAt": null,
          "completedAt": null,
          "durationMs": null
        }
      }
    },
    {
      "method": "item/completed",
      "params": {
        "item": {
          "type": "agentMessage",
          "id": "synthetic-message",
          "text": "Completed as synthetic-allowed-account"
        },
        "threadId": "synthetic-thread",
        "turnId": "synthetic-turn"
      }
    },
    {
      "method": "turn/completed",
      "params": {
        "threadId": "synthetic-thread",
        "turn": {
          "id": "synthetic-turn",
          "items": [
            {
              "type": "agentMessage",
              "id": "synthetic-message",
              "text": "Completed as synthetic-allowed-account"
            }
          ],
          "itemsView": "full",
          "status": "completed",
          "error": null,
          "startedAt": 1,
          "completedAt": 2,
          "durationMs": 1
        }
      }
    }
  ]
}
forbidden.json
{
  "scenario": "forbidden",
  "outcome": {
    "rejected": true,
    "error": "Auth profile \"openai:forbidden\" is not configured for openai."
  },
  "messages": []
}
revoked.json
{
  "scenario": "revoked",
  "outcome": {
    "rejected": true,
    "error": "synthetic caller authority revoked during preparation"
  },
  "messages": []
}

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 P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant