openclaw - 💡(How to fix) Fix [Bug]: Telegram channel runtime drops exec/grep tool output for openai/gpt-5.1-codex [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59405Fetched 2026-04-08 02:24:11
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

Version: 2026.3.13 Model: openai/gpt-5.1-codex (API key auth) Channel: Telegram Symptom: exec, grep, find tools fire but return no output to agent context in Telegram sessions. Same queries work correctly in TUI. ls tool works in TUI but not Telegram. Elevated: enabled Tools profile: minimal with group:fs, group:runtime allowed

Root Cause

Version: 2026.3.13 Model: openai/gpt-5.1-codex (API key auth) Channel: Telegram Symptom: exec, grep, find tools fire but return no output to agent context in Telegram sessions. Same queries work correctly in TUI. ls tool works in TUI but not Telegram. Elevated: enabled Tools profile: minimal with group:fs, group:runtime allowed

Code Example

**6. Send this message to the Telegram bot:**

---

**7. Observe agent response in Telegram.**

---

## Expected Behavior

Agent executes `cat` via exec tool and returns file contents in its response, identical to TUI behavior.

---

## Actual Behavior

Agent fires exec tool calls but receives no output. Responds with:

---

Gateway log confirms message was sent:

---

But tool output was never returned to agent context.

---

## Confirmed Working

Identical query via TUI returns correct corpus content:

---

---

## Tools Confirmed Firing But Returning No Output in Telegram

---
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Version: 2026.3.13 Model: openai/gpt-5.1-codex (API key auth) Channel: Telegram Symptom: exec, grep, find tools fire but return no output to agent context in Telegram sessions. Same queries work correctly in TUI. ls tool works in TUI but not Telegram. Elevated: enabled Tools profile: minimal with group:fs, group:runtime allowed

Steps to reproduce

  1. Configure OpenClaw with the following agent setup: { "id": "culinary-rd", "model": "openai/gpt-5.1-codex", "tools": { "profile": "minimal", "allow": ["group:fs", "group:runtime", "web_search", "web_fetch"], "deny": ["group:sessions", "group:memory", "group:ui", "group:automation", "group:messaging", "group:nodes", "image"], "elevated": { "enabled": true } } }

  2. Bind the agent to a Telegram bot account: { "type": "route", "agentId": "culinary-rd", "match": { "channel": "telegram", "accountId": "culinary-rd-bot" } }

  3. Create a markdown file in the agent workspace: mkdir -p ~/.openclaw/workspace-culinary-rd/corpus/ingredients echo "# Yogurt\n## Functional Role\n- Acts as marinade medium" \

~/.openclaw/workspace-culinary-rd/corpus/ingredients/yogurt.md

  1. Confirm file is readable from terminal: cat ~/.openclaw/workspace-culinary-rd/corpus/ingredients/yogurt.md

Returns file content correctly

  1. Start the gateway: openclaw gateway --force

**6. Send this message to the Telegram bot:**

Please run: cat /full/path/to/corpus/ingredients/yogurt.md and tell me what you see


**7. Observe agent response in Telegram.**

---

## Expected Behavior

Agent executes `cat` via exec tool and returns file contents in its response, identical to TUI behavior.

---

## Actual Behavior

Agent fires exec tool calls but receives no output. Responds with:

I searched the corpus but found no relevant file for yogurt.


Gateway log confirms message was sent:

[telegram] sendMessage ok chat=XXXXXXXXX message=195


But tool output was never returned to agent context.

---

## Confirmed Working

Identical query via TUI returns correct corpus content:

What does the corpus say about yogurt? → Agent successfully reads and summarizes corpus/ingredients/yogurt.md


---

## Tools Confirmed Firing But Returning No Output in Telegram

exec + find → fires, no output exec + cat → fires, no output
exec + bash → fires, no output exec + python → fires, no output native grep → fires, no output native ls → fires, no output

Additional Context

Telegram bot dmPolicy is set to pairing Telegram bot streaming set to off (tested, no effect) groupPolicy set to open Auth method: OpenAI API key (not OAuth) Previously tested with openai-codex/gpt-5.4 via ChatGPT OAuth — same behavior elevated.enabled: true set — no effect on Telegram tool output yieldMs: 5000 instructed in AGENTS.md — no effect

Expected behavior

Agent executes the tool calls (exec, grep, find, cat) and returns the file contents in its Telegram response, exactly as it does when the same query is sent via TUI.

Expected Telegram response example:

Based on corpus/ingredients/yogurt.md:

Yogurt functions as both a dairy ingredient and a culinary tool. Its main roles are:

  • Acidity and tang via lactic fermentation
  • Moisture contribution in marinades
  • Mild dairy fat for richness
  • Tenderizing support in protein marinades
  • Body and softness in sauces, dips, and batters

Tool execution should be transparent — the agent fires exec/cat/grep, receives the file output back into its context, and answers strictly from the retrieved content, citing the source filename.

This behavior is confirmed working in TUI for the identical agent, model, workspace, and corpus configuration. The Telegram channel runtime should produce the same result.

Actual behavior

The agent fires exec, grep, find, and cat tool calls but receives no output back into its context in the Telegram channel runtime. The agent responds with the corpus failure message defined in AGENTS.md:

"I searched the corpus but found no relevant file for yogurt."

Evidence:

  • Gateway log confirms message was delivered: [telegram] sendMessage ok chat=8432767625 message=195
  • TUI session with identical agent, model, workspace, and corpus configuration successfully reads and summarizes the same file in the same turn
  • Tools confirmed firing with no output returned in Telegram: exec+find, exec+cat, exec+bash, exec+python, native grep, native ls
  • File confirmed readable from terminal: cat /Users/OC-Agent/.openclaw/workspace-culinary-rd/corpus/ingredients/yogurt.md returns full content
  • elevated.enabled: true, streaming: off, groupPolicy: open, yieldMs: 5000 instructed in AGENTS.md — no effect on Telegram tool output

OpenClaw version

2026.3.13 (61d171a)

Operating system

macOS, Apple Silicon, Node 22

Install method

npm/pnpm package manager (not a git checkout)

Model

openai/gpt-5.1-codex

Provider / routing chain

OpenAI API key (pay-as-you-go, platform.openai.com) → openai/gpt-5.1-codex → OpenClaw gateway (local, loopback, port 18789) → Telegram channel (culinary-rd-bot account) → agent culinary-rd

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can be resolved by investigating and adjusting the configuration or implementation of tool output handling in the Telegram channel runtime, as the tools are firing but not returning output to the agent context.

Guidance

  1. Verify tool execution: Confirm that the tools (exec, grep, find, cat) are indeed executing and that the issue lies in the output not being returned to the agent context.
  2. Check Telegram channel configuration: Review the Telegram channel configuration, including the bot settings and the OpenClaw gateway configuration, to ensure that there are no restrictions or misconfigurations preventing tool output from being returned.
  3. Investigate output handling: Examine the code or configuration responsible for handling tool output in the Telegram channel runtime to identify why the output is not being returned to the agent context.
  4. Compare with TUI implementation: Compare the implementation of tool output handling in the Telegram channel runtime with the TUI implementation, which is confirmed to be working, to identify any differences or potential issues.

Example

No specific code snippet can be provided without more information about the implementation details of the OpenClaw gateway and the Telegram channel runtime. However, the investigation should focus on the differences between the TUI and Telegram channel implementations.

Notes

The issue seems to be specific to the Telegram channel runtime, as the same queries work correctly in the TUI. The investigation should focus on identifying the differences between these two environments and adjusting the configuration or implementation accordingly.

Recommendation

Apply a workaround by modifying the Telegram channel configuration or the OpenClaw gateway implementation to handle tool output correctly, as the root cause of the issue is likely related to the specific environment or configuration.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Agent executes the tool calls (exec, grep, find, cat) and returns the file contents in its Telegram response, exactly as it does when the same query is sent via TUI.

Expected Telegram response example:

Based on corpus/ingredients/yogurt.md:

Yogurt functions as both a dairy ingredient and a culinary tool. Its main roles are:

  • Acidity and tang via lactic fermentation
  • Moisture contribution in marinades
  • Mild dairy fat for richness
  • Tenderizing support in protein marinades
  • Body and softness in sauces, dips, and batters

Tool execution should be transparent — the agent fires exec/cat/grep, receives the file output back into its context, and answers strictly from the retrieved content, citing the source filename.

This behavior is confirmed working in TUI for the identical agent, model, workspace, and corpus configuration. The Telegram channel runtime should produce the same result.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING