Skip to content

Normal tool text outputs can degrade to “(see attached image)” placeholders in agent context #96861

Description

@rune-dandelion-cult

Bug: Normal tool text outputs can degrade to (see attached image) placeholders in agent context

Summary

Normal OpenClaw tool text outputs can be delivered to the agent as literal (see attached image) placeholders, instead of the text bytes. This makes the assistant blind to ordinary command/status output in the agent-visible tool-result transcript/model context.

This appears related to, but broader than, #75674. #75674 covered MCP resource results being converted to (see attached image) and was closed after MCP EmbeddedResource normalization landed in v2026.6.6 / PR #90728. The current live repro is not limited to MCP resources: ordinary text tool results from multiple tools were affected.

Live repro context

Observed in a Discord main session after provider/model churn involving Gemini/default, GitHub Copilot fallback, and a later pin to github-copilot/gpt-5.5.

Affected ordinary text outputs included:

  • exec output, including simple command/status output
  • session_status
  • gh / GitHub CLI output, including gh issue view
  • gh issue view output saved to JSON and then read back with the read tool
  • message-tool result visibility also became unreliable in the same session

In the affected session, the agent-visible tool-result transcript/model context repeatedly contained literal (see attached image) instead of the expected text bytes.

A clean peer lane could retrieve the same source bytes normally. For example, gh issue view 75674 --repo openclaw/openclaw --json number,title,state,url,body returns normal JSON/text from an unaffected session, while the affected session receives (see attached image) in the agent-visible tool-result transcript/model context.

Concrete repro packet from live session

One affected boundary observed in the live Discord main session:

  • Tool call shape: ordinary text-returning tool invocation, e.g. exec / session_status / gh issue view ... --json ... / read of a saved JSON file.
  • Expected source bytes: the underlying command/file source is ordinary text. A clean peer lane can retrieve the same bytes as text/JSON.
  • Observed in affected session: the agent-visible tool-result transcript/model context contains the literal placeholder (see attached image) instead of the text output.

Concrete example to verify from transcript before filing:

  • Expected: gh issue view 75674 --repo openclaw/openclaw --json number,title,state,url,body,comments returns issue JSON; clean lane verified MCP tool result with type: "resource" is converted to "(see attached image)" placeholder #75674 title/body and closure context.
  • Affected-session observation: Ronan reported the corresponding gh issue view / saved-JSON read path as (see attached image) / unable to inspect the saved JSON, while peer lanes could retrieve the same issue normally.

This indicates the source bytes exist and the tool call is not inherently image-producing; the failure is in tool-result content materialization into the agent-visible transcript/model context.

Expected behavior

Tool results whose payload is ordinary text/JSON/stdout should be passed to the agent as text in transcript/model context.

Actual behavior

Tool results whose payload is ordinary text/JSON/stdout can be materialized into the agent-visible transcript/model context as the literal placeholder (see attached image). The agent then cannot inspect the command/status/JSON output, even though the source bytes exist and clean peer lanes can retrieve them normally.

Related issues

Notes

The important boundary is agent-visible transcript/model context, not just UI rendering. In the live repro, the assistant instance received (see attached image) where ordinary text tool output should have been available.

In this repro, pinning from Gemini/default to github-copilot/gpt-5.5 briefly restored readable tool bytes at least once (exec-ok, gh run list, and session_status confirming the model pin), but the session later remained unreliable. Because #95441 is still open, gpt-5.5 should be treated as a risky workaround rather than a fix.

Impact

When this trips, the agent can no longer safely inspect basic tool output. It may incorrectly treat commands/files/API responses as image attachments or missing text, blocking debugging and making public upstream writes unsafe without a clean peer verifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions