Skip to content

Feat issue 183#189

Merged
lxowalle merged 6 commits intosipeed:mainfrom
Tuzfucius:feat-issue-183
Feb 16, 2026
Merged

Feat issue 183#189
lxowalle merged 6 commits intosipeed:mainfrom
Tuzfucius:feat-issue-183

Conversation

@Tuzfucius
Copy link
Contributor

Description

Based on the suggestion in issue #183, this PR implements automatic context compression to prevent "context window exceeded" errors and improve conversation stability.

Key Changes

  • Robust Token Estimation: Adjusted the estimation heuristic to 2.5 chars/token for more conservative and accurate usage prediction.
  • Emergency Compression: Implemented forceCompression to aggressively reduce history when the token limit is reached.
  • Reactive Error Recovery: Enhanced runLLMIteration to catch specific context-length errors, trigger immediate compression, and retry the request automatically.
  • User Notifications: Added real-time notifications via the message bus to inform users when the conversation history is being optimized or compressed.

Related Issue

Fixes #183

@lxowalle
Copy link
Collaborator

Thanks for your contribution! We are forming the PicoClaw Dev Group to accelerate the evolution of the project. Any developer with more than one merged PR is invited to join.

Would you like to join the PicoClaw Dev Group? If so, please send an email to support@sipeed.com with the subject line: [Join PicoClaw Dev Group] + Your GitHub account. We will send the Discord invite link to your inbox.

@lxowalle lxowalle merged commit 8d757fb into sipeed:main Feb 16, 2026
3 checks passed
edgargomero pushed a commit to edgargomero/kntorclaw that referenced this pull request Feb 16, 2026
* feat: add slash command support (e.g., /show model, /help)

* style: fix code formatting

* feat: implement robust context compression and error recovery with user notifications
hahnavi pushed a commit to hahnavi/picoclaw that referenced this pull request Feb 16, 2026
* feat: add slash command support (e.g., /show model, /help)

* style: fix code formatting

* feat: implement robust context compression and error recovery with user notifications
emadomedher pushed a commit to emadomedher/picoclaw that referenced this pull request Feb 17, 2026
* feat: add slash command support (e.g., /show model, /help)

* style: fix code formatting

* feat: implement robust context compression and error recovery with user notifications
hahnavi pushed a commit to hahnavi/picoclaw that referenced this pull request Feb 17, 2026
* feat: add slash command support (e.g., /show model, /help)

* style: fix code formatting

* feat: implement robust context compression and error recovery with user notifications
hahnavi pushed a commit to hahnavi/picoclaw that referenced this pull request Feb 19, 2026
* feat: add slash command support (e.g., /show model, /help)

* style: fix code formatting

* feat: implement robust context compression and error recovery with user notifications
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.

没有上下文压缩逻辑

2 participants