Description
The /compact command does not actually compress the context. Instead, the context token count increases after running /compact, indicating the command either fails silently or does nothing at all.
Evidence
Before /compact:
- Context: 50,241 tokens (25%)
After /compact:
- Context: 51,405 tokens (25%)
- Change: +1,164 tokens (context INCREASED)
No visual feedback was shown in the TUI during compaction (no "compacting" status), and no compression actually occurred.
Related Issues
This appears to be related to or a more severe version of:
Steps to Reproduce
- Start a session with moderate context (25%+ used)
- Note the current token count (e.g., via TUI status or
/compact prompt)
- Run
/compact
- Check token count again
- Observe that context has NOT decreased (may even increase)
Expected Behavior
- Context tokens should DECREASE after
/compact
- TUI should show a "compacting" status during operation
- Compression should actually occur
Actual Behavior
- Context tokens INCREASED (+1,164 tokens)
- No TUI feedback during compaction
- No compression occurred
Environment
- OpenCode version: (latest - please specify in comments)
- OS: Linux
- Model: GLM-5 (zai-coding-plan/glm-5)
Additional Context
This was tested in a session with:
- ~80 messages exchanged
- 1 manually compressed block (via
compress tool)
- Git operations, file reads/writes, and GitHub searches performed
The manual compress tool (agent-side compression) works correctly, but the user-facing /compact command does not.
Description
The
/compactcommand does not actually compress the context. Instead, the context token count increases after running/compact, indicating the command either fails silently or does nothing at all.Evidence
Before
/compact:After
/compact:No visual feedback was shown in the TUI during compaction (no "compacting" status), and no compression actually occurred.
Related Issues
This appears to be related to or a more severe version of:
Steps to Reproduce
/compactprompt)/compactExpected Behavior
/compactActual Behavior
Environment
Additional Context
This was tested in a session with:
compresstool)The manual
compresstool (agent-side compression) works correctly, but the user-facing/compactcommand does not.