Skip to content

fix(codex): remove dynamic tools profile option - #80048

Merged
kevinslin merged 3 commits into
mainfrom
codex/remove-codex-dynamic-tools-profile
May 10, 2026
Merged

kevinslin merged 3 commits into
mainfrom
codex/remove-codex-dynamic-tools-profile

Conversation

@kevinslin

@kevinslin kevinslin commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Remove codexDynamicToolsProfile from the Codex plugin manifest, runtime config type, docs, and prompt snapshot helpers.
  • Make the Codex app-server tool filter always omit Codex-owned workspace/edit/patch/exec/process/plan tools while keeping loading and extra exclude controls.
  • Add a Codex doctor repair rule and coverage for removing stale codexDynamicToolsProfile config, plus refreshed config baseline/docs/changelog.
  • Stabilize the artifact build by giving the tsdown build a larger default heap.

Verification

  • pnpm docs:list
  • pnpm test extensions/codex/doctor-contract-api.test.ts extensions/codex/src/app-server/config.test.ts extensions/codex/src/app-server/run-attempt.test.ts test/scripts/prompt-snapshots.test.ts
  • pnpm test test/scripts/tsdown-build.test.ts
  • pnpm check:architecture
  • pnpm build:ci-artifacts
  • pnpm config:docs:check
  • pnpm config:schema:check
  • pnpm check:changed
  • git diff --check origin/main...HEAD
  • rg -n "codexDynamicToolsProfile|openclaw-compat" docs/plugins/codex-harness-reference.md docs/plugins/codex-harness.md extensions/codex test/helpers/agents scripts
  • uvx showboat verify proofs/demo-80048-dev-codex-native-exec/raw/showboat-summary.md

Real behavior proof

  • Behavior or issue addressed: Codex harness no longer exposes codexDynamicToolsProfile; Codex app-server now always keeps OpenClaw workspace/edit/patch/exec/process/plan tools native instead of allowing an openclaw-compat dynamic-tools profile.
  • Real environment tested: Local OpenClaw source checkout on macOS, branch codex/remove-codex-dynamic-tools-profile, commit 6704534d91, Node/pnpm workspace, and the dev OpenClaw gateway profile.
  • Exact steps or command run after this patch:
pnpm --silent openclaw config schema | node -e 'let input=""; process.stdin.setEncoding("utf8"); process.stdin.on("data", (chunk) => (input += chunk)); process.stdin.on("end", () => { const start = input.indexOf("{"); const schema = JSON.parse(input.slice(start)); const seen = new Set(); const walk = (value) => { if (!value || typeof value !== "object") return; if (Array.isArray(value)) { for (const item of value) walk(item); return; } for (const [key, child] of Object.entries(value)) { seen.add(key); walk(child); } }; walk(schema); console.log(`codexDynamicToolsProfile present: ${seen.has("codexDynamicToolsProfile")}`); console.log(`codexDynamicToolsLoading present: ${seen.has("codexDynamicToolsLoading")}`); });'
pnpm exec tsx -e 'import { filterCodexDynamicTools } from "./extensions/codex/src/app-server/dynamic-tool-profile.ts"; const tools = ["read", "write", "edit", "apply-patch", "bash", "process", "update_plan", "browser.open", "custom_tool"].map((name) => ({ name })); const kept = filterCodexDynamicTools(tools, { codexDynamicToolsExclude: [] }).map((tool) => tool.name); console.log(`kept dynamic tools: ${kept.join(", ")}`);'
pnpm --silent openclaw --profile dev agent --session-id claw-integ-codex-native-exec-mainapi-d92f2f1 --message 'Use your native Codex exec/shell tool to run this exact script from the repository root: ./proofs/demo-80048-dev-codex-native-exec/scripts/native-exec-marker.sh

After it runs, reply with exactly the stdout line printed by the script and no extra text.' --json --timeout 600
node proofs/demo-80048-dev-codex-native-exec/scripts/summarize-native-exec.mjs
  • Evidence after fix: terminal capture from the local run:
$ pnpm --silent openclaw config schema | node -e '<schema key scan>'
codexDynamicToolsProfile present: false
codexDynamicToolsLoading present: true

$ pnpm exec tsx -e '<dynamic tool filter probe>'
kept dynamic tools: browser.open, custom_tool

$ node proofs/demo-80048-dev-codex-native-exec/scripts/summarize-native-exec.mjs
status=ok
session=claw-integ-codex-native-exec-mainapi-d92f2f1
run=10242360-6753-40da-9709-569f9132b5cb
harness=codex
provider=openai-codex
model=gpt-5.4
dynamic_native_names_present=0
codex_rollout_thread=019e0fac-eaa0-7c12-a46b-1c34ff351679
codex_rollout_native_call=exec_command
final=NATIVE_EXEC_OK:OPENCLAW_NATIVE_EXEC_PROOF_80048_D92F2F1
  • Observed result after fix: The user-facing config schema no longer contains codexDynamicToolsProfile, while the remaining supported Codex dynamic-tools controls still exist; the Codex app-server filter drops native-owned workspace/edit/patch/exec/process/plan tools and keeps only non-native dynamic tools. A live dev-profile Codex harness turn completed through agentHarnessId=codex, returned the expected marker, had no native tool names in the OpenClaw dynamic catalog, and the Codex rollout log recorded the shell action as native exec_command.
  • What was not tested: No remote or cross-OS gateway was used; this is local dev-profile proof.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime extensions: codex size: S maintainer Maintainer-authored PR labels May 10, 2026
