Skip to content

fix(codex): allow configured apps with disabled base defaults#95970

Open
kevinlin-openai wants to merge 1 commit into
openclaw:mainfrom
kevinslin:dev/kevinlin/openclaw-base-disabled-app-policy
Open

fix(codex): allow configured apps with disabled base defaults#95970
kevinlin-openai wants to merge 1 commit into
openclaw:mainfrom
kevinslin:dev/kevinlin/openclaw-base-disabled-app-policy

Conversation

@kevinlin-openai

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where an explicitly configured Codex app plugin could not be
enabled for a gateway thread when the app was accessible and ownership-proven
but its base profile intentionally reported isEnabled = false.

Why This Change Was Made

OpenClaw now treats explicit plugin configuration plus proven ownership and app
accessibility as the positive per-thread grant. Base-profile enablement is no
longer required, while inaccessible, unowned, disabled, and activation-failed
apps retain their existing fail-closed paths.

User Impact

Operators can keep Codex apps disabled by default in the devbox profile and
still grant only the configured plugin-owned app for a thread. This does not
enable unconfigured apps or bypass Codex managed requirements.

Evidence

  • node scripts/run-vitest.mjs run extensions/codex/src/app-server/plugin-thread-config.test.ts — 16 tests passed.
  • node_modules/oxfmt/bin/oxfmt --check extensions/codex/src/app-server/plugin-thread-config.ts extensions/codex/src/app-server/plugin-thread-config.test.ts — passed.
  • OPENCLAW_BUILD_ALL_NO_PNPM=1 node scripts/tsdown-build.mjs — passed.
  • node scripts/runtime-postbuild.mjs — passed.
  • git diff --check -- extensions/codex/src/app-server/plugin-thread-config.ts extensions/codex/src/app-server/plugin-thread-config.test.ts — passed.

@clawsweeper

clawsweeper Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 23, 2026, 3:22 PM ET / 19:22 UTC.

Summary
The PR narrows Codex plugin thread-config app readiness checks so accessible, ownership-proven configured apps can be exposed even when Codex reports the base app profile as disabled.

PR surface: Source 0, Tests -2. Total -2 across 2 files.

Reproducibility: yes. from source: current main skips a configured, ownership-proven app when Codex reports isEnabled = false, and upstream Codex allows per-thread config to enable a specific app. I did not run a live Codex thread repro in this read-only review.

Review metrics: 1 noteworthy metric.

  • App readiness predicates: 2 narrowed. The PR removes app.enabled from both exposure and refresh-readiness decisions, which changes how operator app config gates Codex plugin tools.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🦪 silver shellfish
Patch quality: 🧂 unranked krab
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Preserve explicit per-app disabled settings while still allowing disabled-default profiles for explicitly configured plugin apps.
  • [P1] Add redacted real behavior proof showing the fixed Codex gateway-thread path after the code blocker is addressed.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists unit tests, formatting, build, runtime-postbuild, and diff-check output, but no real Codex operator-thread proof; contributors should redact private details such as tokens, IP addresses, phone numbers, and non-public endpoints before adding terminal output, logs, or a recording. After updating the PR body, a fresh ClawSweeper review should run automatically; if it does not, a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging this patch can expose an accessible plugin-owned app even when the operator explicitly set that app's Codex config to enabled = false, because AppInfo.isEnabled does not identify whether false came from defaults or a per-app override.
  • [P1] Contributor proof is currently test/build-only; there is no real Codex operator-thread proof showing a base-disabled configured app works after the patch.

Maintainer options:

  1. Preserve Explicit App Disables (recommended)
    Add a way to distinguish default-derived disabled state from [apps.<id>] enabled=false, keep explicit per-app disables fail-closed, and cover both cases in tests.
  2. Accept OpenClaw Config Precedence
    Maintainers can decide that OpenClaw plugin config intentionally overrides Codex per-app disables, but that policy needs to be explicit in the PR body/tests and backed by real behavior proof.
  3. Pause For Codex API Shape
    If Codex does not expose enough enablement-source detail, pause this PR until the API or OpenClaw integration can tell default-disabled from explicitly disabled apps.

Next step before merge

  • [P1] The blocker is an operator-policy/API distinction between default-disabled and explicitly app-disabled Codex state, so this needs maintainer direction before an automated repair can safely proceed.

Security
Needs attention: The diff can weaken an app/tool access boundary by overriding explicit Codex per-app disabled settings.

Review findings

  • [P1] Preserve explicit app disables — extensions/codex/src/app-server/plugin-thread-config.ts:235
Review details

Best possible solution:

Preserve explicit per-app disables while allowing the intended default-disabled base profile case, with regression coverage for both and real Codex thread proof before merge.

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

Yes from source: current main skips a configured, ownership-proven app when Codex reports isEnabled = false, and upstream Codex allows per-thread config to enable a specific app. I did not run a live Codex thread repro in this read-only review.

Is this the best way to solve the issue?

No: dropping the enabled check fixes the base-default case but also bypasses explicit per-app disables because Codex reports both through the same isEnabled field. The safer fix needs to preserve explicit app disables or get an enablement-source signal before allowing the override.

Full review comments:

  • [P1] Preserve explicit app disables — extensions/codex/src/app-server/plugin-thread-config.ts:235
    AppInfo.isEnabled is not only a base-default signal; Codex computes it from both [apps._default] and explicit [apps.<id>] overrides. After this change, an operator who set a specific plugin-owned app to enabled = false still gets an OpenClaw thread config with that app forced to enabled: true, so the patch bypasses an existing app-level disable instead of only allowing the disabled-default case.
    Confidence: 0.89

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6343e1483faf.

Label changes

Label justifications:

  • P2: This is a focused Codex gateway-thread bug fix with a concrete merge blocker and limited affected surface.
  • merge-risk: 🚨 compatibility: The diff changes how existing Codex app enablement config is interpreted for configured plugin-owned apps.
  • merge-risk: 🚨 security-boundary: Ignoring isEnabled can expose app tools despite an explicit per-app disabled setting, affecting a tool-access boundary.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists unit tests, formatting, build, runtime-postbuild, and diff-check output, but no real Codex operator-thread proof; contributors should redact private details such as tokens, IP addresses, phone numbers, and non-public endpoints before adding terminal output, logs, or a recording. After updating the PR body, a fresh ClawSweeper review should run automatically; if it does not, a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source 0, Tests -2. Total -2 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 3 0
Tests 1 3 5 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 6 8 -2

Security concerns:

  • [medium] Explicit app disable can be bypassed — extensions/codex/src/app-server/plugin-thread-config.ts:235
    Because Codex reports both default-disabled and explicitly app-disabled state through isEnabled, removing this guard can enable a plugin-owned app in the thread even when the operator disabled that exact app in Codex config.
    Confidence: 0.86

What I checked:

Likely related people:

  • kevinslin: Remote commit metadata shows native plugin app support, stale app snapshot handling, and remote app-server plugin work touching the affected Codex app-thread config files. (role: Codex plugin app feature contributor; confidence: high; commits: a1ac559ed7e6, f169e0aafde8, bc5081c58730; files: extensions/codex/src/app-server/plugin-thread-config.ts, extensions/codex/src/app-server/plugin-thread-config.test.ts, extensions/codex/src/app-server/plugin-inventory.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants