Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Codex-native command/read/search status projection can turn expected negative checks and internal probe failures into channel-visible OpenClaw failed messages. The visible reports are channel-specific, but the likely ownership boundary is the Codex/OpenClaw integration path that converts native Codex item status into lastToolError and then into user-facing warning payloads.
Steps to reproduce
Evidence-backed paths:
- In [Bug]: Telegram shows internal "⚠️ 🛠️ ... failed" for normal grep exit(1) after upgrade to 2026.5.20 #87610, run OpenClaw
2026.5.20with the Codex runtime through Telegram. - Let the agent execute a shell search pipeline where
grepexits1because no rows matched. - Observe Telegram receive a visible
⚠️ ... failedbanner even though the no-match result was the expected negative check. - In [Bug]: 2026.5.19 Discord shows failed file reads in chat #85310, run the Codex runtime through Discord scheduled/group delivery and let the agent attempt an internal file read for a missing per-run memory or skill file.
- Observe Discord receive a visible
⚠️ ... print lines ... failedmessage.
Current-source path to inspect:
extensions/codex/src/app-server/event-projector.ts:1058maps non-success Codex-native result status toisError.extensions/codex/src/app-server/event-projector.ts:1098records that native failure aslastNativeToolError.extensions/codex/src/app-server/event-projector.ts:1985treats every nativecommandExecutionas a mutating tool item.src/agents/embedded-agent-runner/run/payloads.ts:517formatslastToolErroras a channel-visible⚠️ ... failedwarning.
Expected behavior
The Codex/OpenClaw integration should distinguish real user-action failures from expected negative checks and internal agent probes before producing channel-visible failure warnings.
Expected-negative checks such as search-no-match should be allowed to produce a normal result without an alarming failure banner. Internal agent probes that miss optional workspace files should remain internal diagnostics unless the assistant deliberately reports them or the failure blocks the requested user action.
This should be channel-agnostic. Telegram and Discord may need output-suppression safeguards, but they should not be the primary owners of Codex-native tool status semantics.
Actual behavior
Prior reports show channel-visible ⚠️ ... failed messages for Codex-backed operations that are not necessarily user-action failures:
- [Bug]: Telegram shows internal "⚠️ 🛠️ ... failed" for normal grep exit(1) after upgrade to 2026.5.20 #87610: Telegram shows a visible failed-tool banner for a shell search where
grepexit1means no matches. - [Bug]: 2026.5.19 Discord shows failed file reads in chat #85310: Discord showed visible
print lines ... failedmessages for missing internal read targets in a Codex-backed workflow. Fix heartbeat message-tool delivery policy #85357 fixed the specific Discord heartbeat delivery-policy gap, but the report still shows the same Codex-native failure shape. - [Bug]: Internal messages surface in Telegram chat #88128: Telegram has a separate open report for internal runtime artifacts surfacing in chat, which is adjacent evidence that external channels can expose runtime/internal messages when upstream semantics or suppression are too broad.
Current source suggests the shared path is Codex-native event projection plus OpenClaw warning payload construction, not Telegram alone.
OpenClaw version
Observed reports: 2026.5.19, 2026.5.20, and adjacent Telegram internal-message evidence on 2026.5.26. Current source reviewed on main at b13fb788b53 on 2026-05-30.
Operating system
Observed reports include macOS and Ubuntu. The suspected source path is OS-independent.
Install method
Observed reports include npm global and source checkout.
Model
openai/gpt-5.5 / gpt-5.5 with the Codex runtime.
Provider / routing chain
OpenClaw -> @openclaw/codex -> external channel delivery, including Telegram and Discord reports.
Additional provider/model setup details
This issue intentionally reframes the visible channel reports as a shared Codex/OpenClaw integration problem. The channel issues should remain useful repro anchors, but the product decision should likely happen at the native tool-status boundary:
- Which Codex-native outcomes should become
lastToolError? - Which native command outcomes are mutating or user-action failures?
- When should
src/agents/embedded-agent-runner/run/payloads.tsadd a fallback⚠️ ... failedwarning? - Should this align with OpenClaw's own tool semantics, where
src/agents/sessions/tools/grep.ts:353treats no matches as a successfulNo matches foundresult andsrc/agents/bash-tools.exec-runtime.ts:546treats normal non-shell nonzero exits as completed with an exit-code note?
Logs, screenshots, and evidence
Related issues:
- [Bug]: Telegram shows internal "⚠️ 🛠️ ... failed" for normal grep exit(1) after upgrade to 2026.5.20 #87610: Telegram shows internal
⚠️ ... failedfor normalgrepexit1after upgrade to2026.5.20. - [Bug]: 2026.5.19 Discord shows failed file reads in chat #85310: Discord showed failed Codex-backed file-read messages in chat on
2026.5.19and2026.5.20; fixed for the Discord heartbeat delivery-policy path by Fix heartbeat message-tool delivery policy #85357. - [Bug]: Internal messages surface in Telegram chat #88128: Telegram surfaces internal runtime messages in chat.
Current source refs:
extensions/codex/src/app-server/event-projector.ts:1058extensions/codex/src/app-server/event-projector.ts:1098extensions/codex/src/app-server/event-projector.ts:1985src/agents/embedded-agent-runner/run/payloads.ts:517src/agents/sessions/tools/grep.ts:353src/agents/bash-tools.exec-runtime.ts:546
Impact and severity
Affected: users on external messaging channels when the Codex runtime produces native tool statuses that OpenClaw turns into visible warnings.
Severity: Medium UX regression, with possible information-exposure risk when internal file/probe details are shown in shared channels.
Frequency: Reproducible for the grep/no-match shape in #87610; observed across multiple missing-read examples in #85310.
Consequence: Users see false or overly alarming failure messages, routine negative checks look broken, and internal agent activity can leak into chat surfaces.
Additional information
This should not be solved as a grep-string special case or a Telegram-only sanitizer. The likely durable fix is a small, explicit Codex-native status mapping policy plus fallback-warning policy tests, with channel tests only proving that external delivery no longer leaks the misclassified internal/expected outcomes.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 30, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 2, 2026, 8:11 AM ET / 12:11 UTC.
Summary
Keep open for targeted maintainer follow-up. Current main has a shared policy that suppresses Codex exec-like failure warnings when a normal user-facing reply exists, but the reported intermittent final-reply loss remains unverified on current main and the required sibling Codex protocol checkout is unavailable for a complete contract audit.
Reproducibility: no. for the full issue: current source proves the shared warning-policy mitigation, but no current-main channel run was available to verify the remaining final-reply-loss report.
Ways to help us reproduce this
Maintainer decision needed
Why: Current source directly addresses the warning-after-success path, but the report combines it with an intermittent delivery-loss claim that cannot be confirmed from source alone in this environment.
Next step
A bounded repair is not safe until an owner confirms whether any current-main behavior remains outside the shared exec-warning policy and provides a focused channel reproduction for final-reply delivery.
Security
Needs attention: The report describes possible exposure of internal command and workspace details in shared channels; current-main live verification is still needed to determine whether that exposure remains.
Review details
Best possible solution:
Verify one current-main Codex channel run containing a failed native command plus a final answer; if the final reply is delivered and no extra exec warning appears, close this umbrella and retain any independently reproducible reply-queue defect as a narrower issue.
Do we have a high-confidence way to reproduce the issue?
No for the full issue: current source proves the shared warning-policy mitigation, but no current-main channel run was available to verify the remaining final-reply-loss report.
Is this the best way to solve the issue?
Unclear: suppressing exec-like warnings after a normal reply is the correct shared owner boundary, but it does not by itself prove that an intermittent reply-dispatch failure is fixed.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
../codexis absent and the read-only sandbox cannot clone it.Codex review notes: model internal, reasoning high; reviewed against 8206bf1f858c.
Label changes
Label changes:
clawsweeper:needs-product-decision: Current issue advisory state no longer selects this label.clawsweeper:needs-info: Current issue advisory state no longer selects this label.Label justifications:
P1: Reports describe recurring channel-visible internal failures and an intermittent case where the final reply did not reach Discord.impact:message-loss: The issue includes evidence that a final reply persisted in session history but was absent from the Discord channel.impact:security: Channel-visible failure text can expose internal command summaries and workspace details.Evidence reviewed
Security concerns:
src/agents/embedded-agent-runner/run/payloads.ts:475Reported warnings include command summaries and workspace paths; a current-main channel run should confirm that the shared exec-warning policy prevents their delivery after a normal reply.
Confidence: 0.73
What I checked:
isErrorfrom a non-success item status before emitting a tool result, so status classification remains in the Codex projection boundary. (extensions/codex/src/app-server/event-projector-events.ts:171, 8206bf1f858c)showWarning: !hasUserFacingReply, and documents that Codex command executions are fail-closed for replay metadata rather than display semantics. (src/agents/embedded-agent-runner/run/payloads.ts:470, 8206bf1f858c)git blameattributes the exec-like warning branch, including its Codex-specific rationale, to commita5b8b7052b27fbc9607add5277c5b9d31a92ff7bon August 2, 2026. (src/agents/embedded-agent-runner/run/payloads.ts:475, a5b8b7052b27)main, whose checked-out head is8206bf1f858cba8125589869ac7e569f3f9c8b68. (src/agents/embedded-agent-runner/run/payloads.ts:475, a5b8b7052b27)../codexfor Codex-backed verdicts, but that checkout is absent and this read-only environment cannot clone it.maturity:stable. (qa/maturity-scores.yaml, 8206bf1f858c)Likely related people:
src/agents/embedded-agent-runner/run/payloads.ts,extensions/codex/src/app-server/event-projector-items.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.davefano commentedon Jun 10, 2026
Fresh 2026.6.5 Discord evidence from Dave/Ratchet fleet, reported 2026-06-09 21:17 EDT in #oc-updates.
Screenshot shows a normal assistant response about a Linear view, followed by a separate channel-visible warning:
This is not the direct-chat leak covered by #89975. It is a Discord channel-visible Codex/shell command status warning, apparently emitted after normal assistant-visible content. It matches this issue’s shared Codex-native status -> lastToolError -> visible fallback-warning path.
Version context: the fleet machines recently updated to OpenClaw 2026.6.5 and the issue still reproduces there.
davefano commentedon Jun 10, 2026
Additional confirmed
2026.6.5repro from a private Discord channel.Observed sequence:
2026.6.5, Discord channel session, OpenAI Codex runtime, modelgpt-5.5.⚠️ 🛠️ <bash command summary> failed.4, same bot author, same channel, no embeds/attachments.Matching transcript event:
bashtool result was markedisError: true.jq: parse error: Unfinished string at EOF/Unfinished JSON term at EOF.Important behavior: the failed tool did not block the final assistant response. The final response was already posted, then the tool-status failure was promoted to user-visible Discord output as a second message. This looks like command/tool status delivery leaking independently of assistant-message delivery, not a normal assistant-authored error message.
bhattman-dev commentedon Jun 12, 2026
New evidence: on Discord this is not only a cosmetic banner — the final assistant reply can be lost entirely, with the channel-visible
⚠️ … failedwarning being the only thing delivered. This matches theimpact:message-losslabel more literally than the existing reports.Setup: OpenClaw
2026.6.1(npm global, macOS), Codex app-server runtime, modelopenai/gpt-5.5, Discord channel session,streaming.mode: "progress".Observed sequence (2026-06-12, verified on both ends):
rgover one file, exit1= no matches) → projected as a failed nativecommandExecutionitem — the exact shape this issue describes.agent_messagefollowed bytask_completecarrying the full answer aslast_agent_message.⚠️ 🛠️ search "…" in <file> (agent) failedwarning. The final reply was never posted. Verified by the channel owner: the reply is visible in the native app but absent from Discord.agent_end success=trueand zero Discord delivery errors/warns in the window — i.e. the visible-reply payload appears to never be enqueued for the channel, rather than failing at send time.Ruled out locally: model ending the turn early (clean
task_complete); run timeout (740s against an 1800s budget, 240s completion-idle never tripped);message-tool source-reply suppression (tool not used in the turn); Discord API send failures (nothing logged).Frequency context: across ~2.5 weeks of sessions on this gateway, ~6% of tool results carry
isError(mostly benign expected-negative checks and probes of optional files, per this issue), so the warning path is exercised constantly; the full reply-loss variant is intermittent but recurring enough that the user reported it as "happens all the time across all sessions."Because the reply survives in canonical session history but never reaches the channel, this looks adjacent to the reply-queue/visible-reply work slated for
2026.6.6(#91450 "remove drained reply-queue items by identity", #91566 "recover stale main and visible replies") and the Telegram streamed-text fix (#88682). If those are believed to cover this path, a Discord regression test for "turn with interleaved commentary + a failed native item still delivers the final answer" would pin it; if not, this is a distinct Discord dispatch bug co-located with thelastToolErrorwarning path discussed here.Happy to provide sanitized rollout/transcript excerpts on request.
15 remaining items
obviyus commentedon Aug 16, 2026
Retested through a real Telegram user on a post-fix checkout containing #103593. Codex ran an expected-negative
grepthat exited 1 with themessagetool disabled, then delivered the normal final reply. The recorded event stream contained no separate⚠️ … failedwarning.Closing as fixed by #103593. Please reopen with a current post-fix reproduction if the warning or final-reply loss recurs. Thanks!