Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingdocsImprovements or additions to documentationImprovements or additions to documentationimpact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Summary
In the main assistant session, both exec and read tools frequently return empty output. Simple commands like echo hello world and whoami return nothing. Reading existing files (e.g. SOUL.md, BUG-REPORT.md) returns empty. The bug is intermittent and session-specific: sub-agents spawned from the same host work correctly, and host="gateway" sometimes briefly restores output.
Affected docs path(s) or URL(s)
n/a
Steps to reproduce / verify
- Start OpenClaw on Windows 11 with 2026.6.10/11.
- In the main session, run
execwithecho hello world. - Observe empty output.
- Run
readon any existing file (e.g.SOUL.md). - Observe empty output.
- Try
host="gateway"— output may return briefly, then fail again. - Spawn a sub-agent via
sessions_spawnand run the same command — output works correctly.
Expected docs behavior/content
exec echo hello worldshould returnhello world.read SOUL.mdshould return the file contents.
Actual docs behavior/content
- Both return empty strings.
- No error message is shown.
- The failure is silent.
Impact
host="gateway"temporarily restores output then fails again.memory_searchand other non-exec/read tools continue working.
Evidence
- Sub-agents work fine.
host="gateway"temporarily restores output then fails again.memory_searchand other non-exec/read tools continue working.
Additional information
- [Bug]: > All tool results return "(see attached image)" literal string instead of actual output. #104721 — Windows 11, "(see attached image)" / empty output on 2026.6.10/11
- [Bug]: Tool output (exec, web_fetch, web_search) returns empty after first call per turn [2026.6.11 regression] #98528 — Tool output returns empty after first call per turn on 2026.6.11
- Historical 2026.2.x Windows non-PTY detached-spawn regression, fixed by disabling detached spawn on Windows. This is a recurrence of the Windows child-process stdout/stderr capture issue caused by
detached: truespawn options reaching Node'schild_process.spawnon Windows.
The current dist already disables detached spawn in most individual call sites (supervisor, bash runtime, MCP, LSP, proxy, client), but those
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingdocsImprovements or additions to documentationImprovements or additions to documentationimpact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Activity
Artyomkun commentedon Jul 16, 2026
@clawsweeper
You skipped the description. Don't slack off. Get those claws on the keyboard—let's sort through those shells.
47 remaining items
tomatotomata commentedon Sep 17, 2026
That sounds like a useful next step. I have not started a code change, so I will leave the current-main audit and Windows repro with you rather than duplicate it. I was going to trace the tool-result hand-off against the pruning extension too, so a captured failing turn should help narrow down which boundary is dropping the text.
wusanjay commentedon Sep 17, 2026
Reproduction attempt on current main (2026.9.4, Windows 11, embedded runner, zai/glm-5.2)
Following the review's request for evidence on current main, I ran a reproduction attempt in an isolated
OPENCLAW_HOMEfrom a source checkout at 2026.9.4:exec echo hello world+readof an existing fileexec echo second-testread(cache-ttl pruning enabled viaagents.defaults.contextPruning.mode = "cache-ttl"), idle 330s, thenexec echo pruning-test-001Scenario 3 is the important one: it confirms the pruning branch actually ran (context >30% threshold + TTL expiry + model reported the tool result content gone), and the new
execoutput still came through intact.Code-audit notes on the remaining suspect
Reading the current path supports the earlier analysis:
pruneExpiredCacheTtlToolResults(src/agents/embedded-agent-runner/tool-result-truncation.ts) replaces eligible tool results with a placeholder text block (soft mode keeps first/last 1500 chars with a marker; hard mode writessettings.placeholder). It does not produce zero-content tool results, consistent with scenario 3.applyToolResultMiddleware(src/agents/harness/tool-result-middleware.ts) has a fast path returning the result unchanged when no middleware is registered — matching the "sub-agents unaffected" symptom. A middleware returning a valid-but-empty content array passescoerceMiddlewareToolResultand is delivered as-is (next.content ?? current.contentdoes not intercept[]), which remains the only path I can find that yields a silent blank.embedded-agent-runner/extensions.tsstill defaults non-arrayevent.contentto[]without error.Next step I plan: register a minimal tool-result middleware that returns
{ content: [] }to confirm whether that produces the reported silent-blank rendering, which would pin the sink (if not the original trigger).wusanjay commentedon Sep 17, 2026
Final repro result: middleware returning empty content does NOT blank output on current main
Follow-up to my earlier comment: I completed the middleware experiment planned there.
Setup: minimal local plugin registering an
AgentToolResultMiddlewarethat interceptsexecand returns{ content: [] }(side-effect file write confirms every invocation). Loaded via a Gateway start (plugin install from local path, capabilities accepted); turn run through the Gateway with zai/glm-5.2.Result: the middleware verifiably executed for
exec(invocation log), yet the model received the full raw output (mw-check-777) verbatim — no blank, no "post-processing error", no "(no output)" marker.Combined experiment matrix on 2026.9.4 (Windows 11, source checkout, embedded + gateway runs):
{ content: [] }for exec (execution verified)Conclusion: none of the four candidate paths reproduce the reported silent-blank behavior on current main. Together with the earlier code audit (pruning writes placeholders, not blanks), this suggests the regression reported against 2026.6.10/11 no longer reproduces on 2026.9.x — possibly fixed by changes between 2026.6 and 2026.9 (e.g. the middleware validation/fallback rework in
applyToolResultMiddleware).Suggestion: it would help if the original reporter (or anyone still seeing this) can retest on 2026.9.x and attach a failing turn. If nobody can reproduce on current main, this may be closable as fixed-in-current. Happy to keep digging if new evidence points at a path I have not covered (e.g. a specific provider transport or the Codex runtime middleware variants).
openclaw-barnacle commentedon Oct 23, 2026
This bug report has had no qualifying human activity for 30 days. Please retest on the current release and share the result.
Without new human activity, Barnacle may close it as not planned 14 days after this message was posted. This is administrative inactivity cleanup, not a claim that the problem is fixed.
A human update restarts the inactivity clock; a new PR head also restarts it. A maintainer can add no-stale for a durable hold, or bad-barnacle to suppress Barnacle. Remove the hold when work can resume.
steipete commentedon Oct 24, 2026
Thanks for filing this. We're closing older issues that no longer look actionable on current
main.A follow-up investigation could not reproduce empty exec/read output on current main, and the original report targets the 2026.6.x line. If this still happens on a recent release, please open a fresh issue with the version, OS, and a minimal repro.