Environment
- OpenClaw version: v2026.1.29 (latest stable as of 2026-01-31)
- Commit: 6522de6
- Model: zai/glm-4.7
- Thinking: low
- Runtime: Linux 6.8.0-94-generic
- Session: agent:main:main (direct chat)
- Message channel: telegram
- Capability: inlineButtons
Description
Summary: The agent execution flow incorrectly determines tasks are "complete" after a message tool is called, ending the run without executing the next planned tool. This causes tasks to be dropped silently with no error reporting.
Steps to Reproduce
- User requests multi-step workflow (e.g., "Generate image, video, and text")
- Agent successfully executes step 1 (image generation) ✅
- Agent successfully executes step 2 (video generation) ✅
- Agent executes step 2a (status check via exec) ✅
- Agent executes step 2b (update via message tool) ✅
- Agent ends run without error ❌
- Next planned step (text generation) is never executed
- User must prompt again to trigger completion
Expected Behavior
Agent should:
- Execute all planned steps in sequence
- Only end when all steps complete
- Or explicitly signal completion/end state
- Report errors if a step fails
Actual Behavior
Agent:
- Ends run after message tool without waiting for next step
- No error is logged
- No timeout or failure indication
- Task is silently dropped
Log Evidence
From system logs (redacted for paths):
{"time":"2026-01-31T05:02:17.628Z", "tool":"exec", "action":"start", "toolCallId":"call_bed6885e670f42cab059d36b"}
{"time":"2026-01-31T05:02:17.655Z", "tool":"exec", "action":"end", "toolCallId":"call_bed6885e670f42cab059d36b"}
{"time":"2026-01-31T05:02:38.438Z", "tool":"message", "action":"start", "toolCallId":"call_4ef9a0925db1458fa5647d6d"}
{"time":"2026-01-31T05:02:41.458Z", "tool":"message", "action":"end", "toolCallId":"call_4ef9a0925db1458fa5647d6d"}
{"time":"2026-01-31T05:02:54.280Z", "action":"agent end", "runId":"fb784cdd-984c-46fd-90bb-e41dd365c405"}
// NOTE: No exec tool start event for text generation occurred!
Critical Gap:
- Message tool ended at 05:02:41.458
- Agent run ended at 05:02:54.280
- No tool execution happened in between
- Text generation never executed
Related Issues
- Partial fix exists: Commit
8ea8801d0 (2026-01-24)
- Fix description: "Agents: show tool error fallback when last assistant turn only invoked tools (prevents silent stops)"
- This fix is present in the installation
- But the bug still occurred after this fix was applied
- Suggests fix doesn't cover all cases or there's a regression
Impact
- Severity: Critical - multi-step workflows fail silently
- Frequency: Occurs in multi-step workflows when message tool is used
- Workaround: Dedicated sub-agents work reliably (isolated process)
- User Impact: Requires manual intervention/re-prompting to complete tasks
Additional Context
This appears to be a state machine issue where:
- Agent transitions to "DONE" state prematurely
- After calling
message tool (not exec or other tools)
- Without validating that all planned steps executed
- Multiple paths to "DONE" state exist without verification
Workaround
Currently using dedicated agent at /root/.openclaw/workspace/skills/pollinations-agent/ which:
- Runs in isolated process (cannot be dropped by main session)
- Validates all outputs before claiming completion
- Works reliably for all generation tasks
- Proves the issue is specific to main session's execution flow
Console Output
Session: agent:main:main
Model: glm-4.7
Tokens: 48k/205k (24%)
Gateway: Running
No errors reported
Debugging Attempts
Attempted:
- System log analysis (found evidence of agent end)
- Changelog review (found related fix from Jan 24)
- Issue search (no exact match for this specific case)
- Version verification (confirmed fix is installed)
- Environment status check (no errors reported)
Scope of Bug
Confirmed to affect:
- Main session: agent:main:main
- Message channel: Telegram
- Tool: message tool specifically
- Pattern: Multi-step workflows with mid-workflow updates
Confirmed NOT to affect:
- Single-step commands
- Isolated sub-agents (pollinations-agent works perfectly)
- Direct exec commands
- Tool calls before message tool
Additional Context
This bug affects:
- User productivity: Requires manual intervention to complete tasks
- Agent reliability: Silent failures reduce trust
- Multi-step workflows: Common pattern for complex tasks
- Development workflows: Affects testing and debugging
Console Output
Additional Observations
- Message tool appears to be trigger: The bug consistently occurs after a
message tool call, suggesting this tool may be triggering premature completion
- No timeout indication: 21-second gap between exec end (05:02:17) and message start (05:02:38) with no error logged
- Workaround verification: When using dedicated pollinations-agent (isolated process), all three generations (image, video, text) complete successfully
- Session state: Active session shows healthy token usage (24%) with no resource warnings
Reproduction Steps
- Send multi-step request to agent: "Generate image, then video, then text"
- Observe agent planning phase (may show "I'll generate...")
- Wait for image generation to complete (exec tool)
- Wait for video generation to complete (exec tool)
- Agent sends status update: "Now generating text with Pollinations..." (message tool)
- BUG OCCURS HERE: Agent run ends without calling text generation API
- No further tool execution happens
- User must send new message to trigger completion
on types
Additional Notes
- Token usage is well within limits (24%)
- No resource exhaustion indicators
- Clean "agent end" without error
- Silent failure is hallmark of this bug
- Affects multi-step workflows specifically
- Pattern: Message tool → premature completion
Environment
Description
Summary: The agent execution flow incorrectly determines tasks are "complete" after a message tool is called, ending the run without executing the next planned tool. This causes tasks to be dropped silently with no error reporting.
Steps to Reproduce
Expected Behavior
Agent should:
Actual Behavior
Agent:
Log Evidence
From system logs (redacted for paths):
{"time":"2026-01-31T05:02:17.628Z", "tool":"exec", "action":"start", "toolCallId":"call_bed6885e670f42cab059d36b"} {"time":"2026-01-31T05:02:17.655Z", "tool":"exec", "action":"end", "toolCallId":"call_bed6885e670f42cab059d36b"} {"time":"2026-01-31T05:02:38.438Z", "tool":"message", "action":"start", "toolCallId":"call_4ef9a0925db1458fa5647d6d"} {"time":"2026-01-31T05:02:41.458Z", "tool":"message", "action":"end", "toolCallId":"call_4ef9a0925db1458fa5647d6d"} {"time":"2026-01-31T05:02:54.280Z", "action":"agent end", "runId":"fb784cdd-984c-46fd-90bb-e41dd365c405"} // NOTE: No exec tool start event for text generation occurred!Critical Gap:
Related Issues
8ea8801d0(2026-01-24)Impact
Additional Context
This appears to be a state machine issue where:
messagetool (notexecor other tools)Workaround
Currently using dedicated agent at
/root/.openclaw/workspace/skills/pollinations-agent/which:Console Output
Debugging Attempts
Attempted:
Scope of Bug
Confirmed to affect:
Confirmed NOT to affect:
Additional Context
This bug affects:
Console Output
Additional Observations
messagetool call, suggesting this tool may be triggering premature completionReproduction Steps
on types
Additional Notes