fix(acp): re-add opt-in parent commentary progress#89505
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 4, 2026, 9:16 AM ET / 13:16 UTC. Summary PR surface: Source +212, Tests +835, Docs +6, Generated 0. Total +1053 across 11 files. Reproducibility: yes. for the source-level behavior: current main suppresses commentary-phase ACP parent relay text, and the PR source/tests show the changed eligibility path. I did not run a live ACP-to-channel scenario in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land only after maintainers explicitly choose the channel-level default and namespace; absent that approval, keep commentary default-off for existing Discord parent streams and align docs, PR body, and proof with the chosen config. Do we have a high-confidence way to reproduce the issue? Yes for the source-level behavior: current main suppresses commentary-phase ACP parent relay text, and the PR source/tests show the changed eligibility path. I did not run a live ACP-to-channel scenario in this read-only review. Is this the best way to solve the issue? No, not yet. Reusing channel progress config may be reasonable, but the Discord default-visible behavior is a compatibility/product decision and the safer default is explicit opt-in unless maintainers choose otherwise. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 087fcf40858b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +212, Tests +835, Docs +6, Generated 0. Total +1053 across 11 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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 re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@steipete While the default behavior is set to off, I recommend actually making this the default OpenClaw behavior (returning back to this as default) as this is default Codex behavior and expected behavior by users of any agent app. This was suppressed a few weeks ago for token savings however it doesn't actually save any tokens and leads users to think agent is stalled given agent does not respond for long runs. |
|
@clawsweeper re-review Fixed in |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Previous targeted ClawSweeper run 26833168543 reached the Codex reviewer timeout ( |
deae8c2 to
c216553
Compare
|
Landed via rebase onto main.
Thanks @100yenadmin! |
Summary
This PR adds an opt-in ACP stream setting for parent-owned Codex/ACP runs:
acp.stream.assistantCommentarywith a default-off config/schema/docs surface.sessions_spawn(..., runtime: "acp", streamTo: "parent")parent-stream relays.phase: "commentary"assistant text is still hidden unless the operator enables the new option.acp.stream.tagVisibilityuse the same bounded parent-stream buffering/truncation path as other assistant progress text.This matters now because long CodexAgent ACP runs can be visibly active in tool logs while the parent OpenClaw conversation receives no natural-language progress updates. The existing relay counted commentary as internal progress but returned before any user-visible update, so operators could wait through long tool-heavy runs without knowing what was happening.
Intended outcome: deployments that want a more Codex-Desktop-like status experience can turn on assistant-authored progress/status text for ACP parent streams without changing current quiet defaults.
Out of scope: Discord-specific
streaming.progress.commentarybehavior, hidden chain-of-thought exposure, final transcript projection, or durable final-answer semantics.Success looks like: default suppression remains unchanged; enabling
acp.stream.assistantCommentaryrelays commentary into parent progress updates; final-answer relay still works as before.Review focus: the config name/default, whether
acp.streamis the right namespace, and the parent-stream classification behavior for opted-in commentary.Scenario at a glance
The operator-facing failure mode is easiest to see as a long-running run:
acp.stream.assistantCommentary: trueenables bounded parent-visible commentary.This is a gateway/operator config choice, not a request to force commentary on everyone and not a per-user or per-
sessions_spawnoverride. Existing deployments keep the current default. Operators who want a Codex-Desktop-like progress experience for ACP parent streams can turn it on explicitly for ACP parent streams served by that config.Behavior diagrams
Current behavior:
sequenceDiagram participant U as User participant P as Parent OpenClaw chat participant A as ACP CodexAgent child participant T as Tools and logs U->>P: Ask broad request P->>A: sessions_spawn streamTo parent loop long tool-heavy work A->>T: tool calls and command output A-->>A: commentary updates internal progress only A--xP: no parent-visible text end A->>P: final answerOpt-in behavior from this PR:
sequenceDiagram participant U as User participant P as Parent OpenClaw chat participant A as ACP CodexAgent child participant T as Tools and logs U->>P: Ask broad request P->>A: sessions_spawn streamTo parent Note over P,A: acp.stream.assistantCommentary = true loop long tool-heavy work A->>T: tool calls and command output A->>P: bounded commentary progress end A->>P: final answerLinked context
Closes #89501
Related:
Requested by an OpenClaw/Codex operator report: local CodexAgent runs made many tool calls for long periods but did not provide interim message updates, making it unclear whether the agent was healthy or stuck.
Real behavior proof (required for external PRs)
phase: "commentary"text and did not surface ACP status progress allowed by the existing tag-visibility policy even whenstreamTo: "parent"was requested./Volumes/LEXAR/repos/openclaw-codex-claw-builtin, branchcodex/acp-commentary-progress.node --import tsx /Volumes/LEXAR/Codex/openclaw-acp-commentary-proof.mjs. The script imports the patched OpenClaw relay module, emits an assistant event through the production agent-event bus, then drains the parent session's OpenClaw system-event queue.assistantCommentary: true, the phased assistant input producescodex: checking workspace and tool state before the next step. Theplanstatus remains hidden by default and only producescodex: plan: inspect the runtime handoff firstwhentagVisibility.plan=true.mainhad an explicitif (assistantPhase === "commentary") { lastProgressAt = Date.now(); return; }branch insrc/agents/acp-spawn-parent-stream.ts.Tests and validation
Commands run:
CI=true pnpm install --frozen-lockfile --ignore-scripts --prefer-offlinenode scripts/run-vitest.mjs run --config test/vitest/vitest.agents.config.ts src/agents/acp-spawn-parent-stream.test.ts --pool forks --maxWorkers=1(passed: 17 tests)node scripts/run-vitest.mjs run --config test/vitest/vitest.agents.config.ts src/agents/acp-spawn.test.ts --pool forks --maxWorkers=1 -t 'streamTo="parent"|announces parent relay start'(passed: 4 tests, 61 skipped)node scripts/run-vitest.mjs run --config test/vitest/vitest.runtime-config.config.ts src/config/schema.help.quality.test.ts src/config/schema.test.ts --pool forks --maxWorkers=1(passed: 71 tests)pnpm exec oxfmt --check src/agents/acp-spawn.ts src/agents/acp-spawn-parent-stream.ts src/agents/acp-spawn-parent-stream.test.ts src/auto-reply/reply/acp-stream-settings.ts src/config/types.acp.ts src/config/zod-schema.ts src/config/schema.help.ts src/config/schema.labels.ts(passed)pnpm config:docs:check(passed afterpnpm config:docs:gen)pnpm tsgo:prod(passed after the follow-up fixes)pnpm exec oxlint --tsconfig config/tsconfig/oxlint.core.json src/agents/acp-spawn.ts src/agents/acp-spawn-parent-stream.ts src/agents/acp-spawn-parent-stream.test.ts src/auto-reply/reply/acp-stream-settings.ts src/config/schema.help.ts --type-aware --report-unused-disable-directives-severity error --threads=4(passed)git diff --check(passed)Regression coverage added:
acp.stream.tagVisibility.plan, usage/config/tool/session-info remain suppressed from parent progress unless explicitly enabled by tag visibility.Acceptance proof:
suppresses commentary-phase assistant relay textand the status-progress proof script default case.Failed/limited:
pnpm tsgo:test:srcwas started earlier as a broader compile check but produced no output for roughly 95 seconds; it was terminated to avoid a long local validation run.pnpm check:test-typeswas started after the follow-up type-shape fix, but localtsgo:core:testproduced no diagnostics or completion after roughly 4 minutes 20 seconds and was terminated. Remote CI should carry broader test typechecking.pnpm lint --threads=4was started after the tag-visibility fix, but the local core shard produced no diagnostics after roughly 5 minutes 30 seconds and was terminated. The changed TypeScript files passed targeted type-awareoxlint; remote CI should carry broad lint.Risk checklist
Did user-visible behavior change? (
Yes/No)Yes, but only when
acp.stream.assistantCommentary: trueis set. Defaults remain unchanged.Did config, environment, or migration behavior change? (
Yes/No)Yes. Adds an optional config key under
acp.stream; no migration required.Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)No tool execution/auth/network behavior changes. The user-visible risk is exposing assistant-authored commentary/status progress text when explicitly configured and allowed by tag visibility. This relies on the ACP phase/status contract; it does not opt into hidden reasoning or chain-of-thought.
What is the highest-risk area?
Accidentally making commentary/status progress visible by default, relaying hidden thought/status tags, or changing final-answer behavior.
How is that risk mitigated?
The new option defaults off, existing suppression tests remain, hidden ACP status tags are filtered, and the implementation only changes the parent-stream relay branch when
assistantCommentary === true. Final-answer relay code remains on the existing path.Current review state
Next action: maintainer review.
Waiting on: maintainer preference on the exact config name/namespace. Current-head CI/proof checks are green or intentionally skipped.
Bot/reviewer comments addressed: none yet.