@clawsweeper

clawsweeper Bot commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The PR removes codexDynamicToolsProfile from Codex config, manifest, docs, prompt snapshots, and runtime filtering; adds Codex doctor cleanup coverage; refreshes config docs/baselines; and raises tsdown's default build heap.

Reproducibility: not applicable. this is a PR review for retiring a Codex config option, not a standalone bug report. The current-main baseline and PR-head behavior are source-verifiable in config, manifest, docs, tests, and the dynamic-tool filter.

Real behavior proof
Sufficient (terminal): The PR body includes after-fix terminal proof from a real local checkout showing schema removal, dynamic-tool filtering, and a live dev-profile Codex native-exec turn with the expected marker.

Next step before merge
Protected-label handling, user-facing config retirement, and a failing required type-check signal make this a maintainer review/merge decision rather than a safe ClawSweeper repair lane.

Security
Cleared: No concrete security or supply-chain regression was found; the diff adds no dependencies, workflow permission changes, secret handling, or downloaded code execution, and the tsdown NODE_OPTIONS change only supplies a default heap while preserving explicit values.

Review details

Best possible solution:

Land only after maintainer acceptance of the config retirement and required checks are green or explicitly handled, keeping legacy cleanup in Codex doctor repair rather than runtime fallback.

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

Not applicable: this is a PR review for retiring a Codex config option, not a standalone bug report. The current-main baseline and PR-head behavior are source-verifiable in config, manifest, docs, tests, and the dynamic-tool filter.

Is this the best way to solve the issue?

Mostly yes: removing the runtime branch and adding a plugin-owned doctor repair is the narrow maintainable path for this retirement. The remaining questions are maintainer approval for the behavior change and required CI handling, not a concrete code finding from this review.

What I checked:

  • Current main still exposes the option: Current main has codexDynamicToolsProfile in CodexPluginConfig, zod parsing, plugin manifest UI/schema, docs, and tests, so this PR is retiring a live config surface. (extensions/codex/src/app-server/config.ts:113, 7036e8f68192)
  • Current main has profile-dependent filtering: applyCodexDynamicToolProfile only excludes Codex-native workspace/process/plan tools when the profile is native-first; openclaw-compat leaves those tools exposed except for explicit excludes. (extensions/codex/src/app-server/dynamic-tool-profile.ts:23, 7036e8f68192)
  • PR head removes the field and makes filtering unconditional: The PR diff removes the config type/schema/manifest/doc references and changes the tool filter to always add Codex-owned tool names to the exclude set before applying extra excludes. (extensions/codex/src/app-server/dynamic-tool-profile.ts:23, 995a419c0b03)
  • Doctor repair path matches existing plugin contract: Current core loads plugin doctor-contract-api modules and applies normalizeCompatibilityConfig, so the added Codex doctor contract is on the established plugin-owned repair path rather than a startup/runtime compatibility branch. (src/plugins/doctor-contract-registry.ts:335, 7036e8f68192)
  • Head state and protected label: GitHub API reports the PR is open, not draft, mergeable, on head 995a419c0b0343bee21718bb95b4b5c1286c2718, and labeled maintainer plus proof: sufficient. (995a419c0b03)
  • CI check signal: Head CI has check-test-types failing, but its annotations point to unrelated Discord voice test typing, not files touched by this PR. (extensions/discord/src/voice/manager.e2e.test.ts:1199, 995a419c0b03)

Likely related people:

  • pashpashpash: Commit 3f217964d1f9063d7ad5ea8851eaac02b8c31b5c added Codex dynamic-tool loading/profile behavior across config, docs, run-attempt code, and tests; commit 563dca82f4290a8d085be5bea10334545c1c7e8d later touched Codex prompt snapshot and dynamic-tool helpers. (role: introduced dynamic-tools profile surface and prompt snapshot contributor; confidence: high; commits: 3f217964d1f9, 563dca82f429; files: extensions/codex/openclaw.plugin.json, extensions/codex/src/app-server/config.ts, extensions/codex/src/app-server/run-attempt.ts)
  • steipete: Commit 42aaf0c98a7cd8b8e0fa3413e71a0b1307271899 introduced the native-first Codex workspace-tool preference, and recent commits also touched Codex dynamic-tool timeout behavior plus the tsdown wrapper changed by this PR. (role: native workspace-tool behavior and tsdown wrapper area contributor; confidence: high; commits: 42aaf0c98a7c, 8e0486c6b795, 4cb4aad7b12a; files: extensions/codex/src/app-server/dynamic-tool-profile.ts, extensions/codex/src/app-server/run-attempt.ts, docs/plugins/codex-harness.md)

Remaining risk / open question:

  • Retiring openclaw-compat removes an intentional escape hatch for users who wanted the full OpenClaw dynamic tool set exposed to Codex app-server; that compatibility tradeoff needs maintainer acceptance.
  • The current PR head has a failing check-test-types check in unrelated Discord voice test annotations, so merge still needs required-check handling.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 7036e8f68192.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 10, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M and removed size: S labels May 10, 2026
@kevinslin
kevinslin force-pushed the codex/remove-codex-dynamic-tools-profile branch 3 times, most recently from 6704534 to 995a419 Compare May 10, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR proof: sufficient ClawSweeper judged the real behavior proof convincing. scripts Repository scripts size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant