Skip to content

fix(codex): keep progress cards visible in normal runs - #126189

Merged
steipete merged 1 commit into
mainfrom
steipete/codex-progress-card-direct
Aug 19, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/codex-progress-card-direct

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users running normal Codex sessions could receive no progress card during multi-phase work. The default searchable dynamic-tool profile deferred progress_card behind tool search while OpenClaw had already disabled Codex's native update_plan, leaving the model with no initially visible progress tool.

Why This Change Was Made

progress_card now remains in the direct dynamic-tool set for every Codex run, while unrelated broad tools still use searchable loading. This preserves the single durable progress owner introduced by #125125 instead of reviving Codex's separate native checklist.

Root cause

  • Before this patch, extensions/codex/src/app-server/run-attempt-tools.ts:76-98 added progress_card to the direct-name set only when pluginHarnessToolPolicyRestricted was true.
  • extensions/codex/src/app-server/dynamic-tools.ts:1122-1126 defers every searchable tool not present in that direct-name set.
  • extensions/codex/src/app-server/dynamic-tool-profile.ts:82-89 makes searchable the default loading mode.
  • extensions/codex/src/app-server/thread-requests.ts:49-52, introduced by feat(agents): unify agent status into a durable progress_card #125125, disables native update_plan on every thread so the durable OpenClaw card remains the sole owner.

The sibling Codex contract matches that diagnosis at inspected revision b5ea64a203ce1b04629010d3ef0a0d18c3c870a9: codex-rs/core/src/tools/spec_plan.rs:1039-1041 omits native update_plan when its config gate is false, while codex-rs/core/src/tools/handlers/dynamic.rs:58-80 maps deferLoading to deferred rather than direct exposure. Codex's own contract tests confirm both behaviors in spec_plan_tests.rs:623-635 and spec_plan_tests.rs:1107-1177.

Context cost is deliberately bounded: one always-visible progress_card tool spec replaces the native update_plan spec it supplanted; it does not add a second planner or make the broad catalog direct.

User Impact

Codex can now create and incrementally maintain the durable progress card during ordinary multi-step work without being prompted to search for the tool. Other tools retain the lower-context searchable behavior.

Evidence

Maintainer-run live before/after

Maintainer-run rig: isolated state directory, port 19255, gpt-5.6-luna, Codex runtime, paired Control UI, and a build carrying this fix. The prompt never named progress_card; it requested four phases: scaffold a four-module CSV-to-JSON Node project, add four node:test files, run and repair tests until green, then write REPORT.md.

On main without this fix, the same class of run produced zero progress-card writes. With this fix, the agent created and maintained the card on its own, finishing at revision 3:

markdown: **Completed:** tiny CSV-to-JSON Node project with 4 source modules, 4 `node:test` files, `REPORT.md`, and a clean passing test run (9/9).
steps:
  completed  Create Node project and CSV-to-JSON modules
  completed  Add four node:test module test files
  completed  Run tests and fix failures
  completed  Write REPORT.md and clean up bootstrap marker

Revision 3 proves incremental upkeep rather than a single write at completion.

Automated proof

  • Focused pre-fix regression set: 3 files, 300 tests passed.
  • Codex startup race isolated rerun: 19/19 passed. Two extension-wide local sweeps otherwise passed but hit that unrelated load-sensitive timeout in the combined shard; exact-head CI is the clean-host authority.
  • pnpm tsgo:core
  • assertion-safety ratchet: 4,302 files, 13,618 grandfathered assertions, no growth
  • dead-code dependency, unused-file, and unused-export scans: zero entries in an isolated clone containing exactly this patch
  • pnpm format
  • pnpm build
  • Autoreview, --mode branch --base origin/main: clean, no accepted/actionable findings

Production LOC: +3/-6 (net -3) | Tests: +54/-20 (net +34)

@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete steipete self-assigned this Aug 19, 2026
@steipete
steipete marked this pull request as ready for review August 19, 2026 05:00
@steipete steipete closed this Aug 19, 2026
@steipete steipete reopened this Aug 19, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 1:52 AM ET / 05:52 UTC.

ClawSweeper review

What this changes

The PR keeps OpenClaw’s durable progress-card tool directly visible in normal Codex runs while leaving unrelated dynamic tools searchable.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. The source path supports the focused fix and no patch defect was found, but the required direct Codex contract inspection is blocked because ../codex is absent and GitHub DNS is unavailable; this maintainer-owned PR needs human landing handling.

Priority: P2
Reviewed head: ad0adadb4d1e52b947fdbb7670348e69b87f2cb4

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is focused and source-consistent, but independent verification of the Codex runtime contract is unavailable.
Proof confidence 🌊 off-meta tidepool Not applicable: This is maintainer-authored work, so the external-contributor proof gate does not apply; the PR body nevertheless supplies a maintainer-run before/after result.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is maintainer-authored work, so the external-contributor proof gate does not apply; the PR body nevertheless supplies a maintainer-run before/after result.
Evidence reviewed 6 items Current-main defect: Current main adds progress_card to direct names only for restricted policy runs, while normal runs use the searchable default.
Deferred-loading behavior: The bridge emits an entry directly only when its name is direct; otherwise searchable tools receive deferLoading:true.
Single progress owner: All native-code-mode config branches include the update_plan disablement, leaving progress_card as OpenClaw’s intended progress mechanism.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

pnpm openclaw --helprunner@runnervmzvulz:/tmp/clawsweeper-live-proof-126189-UC4sAC/target$ pnpm openclaw --help
pnpm openclaw --help
$ node scripts/run-node.mjs --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 400.66 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 111.95 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.8s
node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

[tsdown-build] invocation 2/2 finished in 13.6s
[plugin-control-plane-loads] verified 36 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 4782ms (slowest: built plugin control-plane loads 3610ms)

OpenClaw 2026.8.1 (ad0adad) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console 
… output truncated …

Assertions:

  • PASS expect_output: OpenClaw

How this fits together

The Codex plugin builds the tool specifications given to a Codex run. Its dynamic-tool policy decides which tools are immediately callable and which are deferred behind tool search, affecting whether users can see progress updates during multi-step work.

flowchart LR
  A[Codex run request] --> B[Dynamic tool policy]
  B --> C[Direct tool names]
  C --> D[Tool specification bridge]
  D --> E[Codex model tool list]
  E --> F[Durable progress card]
Loading

Before merge

  • Resolve merge risk (P1) - The Codex runtime contract remains independently unverified because the required sibling checkout is unavailable and the network cannot retrieve the pinned source; this is an evidence gap, not a demonstrated patch regression.
  • Complete next step (P2) - This is an assigned maintainer-owned PR, and the only remaining gap is a required external-contract review rather than a repair-lane task.
Agent review details

Security

None.

PR surface

Source -3, Tests +34. Total +31 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 6 -3
Tests 3 54 20 +34
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 57 26 +31

Review metrics

Metric Value Why it matters
Production vs test LOC production +3/-6 (net -3); tests +54/-20 (net +34) The repair simplifies production policy while adding focused coverage for normal, restricted, and bridge-placement behavior.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Preserve this single direct progress-card exposure while retaining searchable loading for broad tools, then complete the exact Codex-source contract check before landing.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Preserve this single direct progress-card exposure while retaining searchable loading for broad tools, then complete the exact Codex-source contract check before landing.

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

No high-confidence end-to-end reproduction was established locally: current-main source proves the normal searchable path, but the exact Codex runtime contract could not be inspected in this environment.

Is this the best way to solve the issue?

Unclear: the change is at the correct OpenClaw owner boundary and covers the bridge behavior, but direct Codex-source inspection is still required to independently verify the deferred-loading premise.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes a contained but user-visible loss of progress status in normal Codex multi-step runs.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is maintainer-authored work, so the external-contributor proof gate does not apply; the PR body nevertheless supplies a maintainer-run before/after result.

