GitHub Issue
Review and align context compression across IM and CLI modes
## Goal
Review and align context compression behavior between IM mode and CLI mode so both modes preserve equivalent user-visible and runtime semantics.
## Scope
- Existing CLI context compression flow
- Existing IM/gateway context compression flow
- Differences in episode/session boundaries, message roles, tool traces, and recall inputs
- Compression trigger policy and output shape
- Tests that prevent mode-specific regressions
## Acceptance Criteria
- A review note identifies all meaningful differences between CLI and IM context compression.
- Intentional differences are documented; accidental differences are removed or tracked.
- CLI and IM use shared policy/helpers where practical.
- Tests cover representative compression scenarios in both modes.
- The result preserves compatibility with prefix-cache reuse work.
View Raw Thread
Developer & User Discourse
BruceLoveDecimal • May 18, 2026
hi, if it's open to contribute, could i take this issue? Thanks
Xunzhuo • May 18, 2026
looks like it is duplicated with https://github.com/agentic-in/elephant-agent/issues/3, can you try something else?
Xunzhuo • May 18, 2026
can you try https://github.com/agentic-in/elephant-agent/issues/38, the easy one
BruceLoveDecimal • May 18, 2026
> can you try [#38](https://github.com/agentic-in/elephant-agent/issues/38), the easy one
sure!
sure!
SaaS Metrics