Keep long chats responsive by cooling older tool output#160
Open
Keep long chats responsive by cooling older tool output#160
Conversation
Long pi-coding-agent sessions had started to punish the user for having used the tool successfully. As read, write, and edit output accumulated, Emacs had more and more rich tool rendering to redisplay and refontify, until ordinary typing in the input buffer began to feel unnecessarily heavy. This change takes the pressure off without making old history disappear or become misleading. Recent completed tool turns remain rich and fully interactive, because that is the part of the conversation the user is still actively working with. Older completed tool output cools automatically at stable boundaries into a cheaper preview-only form. That cold form keeps the tool header, the visible preview, and the "... (N more lines)" clue, but it drops the hot-only overlay machinery and syntax-tagged rendering that were making long sessions expensive. The result is a simpler and more honest transcript: recent history stays alive, old history stays readable, and long-running sessions stop getting slower simply because they contain a lot of successful tool use. Reloading or resuming a session rebuilds the same hot/cold tail, and the default budget is tuned from real sessions so normal short conversations do not cool prematurely.
54966af to
0182d0e
Compare
Owner
Author
|
Small note: the ghost tool block cleanup bug was intentionally split out and merged already in #161. This PR is now just the long-session responsiveness change: keep recent tool output rich, and cool older completed tool output into a cheaper preview-only history form. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long chats with lots of read, write, and edit output were getting heavier to use.
This keeps recent tool turns rich and interactive, but cools older completed tool output into a cheaper preview-only history form. Old history stays readable and still shows a plain
... (N more lines)hint.The ghost tool block cleanup bug was split out and merged already in #161. This PR now focuses only on long-session responsiveness.