Skip to content

refactor: remove retired Codex CLI parser - #116017

Merged
steipete merged 1 commit into
mainfrom
codex/remove-retired-codex-cli-parser
Jul 29, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/remove-retired-codex-cli-parser

Conversation

@steipete

@steipete steipete commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Related: #115497

What Problem This Solves

Removes a dead compatibility path that taught the generic CLI runner to parse Codex exec JSONL even though OpenClaw retired the bundled codex-cli backend and migrated Codex execution to the plugin-owned app-server runtime.

Why This Change Was Made

The generic CLI runner now stays limited to its registered Anthropic and Google backend dialects. The useful terminal tool-summary behavior remains generic, with its zero-tool, success, failure, and repeated-name coverage moved onto the supported Claude stream-json lifecycle instead of synthetic Codex fixtures.

This replaces the additive shape from #115797 with the correct owner boundary: no Codex protocol policy in core and no test-only compatibility route for a retired backend.

User Impact

No supported user workflow changes. Core loses 134 lines of unreachable provider-specific production code, and the complete change is +25/-297 lines.

Evidence

  • History: a0f35574d04 removed the bundled codex-cli backend and migrated legacy refs to the Codex runtime; current manifests register only claude-cli and google-gemini-cli.
  • Upstream contract check: sibling openai/codex at d06c7ac055920c7cb140c25ebda3f3db20197b45, including codex-rs/exec/src/exec_events.rs, codex-rs/exec/src/event_processor_with_jsonl_output.rs, sdk/typescript/src/items.ts, and sdk/typescript/src/events.ts.
  • Focused proof: node scripts/run-vitest.mjs src/agents/cli-output.test.ts src/agents/cli-runner/execute.supervisor-capture.test.ts src/agents/cli-runner.before-agent-reply-cron.test.ts — 153 passed.
  • Blacksmith Testbox changed gate: tbx_01kyqdvp0hx7hv80zwf46xceg3, Actions run https://github.com/openclaw/openclaw/actions/runs/30474341892 — exit 0.
  • Final Codex autoreview of commit b04f1e5995a: clean, no accepted/actionable findings; confidence 0.98.

ClawSweeper rank-up moves are addressed directly:

  • Current-main registration check: extensions/anthropic/openclaw.plugin.json registers claude-cli; extensions/google/openclaw.plugin.json registers google-gemini-cli; extensions/codex/openclaw.plugin.json registers no CLI backend. Core backend resolution requires a runtime/setup registration, so the removed provider-id branch had no supported caller.
  • Sibling Codex contract check: the exact exec JSONL shapes were inspected at the sibling openai/codex SHA and remain owned by Codex; OpenClaw's supported Codex route is the plugin app-server harness.
  • Live after-fix user-path proof: an isolated OpenClaw state imported the Molty Anthropic live-test credential into a temporary auth profile, selected claude-cli/claude-sonnet-4-6, pointed the temporary agent workspace at this checkout, and required one real Read call. Only the sanitized terminal projection is shown:
{
  "proof": "supported-cli-terminal-summary",
  "provider": "claude-cli",
  "model": "claude-sonnet-4-6",
  "toolSummary": {
    "calls": 1,
    "tools": ["Read"],
    "failures": 0
  },
  "payloadCount": 1
}

AI-assisted: implemented and reviewed with Codex.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Jul 29, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 29, 2026
@clawsweeper

clawsweeper Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 29, 2026, 1:48 PM ET / 17:48 UTC.

ClawSweeper review

What this changes

The branch removes retired Codex exec JSONL parsing from the generic CLI runner, deletes its dedicated fixtures, and retains terminal tool-summary checks through the supported Claude stream-json lifecycle.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 4 items remain

Keep this PR open for human review. The supplied context supports the intended owner-boundary cleanup, but the required current-main and sibling ../codex contract inspection could not be completed because every read-only shell command failed before execution; the maintainer label also makes this ineligible for automated cleanup closure.

