[pull] main from gi-dellav:main#80
Merged
Merged
Conversation
The auto-compaction gate in handle_agent_done computes its reserve through memory's effective_reserve, but handle_compress recomputed a bare resolve_reserve_tokens. With the memory feature active the two budgets differed, so the auto path could decide compaction was needed while handle_compress's own within-budget check disagreed. Mirror the trigger's reserve here so the two gates can never contradict each other.
… force it
handle_agent_done printed "auto-compacting..." before handle_compress
decided whether anything could be summarized, and handle_compress always
printed "compressing..." up front too. When real usage was over budget but
the message history still fit within keep_recent (cut_idx == 0, e.g. a large
system prompt or context files), every turn produced the announcement plus a
"nothing to compress" no-op while doing nothing.
handle_compress now takes an `auto` flag:
- the announcement moves after both early-return guards, so it prints only
when compression actually runs ("auto-compacting..." for auto, "compressing..."
for manual)
- auto runs return silently on a no-op (within budget, or cut_idx == 0)
- manual /compress and /compact skip the budget gate entirely, so the user's
explicit request always compacts unless nothing is old enough to summarize
The within-budget no-op message is dropped (auto is now silent; manual no
longer reaches that gate), and the cut_idx == 0 manual message is reworded
from "nothing to compress (entire context is recent)" to the clearer
"not enough conversation history to compact yet".
handle_compress printed "prompt cleared (back to default behavior)" after rebuilding the agent, but it never touches current_prompt or current_prompt_name and rebuilds from the same context, so build_preamble re-includes any active prompt. The message claimed a state change that does not happen. It is an orphaned copy left by an earlier refactor; the accurate version lives in /prompt default, which actually clears the prompt.
The context meter divided real usage by the window without clamping, which is correct, but it was always drawn green so a reading past 100% looked like a rendering glitch rather than the over-budget state it actually is. A value past 100% is a real signal: estimated new messages stack on the calibrated anchor before the next turn recalibrates, and a turn that ends with a large input plus output can leave the anchor above the input window. Clamping to 100% would hide that compaction is overdue or could not recover. Keep the true number and instead let the percentage segment change color as it fills: amber from 90%, red past 100%, otherwise the configured color. The override wins over the segment's configured color and the powerline cap follows it, so an over-budget reading is visibly intentional. The percentage is factored into a shared helper so the displayed value and the color tier never diverge.
The mid-turn path always relieves pressure by aborting the in-flight run and respawning on a trimmed history; the `handle_compress` step inside it is incidental and may be a no-op. The old "mid-turn auto-compacting..." notice implied a summarize step that does not always run, so it could read as a no-op announcement and leave the user waiting on a "compressed N messages" line that never comes. Reword it to "mid-turn context relief, restarting..." so it describes the restart that always happens. The notice stays unconditional on purpose (the respawn is real work even when no summary is produced), unlike the between-turn gate which announces only when compression will run.
…soning-deltas Forward reasoning deltas from streamed responses
…l-outputs Persist tool outputs in session history
fix(statusline): show context percentage honestly past 100%
…manual-force fix(compaction): announce only when compaction runs and let /compress force it
Flush atomic temp files before rename
…utput-sidecars Store long tool outputs as sidecar artifacts
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )
Note
Add tool call/result session recording, reasoning visibility config, and context percentage display improvements
◈,⌥) in the TUI.tool-outputs/and truncated inline with head/tail snippets and a file reference.show_reasoningconfig field (defaultfalse) controls reasoning visibility; initial state at startup is now derived from config viaresolve_show_reasoning.context_percentageno longer clamps at 100% and gains dynamic color overrides: yellow at ≥90%, red at >100%.handle_compress) skips silently when under budget and avoids noisy messages; manual/compressalways proceeds with clear messaging.1.5.1-rc2,rigto0.39, andrmcpto1.8.Macroscope summarized 6a701cd.