Repository navigation
fix(codex): keep progress cards visible in normal runs - #126189
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 1:52 AM ET / 05:52 UTC. ClawSweeper reviewWhat this changesThe PR keeps OpenClaw’s durable progress-card tool directly visible in normal Codex runs while leaving unrelated dynamic tools searchable. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. The source path supports the focused fix and no patch defect was found, but the required direct Codex contract inspection is blocked because Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -3, Tests +34. Total +31 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper handling for exact head
Those citations are also linked in the PR body. No skip is needed and no code change follows from the review. |
|
Merged via squash.
|
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.
#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.
…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.
…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.
…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.
…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.
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_cardbehind tool search while OpenClaw had already disabled Codex's nativeupdate_plan, leaving the model with no initially visible progress tool.Why This Change Was Made
progress_cardnow 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
extensions/codex/src/app-server/run-attempt-tools.ts:76-98addedprogress_cardto the direct-name set only whenpluginHarnessToolPolicyRestrictedwas true.extensions/codex/src/app-server/dynamic-tools.ts:1122-1126defers every searchable tool not present in that direct-name set.extensions/codex/src/app-server/dynamic-tool-profile.ts:82-89makessearchablethe 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 nativeupdate_planon 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-1041omits nativeupdate_planwhen its config gate is false, whilecodex-rs/core/src/tools/handlers/dynamic.rs:58-80mapsdeferLoadingto deferred rather than direct exposure. Codex's own contract tests confirm both behaviors inspec_plan_tests.rs:623-635andspec_plan_tests.rs:1107-1177.Context cost is deliberately bounded: one always-visible
progress_cardtool spec replaces the nativeupdate_planspec 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 namedprogress_card; it requested four phases: scaffold a four-module CSV-to-JSON Node project, add fournode:testfiles, run and repair tests until green, then writeREPORT.md.On
mainwithout 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:Revision 3 proves incremental upkeep rather than a single write at completion.
Automated proof
pnpm tsgo:corepnpm formatpnpm build--mode branch --base origin/main: clean, no accepted/actionable findingsProduction LOC: +3/-6 (net -3) | Tests: +54/-20 (net +34)