Priority: P3
Reviewed head: b04f1e5995abde1d433b17f6552959e3a1773d47

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The proposed cleanup is plausibly well-scoped, but independent source/contract review and real runtime proof are missing from this review environment.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body reports focused tests and a changed gate, but those are supplemental mock/test evidence rather than an independently inspectable after-fix runtime result; add a redacted terminal transcript for the supported CLI route and redact private values. Updating the PR body should trigger a fresh review; otherwise a maintainer can request @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.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports focused tests and a changed gate, but those are supplemental mock/test evidence rather than an independently inspectable after-fix runtime result; add a redacted terminal transcript for the supported CLI route and redact private values. Updating the PR body should trigger a fresh review; otherwise a maintainer can request @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 3 items Proposed cleanup scope: The supplied PR diff removes the Codex-only provider check and Codex JSONL item projector from src/agents/cli-output.ts, deletes the Codex-specific fixture suite, and adds tool-summary assertions to supported CLI lifecycle tests.
Related merged implementation: The supplied related-item context shows that the earlier tool-summary implementation merged as commit 1f537c36c648f2cc330aea302b15d52babcee086; this PR describes itself as removing that now-retired Codex CLI-specific route after the runtime ownership change.
Required source review blocked: A read-only attempt to read AGENTS.md and review skill instructions failed before command execution with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted; therefore current-main callers, scoped policy, git provenance, maintainer notes, and the mandatory sibling ../codex source contract were not independently verified.
Findings None None.
Security None None.

How this fits together

The generic CLI runner converts registered command-line backend output into agent terminal results, including a compact tool summary. Codex execution is intended to arrive through its plugin-owned app-server runtime rather than through the generic CLI JSONL parser, while Claude and Gemini remain registered CLI dialects.

flowchart LR
  A[Agent run request] --> B[CLI backend selection]
  B --> C[Registered Claude or Gemini dialect]
  C --> D[Generic CLI output parser]
  D --> E[Terminal tool summary]
  A --> F[Codex plugin app-server runtime]
  F --> G[Codex runtime result]
  E --> H[Agent result]
  G --> H
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports focused tests and a changed gate, but those are supplemental mock/test evidence rather than an independently inspectable after-fix runtime result; add a redacted terminal transcript for the supported CLI route and redact private values. Updating the PR body should trigger a fresh review; otherwise a maintainer can request @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.
  • Resolve merge risk (P1) - The PR deletes a parser for provider identifiers codex and codex-cli; without inspecting current registration, callers, and the sibling Codex runtime contract, this review cannot independently rule out a remaining supported or upgrade-reachable path.
  • Resolve merge risk (P1) - The PR body provides focused test and changed-gate results, but no independently inspectable after-fix real runtime transcript for the supported CLI path that now owns the retained tool-summary behavior.
  • Complete next step (P2) - A human reviewer must complete the direct current-main and sibling-Codex contract inspection required for this Codex-related deletion; the protected maintainer label also keeps the item out of automated cleanup handling.
Agent review details

Security

None.

PR surface

Source -134, Tests -138. Total -272 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 1 0 134 -134
Tests 11 25 163 -138
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 25 297 -272

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Verify on current main that no supported CLI backend can select the removed Codex JSONL dialect, inspect the matching sibling ../codex runtime contract, and attach a redacted after-fix terminal run for the supported CLI tool-summary path before merging.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Verify on current main that no supported CLI backend can select the removed Codex JSONL dialect, inspect the matching sibling ../codex runtime contract, and attach a redacted after-fix terminal run for the supported CLI tool-summary path before merging.

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

Not applicable as a conventional bug reproduction: the key question is whether a supported current-main CLI path can still reach the deleted parser, which could not be checked because the read-only inspection environment failed before commands ran.

Is this the best way to solve the issue?

Unclear. Removing retired provider-specific policy from core is the likely best design, but that conclusion requires direct verification of current backend registration, call sites, and the plugin-owned Codex runtime contract.

AGENTS.md: unclear because the file could not be read completely.

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

Labels

Label changes:

  • add P3: This is presented as a behavior-neutral dead-code cleanup rather than a user-facing regression or new capability.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add 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 reports focused tests and a changed gate, but those are supplemental mock/test evidence rather than an independently inspectable after-fix runtime result; add a redacted terminal transcript for the supported CLI route and redact private values. Updating the PR body should trigger a fresh review; otherwise a maintainer can request @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.

Label justifications:

  • P3: This is presented as a behavior-neutral dead-code cleanup rather than a user-facing regression or new capability.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • 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 reports focused tests and a changed gate, but those are supplemental mock/test evidence rather than an independently inspectable after-fix runtime result; add a redacted terminal transcript for the supported CLI route and redact private values. Updating the PR body should trigger a fresh review; otherwise a maintainer can request @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

What I checked:

  • Proposed cleanup scope: The supplied PR diff removes the Codex-only provider check and Codex JSONL item projector from src/agents/cli-output.ts, deletes the Codex-specific fixture suite, and adds tool-summary assertions to supported CLI lifecycle tests. (src/agents/cli-output.ts, b04f1e5995ab)
  • Related merged implementation: The supplied related-item context shows that the earlier tool-summary implementation merged as commit 1f537c36c648f2cc330aea302b15d52babcee086; this PR describes itself as removing that now-retired Codex CLI-specific route after the runtime ownership change. (src/agents/cli-runner.codex-tool-summary.test.ts, 1f537c36c648)
  • Required source review blocked: A read-only attempt to read AGENTS.md and review skill instructions failed before command execution with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted; therefore current-main callers, scoped policy, git provenance, maintainer notes, and the mandatory sibling ../codex source contract were not independently verified.

Likely related people:

  • steipete: The supplied context identifies this person as author of both this cleanup and the earlier merged tool-summary implementation affecting the exact CLI-output surface. (role: recent area contributor; confidence: medium; commits: b04f1e5995ab, 1f537c36c648; files: src/agents/cli-output.ts, src/agents/cli-runner.codex-tool-summary.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Verify current-main backend registration and all remaining uses of the removed provider identifiers against the sibling Codex runtime source.
  • Add a redacted after-fix terminal result from the supported CLI route showing tool-summary behavior remains intact.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Both rank-up moves are now addressed in the PR body: direct current-main and sibling Codex source inspection, plus a redacted live Claude CLI terminal result with one successful Read call and failures: 0.

@clawsweeper

clawsweeper Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit 97d374b into main Jul 29, 2026
136 of 142 checks passed
@steipete
steipete deleted the codex/remove-retired-codex-cli-parser branch July 29, 2026 18:14
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to nvtoroy/openclaw that referenced this pull request Jul 29, 2026
* origin/main:
  refactor(agents): remove retired Codex CLI parser (openclaw#116017)
  feat(mac): hand off gateway-owned settings panes to the dashboard (openclaw#115999)
  fix(gateway): declare viewer presence explicitly instead of deriving it from subscriptions (openclaw#116001)
  test(plugins): include dreaming sidecar in startup expectation (openclaw#116018)
  fix(openai): prevent GPT-Live errors from stalling (openclaw#115582)
  fix(gateway): stop start-time repair from retargeting managed services (openclaw#115935)
  fix(plugins): scope Codex relay with tool matchers (openclaw#109603)
vincentkoc added a commit to sunlit-deng/openclaw that referenced this pull request Jul 29, 2026
* origin/main: (823 commits)
  fix(memory): return early for blank searches (openclaw#116034)
  fix(tool-search): long-lived gateways leak heap from finished embedded runs (openclaw#114767)
  feat(harness): report copilot code-mode engagement on the attempt result (openclaw#115913)
  fix(ui): compact the macOS gateway picker menu (openclaw#115977)
  perf(codex): stream large CLI session JSONL scans (openclaw#115997)
  cron: reject webhook URLs with embedded credentials (openclaw#51822)
  refactor(agents): remove retired Codex CLI parser (openclaw#116017)
  feat(mac): hand off gateway-owned settings panes to the dashboard (openclaw#115999)
  fix(gateway): declare viewer presence explicitly instead of deriving it from subscriptions (openclaw#116001)
  test(plugins): include dreaming sidecar in startup expectation (openclaw#116018)
  fix(openai): prevent GPT-Live errors from stalling (openclaw#115582)
  fix(gateway): stop start-time repair from retargeting managed services (openclaw#115935)
  fix(plugins): scope Codex relay with tool matchers (openclaw#109603)
  fix(discord): bound webhook send body reads (openclaw#109076)
  fix(ui): preserve initials for missing user avatars (openclaw#115976)
  feat(ui): add provider icons to coding catalogs (openclaw#115956)
  fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285)
  fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927)
  fix(test): isolate plugin install fixtures (openclaw#116008)
  fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M 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.

1 participant