Skip to content

[Bug]: 2026.5.19 Discord shows failed file reads in chat #85310

Description

@jasonftl

[Bug]: 2026.5.19 Discord shows failed file reads in chat

Existing issue check:

Bug type

Behavior bug

Beta release blocker

No

Summary

Discord can show internal failed file-read messages such as print lines 1-220 from memory/2026-05-22.md (agent) failed or print lines 1-220 from ~/.openclaw/workspace/skills/gemini/SKILL.md (agent) failed as normal app output.

Steps to reproduce

  1. Run OpenClaw 2026.5.19 with Discord enabled.
  2. Start an agent turn from a Discord-delivered workflow where the agent tries to read a missing workspace file.
  3. In this install, the observed workflow was a scheduled Discord channel turn.
  4. Observe the Discord channel after the turn finishes.

Expected behavior

Discord should show the user-facing reply or job output only. Failed internal file-read attempts should stay in logs or diagnostics and should not appear as app messages in the channel.

Actual behavior

Discord showed this internal failed tool message:

⚠️ 🛠️ `print lines 1-180 from memory/2026-05-20.md (agent)` failed

The same bug is still present after upgrading to 2026.5.20:

⚠️ 🛠️ `print lines 1-220 from memory/2026-05-22.md (agent)` failed

The same visible-failure shape was also observed for a skill instruction file:

⚠️ 🛠️ `print lines 1-220 from ~/.openclaw/workspace/skills/gemini/SKILL.md (agent)` failed

OpenClaw version

2026.5.19 (a185ca2)

Operating system

macOS 26.5 (25F71)

Install method

Source checkout with pnpm build. Gateway runs from the built source checkout.

Model

openai/gpt-5.5

Provider / routing chain

Discord -> OpenClaw Gateway -> Codex runtime -> openai/gpt-5.5

Additional provider/model setup details

Relevant local config:

agents.defaults.model.primary = openai/gpt-5.5
agents.defaults.models.openai/gpt-5.5.agentRuntime.id = codex
channels.discord.streaming.mode = off
messages.groupChat.visibleReplies = message_tool

Logs, screenshots, and evidence

OpenClaw version and source state at the time of the primary observed failure:

$ openclaw --version
OpenClaw 2026.5.19 (a185ca2)

$ node --version
v22.22.3

$ git -C openclaw-src describe --tags --exact-match
v2026.5.19

$ git -C openclaw-src rev-parse --short=12 HEAD
a185ca283a74

The primary 2026.5.19 failure came from an agent attempt to read a missing memory file:

sed -n '1,220p' memory/2026-05-20.md
sed: memory/2026-05-20.md: No such file or directory

The relevant file was missing on disk:

$ ls -l ~/.openclaw/workspace/memory/2026-05-20.md
ls: ~/.openclaw/workspace/memory/2026-05-20.md: No such file or directory

A later 2026.5.20 run showed the bug is still present. Local launchd job log shows the user-facing scheduled summary followed by the failed internal read message:

**Scheduled summary: 3 item(s) need attention**

Summary body omitted here because it contains site-specific operational details.

[normal user-facing summary content]

⚠️ 🛠️ `print lines 1-220 from memory/2026-05-22.md (agent)` failed
delivered scheduled summary

Gateway log for the same event:

<timestamp> ⚠️ 🛠️ `print lines 1-220 from memory/2026-05-22.md (agent)` failed

Impact and severity

Affected: Discord channels on this install.

Severity: Medium annoyance. The main work can still complete, but Discord shows internal failed tool messages that look like app errors.

Frequency: Seen on this install across 2026.5.19 and still present in 2026.5.20, with different memory files.

Consequence: Users see noisy implementation details in chat, and routine automation or skill-backed turns can look broken even when the useful output was delivered.

Additional information

This looks related to the broader Discord internal-output leak tracked in #44905, but the visible symptom here is narrower and easy to search for: failed file reads are rendered as print lines ... failed app messages.

Local workaround for the scheduled job was to stop using an agent turn for a simple summary and send the formatted summary directly. That avoids this one job path, but it does not address Discord showing failed file-read messages from other agent turns.

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions