-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Closed
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Summary
In reply-agent overflow recovery, two edge paths can finalize with no user-visible payload (effectively undefined/empty) instead of a deterministic fallback:
meta.error.kind == context_overflowwith emptypayloadswhen session reset is unavailable.- Overflow error payloads that normalize/filter to empty during reply payload construction.
Steps to reproduce
- Run
mainat98962ed81d26(package version2026.2.16). - Execute
runReplyAgentwith an embedded result containing:meta.error.kind: context_overflow- either
payloads: []or payload text that normalizes to empty (e.g. whitespace-only error text).
- Ensure reset is unavailable (no session store/sessionKey/storePath in this run context).
- Observe finalization output.
Expected behavior
Overflow failure paths should always return a deterministic user-facing fallback payload.
Actual behavior
In the two edge paths above, finalization can return no renderable payload (undefined/empty outcome).
OpenClaw version
2026.2.16 (main @ 98962ed81d26)
Operating system
Ubuntu 25.10
Install method
Source checkout + pnpm
Logs, screenshots, and evidence
Overflow signatures involved include:
Context overflow: prompt too largeContext overflow: Summarization failed: 400 {"message":"prompt is too long"}
Code-path pointers:
src/auto-reply/reply/agent-runner-execution.ts(embedded overflow meta-error handling)src/auto-reply/reply/agent-runner.ts(empty payload/finalization path)
Impact and severity
- Affected: any channel hitting overflow edge paths where recovery output is empty/non-renderable.
- Severity: High reliability impact (silent/empty outcomes are hard to triage).
- Frequency: Edge-case, deterministic with targeted conditions.
- Consequence: missing actionable error response to the user/operator.
Additional information
Related upstream work (adjacent but not complete coverage for this path):
- fix: return user-facing error when session reset after compaction failure #1187
- Context overflow after failed compaction should trigger fallback failover #18095
- fix: improve context overflow error messages and docs #18997
- fix: improve context overflow error with diagnostic details #15749
- feat: progressive compaction escalation and mechanical flush fallback #18663
- [Bug] Telegram receives 'Context overflow' errors while dashboard shows correct responses #18719
I have a narrowly scoped fix prepared in my fork that:
- Forces deterministic overflow fallback when embedded overflow meta-error has zero payloads.
- Ensures runner finalization uses overflow fallback when payload arrays normalize/filter to empty.
- Adds two regression tests for those exact paths.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity