Skip to content

[Bug]: Discord/Codex runtime: message tool is terminal, so progress updates silently end the turn #106961

Description

@bruhsh

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

GitHub Issue Draft — OpenClaw

Repo: https://github.com/openclaw/openclaw/issues/new


Title: Discord/Codex runtime: message tool is terminal, so progress updates silently end the turn

Labels (suggest): bug, runtime, codex, discord


Summary

In the Discord channel surface with a Codex-backed agent, the message(action="send") tool behaves as a terminal dynamic tool: the first successful call releases/ends the agent turn. Because the same tool is the only way to post visible output to a Discord channel, any agent that uses message to send an early "starting / working on it" status update has its turn ended immediately, and the remaining planned tool calls and the actual final delivery never execute.

From the user's side this looks like: the agent replies once with a short status line and then goes silent, never finishing the task.

Environment

  • OpenClaw 2026.7.1
  • Surface: Discord channel (group)
  • Agent runtime: Codex (app-server)
  • Multiple agents observed with the same behavior (not agent-specific)

Observed log signal

Turn ends right after the first message call with a log line similar to:

codex app-server turn released after terminal dynamic tool result

Turn status is success, aborted: false — i.e. it is not a crash or user interrupt. The runtime intentionally treats the terminal tool result as the end of the turn.

Steps to reproduce

  1. Run a Codex-backed agent bound to a Discord channel.
  2. Have the agent call message(action="send") early to post a progress/ack line (e.g. "on it, will report back").
  3. Observe the turn ends after that call; subsequent tool calls and the final message never run.

Expected

An agent should be able to post an intermediate progress message to the channel and continue executing tool calls, then post a separate final message. Ending the turn should be tied to the agent actually finishing, not to any single message call.

Actual

The first message call is treated as terminal and ends the turn, dropping all remaining work.

Requested fix / options

  1. Add a non-terminal / progress message mode (e.g. message(kind="progress") or terminal: false) that posts to the channel without releasing the turn.
  2. Or split channel delivery into two tools: a non-terminal "commentary/progress to channel" and a terminal "final delivery".
  3. Or stop inferring "final" from a single message call; let the model signal end-of-turn explicitly.

Current workaround

Instruct agents to only ever call message once, as the very last action after all work/verification is done, and route all progress via native commentary. This works but is discipline-based, not enforced by the runtime, so it regresses easily.

Steps to reproduce

just update and talk in discord

Expected behavior

agents will only reply you with 1 msg saying they would work on the job, and work on the job until the job is done.

Actual behavior

agents will only reply you with 1 msg saying they would work on the job, and the whole conversation is done.

OpenClaw version

2026.7.1

Operating system

macOS Tahoe

Install method

No response

Model

chatgpt5.6,

Provider / routing chain

n/a

Additional provider/model setup details

No response

Logs

Screenshots, recordings, and evidence

No response

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationregressionBehavior that previously worked and now fails

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions