You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When auto-compaction fires (compaction.auto: true), it runs synchronously in the session loop, freezing the prompt input until it completes. On slow models or large contexts, this can lock the user out for minutes. The TUI becomes unresponsive and you can't even type.
Proposed behavior
Compaction runs as a background job — user keeps chatting uninterrupted
New messages sent during compaction get appended to the uncompacted history
Once compaction finishes, the old history gets replaced by the compacted summary
A toast or indicator shows "Compacting…" while it runs
On completion, emit session.compacted and swap in the compacted context
Existing foundation
SDK already defines CompactionPart and EventSessionCompacted — the event plumbing is there, only the execution path needs to become non-blocking.
Thanks for updating the issue title and adding detailed content! However, there is still one required item missing from the Feature Request template:
Verification checkbox: The feature request template requires a checkbox confirming you have searched existing issues to ensure this hasn't been suggested before (e.g., - [x] I have searched existing issues and this has not been requested yet). Please add this to your issue.
Please edit the issue to include this checkbox. Note that there are also potentially related issues (#16466, #13033) that you may want to review to confirm this is distinct.
Activity
github-actions commentedon May 13, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]: <title>(missing the colon after[FEATURE]).Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
[-][FEATURE] Async background compaction — don't block chat input[/-][+][FEATURE]: Async background compaction — don't block chat input[/+]github-actions commentedon May 13, 2026
Thanks for updating the issue title and adding detailed content! However, there is still one required item missing from the Feature Request template:
- [x] I have searched existing issues and this has not been requested yet). Please add this to your issue.Please edit the issue to include this checkbox. Note that there are also potentially related issues (#16466, #13033) that you may want to review to confirm this is distinct.