Skip to content

Comments

Add message when context is exhausted instead of leaving the user hanging#49

Closed
simonsickle wants to merge 1 commit intoopenclaw:mainfrom
simonsickle:ssickle/fix-context-exhausted
Closed

Add message when context is exhausted instead of leaving the user hanging#49
simonsickle wants to merge 1 commit intoopenclaw:mainfrom
simonsickle:ssickle/fix-context-exhausted

Conversation

@simonsickle
Copy link

@simonsickle simonsickle commented Dec 24, 2025

Context was getting exhausted and clawd would just stop responding to me... This at least gives a hint!

@simonsickle simonsickle force-pushed the ssickle/fix-context-exhausted branch from 20e8937 to e7b3f00 Compare December 24, 2025 05:45
@steipete
Copy link
Contributor

Hmmm this should autocompact! I'll debug.

@steipete
Copy link
Contributor

I fixed code on main that should prevent this from happening.

@steipete
Copy link
Contributor

Closed: implemented centrally in getReplyFromConfig + compaction retry handling/tests. Commits: 9683b0b3 (overflow fallback + compaction wait/reset + tests), a2ad0cc7 (pi-mono deps bump).

@steipete steipete closed this Dec 26, 2025
@simonsickle simonsickle deleted the ssickle/fix-context-exhausted branch December 31, 2025 02:27
@jayhickey
Copy link
Contributor

Are we sure this is resolved? I'm hitting this on main, looks like compaction is failing or something?

04:15:33 [agent/embedded] embedded run tool end: runId=4f359efe-a791-416f-9eee-06d2e29ac44d tool=browser toolCallId=toolu_015C1pFUfdUj1VoKBes1T6m8
[gws] ⇄ res ✓ cron.status 0ms id=A53978D9…AE0E
[gws] ⇄ res ✓ cron.list 0ms id=701AC92D…8612
[gws] ⇄ res ✓ node.list 1ms id=92FDE3D6…F438
04:15:37 [agent/embedded] embedded run tool start: runId=4f359efe-a791-416f-9eee-06d2e29ac44d tool=browser toolCallId=toolu_01HzSEn4xqJmdf1LXs3CQkEP
[gws] → event agent seq=2126 clients=1 run=4f359efe…c44d stream=tool aseq=119 tool=start:browser call=toolu_01HzSE…QkEP
[gws] → event agent seq=2127 clients=1 run=4f359efe…c44d stream=tool aseq=120 tool=result:browser call=toolu_01HzSE…QkEP meta=snapshot err=false
04:15:37 [agent/embedded] embedded run tool end: runId=4f359efe-a791-416f-9eee-06d2e29ac44d tool=browser toolCallId=toolu_01HzSEn4xqJmdf1LXs3CQkEP
04:15:37 [agent/embedded] embedded run agent end: runId=4f359efe-a791-416f-9eee-06d2e29ac44d
04:15:37 [agent/embedded] embedded run compaction start: runId=4f359efe-a791-416f-9eee-06d2e29ac44d
04:15:37 [agent/embedded] embedded run done: runId=4f359efe-a791-416f-9eee-06d2e29ac44d sessionId=06a52741-d689-4da0-9dd6-002d8f34acdc durationMs=193061 aborted=false
Skipping auto-reply: silent token or no text/media returned from resolver
[clawdis] Unhandled promise rejection: Error: Context overflow: Summarization failed: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt is too long: 210850 tokens > 200000 maximum"},"request_id":"req_011CWoanTxtaFA1uQZ5LZnrJ"}. Your input may be too large for the context window.
    at AgentSession._runAutoCompaction (file:///Users/jayhickey/Developer/clawdis/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@mariozechner/pi-coding-agent/src/core/agent-session.ts:1282:11)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at AgentSession._checkCompaction (file:///Users/jayhickey/Developer/clawdis/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@mariozechner/pi-coding-agent/src/core/agent-session.ts:1144:4)
    at _handleAgentEvent (file:///Users/jayhickey/Developer/clawdis/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@mariozechner/pi-coding-agent/src/core/agent-session.ts:287:4)

@steipete
Copy link
Contributor

steipete commented Jan 5, 2026

Please open a new issue - this seems likely something that needs fixing in https://github.com/badlogic/pi-mono

Pastorsimon1798 pushed a commit to Pastorsimon1798/openclaw that referenced this pull request Feb 1, 2026
dgarson added a commit to dgarson/clawdbot that referenced this pull request Feb 2, 2026
…vs-workers

chore: more main-agent config/integration
alexprime1889-prog pushed a commit to alexprime1889-prog/moltbot that referenced this pull request Feb 8, 2026
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
Tasks completed: 2/2
- Task 1: Port doc fixes (commits #44, #49, #69)
- Task 2: Port xAI reorder (commits #54, #56) and changelog (#89)

SUMMARY: .planning/phases/12-memory-qmd-hardening/12-05-SUMMARY.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants