fix(compress): allow manual /compress when auto-compaction is disabled [overflow error directs users there]

compression.enabled: false is documented (agent/conversation_loop.py
overflow path) as disabling *automatic* compaction only — the terminal
context-overflow error explicitly tells users to run /compress manually,
and the gateway handler has never gated on the flag. But the classic CLI
(_manual_compress) and the ACP adapter (/compact) refused with
'Compression is disabled', leaving users at a full context with no
manual escape hatch on those surfaces.

Remove the stale gates (they predate the overflow-path design; the CLI
gate came from the original /compress commit's boilerplate) and unify
force=True across all manual-compaction call sites: ACP /compact and the
TUI's _compress_session_history (manual-only helper) now bypass the
summary-failure cooldown exactly like the CLI and gateway already did.
Also reword the ACP /context status line so a disabled-compression agent
no longer implies /compact is unavailable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
babak 2026-07-12 23:25:46 -07:00 • committed by Teknium
parent e907ecccef
commit a007ac55c6
6 changed files with 117 additions and 7 deletions

8
cli.py
View file

@ -9929,9 +9929,11 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin, CLIBillingMixin):
print("(._.) No active agent -- send a message first.")
return
if not self.agent.compression_enabled:
print("(._.) Compression is disabled in config.")
return
# No compression_enabled gate here: the config flag disables
# *automatic* compaction only. Manual /compress is an explicit user
# action — the context-overflow error path (conversation_loop.py)
# directs users here when auto-compaction is off, and the gateway's
# /compress handler has never gated on the flag.
from hermes_cli.partial_compress import (
extract_compress_flags,