Label justifications:

  • P2: This fixes a contained but user-visible loss of progress status in normal Codex multi-step runs.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is maintainer-authored work, so the external-contributor proof gate does not apply; the PR body nevertheless supplies a maintainer-run before/after result.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the merged durable progress-card work and this focused Codex follow-up; available history also shows repeated maintenance of this path. (role: feature owner and recent area contributor; confidence: high; commits: 7170a6231a4a, ad0adadb4d1e; files: extensions/codex/src/app-server/run-attempt-tools.ts, extensions/codex/src/app-server/thread-requests.ts)
  • Josh Avant: Available history shows recent Codex runtime and thread-policy maintenance near the affected bridge path. (role: recent adjacent contributor; confidence: medium; commits: a345ede6851c, 73a9eed95ba2; files: extensions/codex/src/app-server/dynamic-tools.ts, extensions/codex/src/app-server/thread-requests.ts)

Rank-up moves

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

  • Inspect the pinned Codex source contract once the required sibling checkout or network access is available.

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 handling for exact head ad0adadb4d1e52b947fdbb7670348e69b87f2cb4:

  • No actionable findings or security findings were reported.
  • The optional rank-up move is addressed by direct maintainer inspection of the sibling Codex checkout at b5ea64a203ce1b04629010d3ef0a0d18c3c870a9.
  • Native update_plan gating was verified in codex-rs/core/src/tools/spec_plan.rs:1039-1041 and its contract test at codex-rs/core/src/tools/spec_plan_tests.rs:623-635.
  • Deferred dynamic-tool exposure was verified in codex-rs/core/src/tools/handlers/dynamic.rs:58-80 and the direct/deferred contract coverage at codex-rs/core/src/tools/spec_plan_tests.rs:1107-1177.

Those citations are also linked in the PR body. No skip is needed and no code change follows from the review.

@steipete
steipete merged commit 3205e92 into main Aug 19, 2026
213 of 250 checks passed
@steipete
steipete deleted the steipete/codex-progress-card-direct branch August 19, 2026 06:20
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 19, 2026
run-attempt-tools.test.ts arrived in #126189 without a shard claim. The support
shard globs app-server/**/*.test.ts but excludes the whole run-attempt* pattern,
and every other run-attempt file is enumerated by name across the attempt shards,
so this one was owned by nobody and the full-suite ownership audit failed. main is
red on it (7f60af7); it reaches this PR through the merge ref, not the branch.

Claims it in the attempt-extra shard alongside its run-attempt-lifecycle-controller
and run-attempt-thread-cleanup siblings. Unrelated to the sidebar change; fixed here
rather than landing onto a red gate.
steipete added a commit that referenced this pull request Aug 19, 2026
#126189 added extensions/codex/src/app-server/run-attempt-tools.test.ts
without assigning it to a full-suite lane, so the Vitest ownership audit
(test/vitest-projects-config.test.ts) fails on main and every PR head.
Register it in the codex app-server attempt-light shard next to its
run-attempt siblings.
steipete added a commit that referenced this pull request Aug 19, 2026
…iew toggle

Pinned sessions inherited the nav zone's muted colour on the session *title*, so a
pinned row's preview line outshone its own name and the same session read dimmer
pinned than unpinned. A title is content in every zone; only glyphs, meta and the
hover fill follow the zone. The subtitle drops to plain --muted, already proven AA
against every surface by theme-contrast.test.ts.

Rows with no preview text reserved a fixed 18px second line anyway, leaving a dead
band or a lone spinner hanging below-right of the title. They now collapse to one
line via a --single-line class plus a CSS variant, so the endcap rides beside the
title. Rows also gained a little vertical air and reclaimed the right-hand gutter
inside the row, leaving the deliberate scrollbar clearance from #124879 intact.

Adds a localStorage-backed "Show message preview" toggle to the session sort menu
(default on). Operator-actionable state is exempt: attention, the queued
concurrency-slot explanation, and critical observer headlines (stuck /
waiting-on-user) always show, because hiding them behind a display preference is
the silent-failure class.

