Repository navigation
Description
Bug type: Behavior
Beta blocker: No
Summary
When an assistant turn consists only of the silence token NO_REPLY (with or without reasoning), the embedded agent runner strips the payload as "silent" before the turn-completion check, so the run sees payloads=0, logs empty response detected, retries with visible-answer continuation, then surfaces an incomplete-turn error and marks the model candidate failed with reason=format — cascading through every fallback model (which each also reply NO_REPLY) until a codex-harness model answers via the heartbeat_respond tool.
Environment
- OpenClaw version: 2026.6.5 (5181e4f), npm global install
- OS: Windows 11 Pro
- Node: v24.14.1
- Models / routing chain: primary
openai/gpt-5.5(agentRuntimecodex), fallbackszai/glm-5.1 → glm-5 → glm-5-turbo → glm-4.6 → glm-4.5-air(customopenai-completionsprovider), heartbeat modelzai/glm-4.5-flash - First observed: immediately after upgrading 2026.5.7 → 2026.6.5. We cannot confirm whether 2026.5.7 was affected (Agent returns payloads=0 on every turn — empty response from anthropic provider on fresh 2026.5.7 install #80535 reports a similar signature on 2026.5.7 with Anthropic).
Steps to reproduce
- Configure a text-reply (non-codex-harness) model — any zai GLM model reproduces reliably — as the active model for heartbeats (or any embedded run where the model may legitimately choose silence).
- Configure several fallback models of the same family.
- Trigger a heartbeat with nothing actionable (
openclaw system event --mode now --session-key agent:<id>:main, or just wait for the cadence). - The model replies
NO_REPLY(the system prompt advertises it as the correct way to stay silent, and an idle heartbeat poll is exactly that case).
Expected behavior
A NO_REPLY-only assistant turn is a successful silent turn: suppress delivery, complete the run, no retry, no candidate failure, no model fallback.
Actual behavior
Every fallback candidate is tried and "fails" in sequence (~2 minutes per heartbeat, ~10 LLM calls), ending on the codex-harness primary. The surviving model is then persisted as a session modelOverride (modelOverrideSource: "auto"), so subsequent heartbeats permanently run on the expensive primary instead of the configured cheap heartbeat model.
15:26:45 [agent/embedded] empty response detected: runId=b7fc606b… provider=zai/glm-5.1 — retrying 1/1 with visible-answer continuation
15:26:50 [agent/embedded] empty response retries exhausted: … provider=zai/glm-5.1 attempts=1/1 — surfacing incomplete-turn error
15:26:50 [agent/embedded] incomplete turn detected: … stopReason=stop hasLastAssistant=yes hasCurrentAttemptAssistant=yes payloads=0 tools=0 replaySafe=yes … emptyRetries=1/1 … — surfacing error to user
15:26:50 [model-fallback/decision] decision=candidate_failed requested=zai/glm-5.1 candidate=zai/glm-5.1 reason=format next=zai/glm-5 detail=zai/glm-5.1 ended with an incomplete terminal response
…identical sequence repeats for glm-5, glm-5-turbo, glm-4.6, glm-4.5-air…
15:28:03 [model-fallback/decision] decision=candidate_succeeded requested=zai/glm-5.1 candidate=openai/gpt-5.5 reason=unknown next=none
The session transcript proves the models were never empty — every "failed" turn is a well-formed NO_REPLY reply, exactly as instructed:
ASSISTANT model=glm-5.1 stop=stop content=[thinking:"Heartbeat poll - nothing to do." | text:"NO_REPLY"]
ASSISTANT model=glm-5 stop=stop content=[text:"NO_REPLY"]
ASSISTANT model=glm-5-turbo stop=stop content=[text:"NO_REPLY"]
ASSISTANT model=glm-4.6 stop=stop content=[thinking:"The user is sending heartbeat poll messages…" | text:"NO_REPLY"]
Root cause (from the 2026.6.5 published bundle)
In buildEmbeddedRunPayloads (src/agents/embedded-agent-runner/run/payloads.ts), a NO_REPLY-only payload is removed by the final filter:
if (payload.text && isSilentReplyPayloadText(payload.text, "NO_REPLY")) {
const silentText = payload.text;
payload.text = void 0;
if (hasReplyPayloadContent(payload)) return payload; // keep if media etc. remain
payload.text = silentText; // restore: text-only silent reply
}
return payload;
}).filter((p) => {
if (!hasReplyPayloadContent(p)) return false;
if (p.text && isSilentReplyPayloadText(p.text, "NO_REPLY")) return false; // ← dropped here
return true;
});The caller (src/agents/embedded-agent-runner/run.ts) then computes payloadCount = payloadsForTerminalPath?.length ?? 0 → 0, and the empty-response retry path fires:
if (!nextPlanningOnlyRetryInstruction && !nextReasoningOnlyRetryInstruction
&& nextEmptyResponseRetryInstruction
&& emptyResponseRetryAttempts < maxEmptyResponseRetryAttempts) {
emptyResponseRetryAttempts += 1;
log.warn(`empty response detected: … retrying … with visible-answer continuation`);
continue;
}After exhaustion the incomplete-turn error surfaces and the model-fallback layer classifies the candidate as reason=format ("ended with an incomplete terminal response"). There is an emptyAssistantReplyIsSilent flag consulted when building the incomplete-turn payload text, but the retry trigger and the candidate-failure classification fire regardless, so silence is still treated as failure.
Codex-harness models escape because the heartbeat response arrives via the heartbeat_respond tool — createHeartbeatToolResponsePayload (src/auto-reply/heartbeat-tool-response.ts) stores the token in channelData, which the silent-text filter never touches.
Suggested fix
Detect "the only payload was a silence token" before (or inside) the empty-response check — e.g. have buildEmbeddedRunPayloads return a wasSilentReply signal, or set emptyAssistantReplyIsSilent earlier — and treat that as a completed silent turn: no empty response detected retry, no incomplete-turn error, no candidate_failed, no sticky auto modelOverride.
Workaround (for anyone else hitting this)
Override the heartbeat prompt to forbid the silence token:
agents: { defaults: { heartbeat: {
prompt: "Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply with exactly HEARTBEAT_OK. Never reply NO_REPLY to a heartbeat poll."
} } }HEARTBEAT_OK passes the payload filter and is still suppressed from delivery by the heartbeat visibility filter. (A first-attempt NO_REPLY retry can still occur with small models, but the in-run visible-answer retry now recovers on the same model instead of cascading.)
Related (all closed; none covers this mechanism)
- Agent returns payloads=0 on every turn — empty response from anthropic provider on fresh 2026.5.7 install #80535 — same
payloads=0/ empty-response signature on 2026.5.7 with Anthropic (no root cause identified) - Gateway process exits after reasoning-only retry exhaustion on embedded agent turn (gpt-5.4-mini) #71516 — reasoning-only retry exhaustion via the same visible-answer continuation path
- [Bug] Agent completes task but sends no reply to user (dispatch complete with queuedFinal=false, replies=0) #60607 —
replies=0silent dispatch involvingNO_REPLY - Heartbeat + auth fallback + message tool creates cascading delivery-mirror feedback loop #74034 — heartbeat + fallback cascade (delivery-mirror loop variant)
- NO_REPLY silent reply suppression fails when model prefaces with reasoning or emits doubled token #69470, isSilentReplyText regex too permissive — suppresses substantive replies ending with NO_REPLY #19537 — earlier
NO_REPLYdetection fragility (overmatch/undermatch)
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 10, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 11, 2026, 6:25 AM ET / 10:25 UTC.
Summary
Codex review failed: timeout (exit 0).
Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.
Ways to help us reproduce this
Next step
Review did not complete, so no work-lane recommendation was made.
Review details
Best possible solution:
Retry the Codex review after fixing the execution failure.
Do we have a high-confidence way to reproduce the issue?
Unclear. The review failed before ClawSweeper could establish a reproduction path.
Is this the best way to solve the issue?
Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.
AGENTS.md: unclear because the file could not be read completely.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against c692fabeba07.
Label changes
Label changes:
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:needs-info: Current issue advisory state selects this label.P1: Current review triage priority is none.clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.clawsweeper:queueable-fix: Current issue advisory state no longer selects this label.clawsweeper:source-repro: Current issue advisory state no longer selects this label.impact:auth-provider: Current review selected no impact labels.issue-rating: 🦞 diamond lobster: Current issue advisory state no longer selects this label.Evidence reviewed
What I checked:
Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.