Also registers extensions/codex/src/app-server/run-attempt-tools.test.ts, which
arrived in #126189 with no shard claim and left main red.
steipete added a commit that referenced this pull request Aug 19, 2026
…pawn retry (#126218)

* fix(agents): clear sub-agent failure warning after successful spawn retry

A failed sessions_spawn followed by a successful retry in the same run
kept appending the durable "Sub-agent failed" warning to channel
replies. The recovery seam (lastToolRecovery) already existed, but
sessions_spawn has no stable-target arg key, so its recovery
fingerprint fell back to display meta built from label/task/model.
Retries adjust those args (drop a rejected cwd, reword the task), the
fingerprints never matched, and recordSuccess could not clear the
failure.

Collapse the sessions_spawn recovery identity to tool level: any later
successful spawn in the same run is recovery proof. A lone failed spawn
still warns, and a failure after recovery still invalidates the
receipt.

Observed 2026-08-19 on team.openclaw.ai: Roboclaw's first nested spawn
returned forbidden (visible-session cwd outside workspace), the retry
without cwd succeeded, the reply said "Started Investigate…", and
Discord still showed "⚠️ 🧑‍🔧 Sub-agent failed".

* ci: register run-attempt-tools test in the attempt-light lane

#126189 added extensions/codex/src/app-server/run-attempt-tools.test.ts
without assigning it to a full-suite lane, so the Vitest ownership audit
(test/vitest-projects-config.test.ts) fails on main and every PR head.
Register it in the codex app-server attempt-light shard next to its
run-attempt siblings.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
…iew toggle

Pinned sessions inherited the nav zone's muted colour on the session *title*, so a
pinned row's preview line outshone its own name and the same session read dimmer
pinned than unpinned. A title is content in every zone; only glyphs, meta and the
hover fill follow the zone. The subtitle drops to plain --muted, already proven AA
against every surface by theme-contrast.test.ts.

Rows with no preview text reserved a fixed 18px second line anyway, leaving a dead
band or a lone spinner hanging below-right of the title. They now collapse to one
line via a --single-line class plus a CSS variant, so the endcap rides beside the
title. Rows also gained a little vertical air and reclaimed the right-hand gutter
inside the row, leaving the deliberate scrollbar clearance from openclaw#124879 intact.

Adds a localStorage-backed "Show message preview" toggle to the session sort menu
(default on). Operator-actionable state is exempt: attention, the queued
concurrency-slot explanation, and critical observer headlines (stuck /
waiting-on-user) always show, because hiding them behind a display preference is
the silent-failure class.

Also registers extensions/codex/src/app-server/run-attempt-tools.test.ts, which
arrived in openclaw#126189 with no shard claim and left main red.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
…pawn retry (openclaw#126218)

* fix(agents): clear sub-agent failure warning after successful spawn retry

A failed sessions_spawn followed by a successful retry in the same run
kept appending the durable "Sub-agent failed" warning to channel
replies. The recovery seam (lastToolRecovery) already existed, but
sessions_spawn has no stable-target arg key, so its recovery
fingerprint fell back to display meta built from label/task/model.
Retries adjust those args (drop a rejected cwd, reword the task), the
fingerprints never matched, and recordSuccess could not clear the
failure.

Collapse the sessions_spawn recovery identity to tool level: any later
successful spawn in the same run is recovery proof. A lone failed spawn
still warns, and a failure after recovery still invalidates the
receipt.

Observed 2026-08-19 on team.openclaw.ai: Roboclaw's first nested spawn
returned forbidden (visible-session cwd outside workspace), the retry
without cwd succeeded, the reply said "Started Investigate…", and
Discord still showed "⚠️ 🧑‍🔧 Sub-agent failed".

* ci: register run-attempt-tools test in the attempt-light lane

openclaw#126189 added extensions/codex/src/app-server/run-attempt-tools.test.ts
without assigning it to a full-suite lane, so the Vitest ownership audit
(test/vitest-projects-config.test.ts) fails on main and every PR head.
Register it in the codex app-server attempt-light shard next to its
run-attempt siblings.
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 P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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