Skip to content

cli-23: Remove auto-compaction on clear/exit and other improvements#520

Merged
dwash96 merged 4 commits into
cecli-dev:v0.100.0from
szmania:cli-23-remove-auto-compaction-on-clear-exit
May 20, 2026
Merged

cli-23: Remove auto-compaction on clear/exit and other improvements#520
dwash96 merged 4 commits into
cecli-dev:v0.100.0from
szmania:cli-23-remove-auto-compaction-on-clear-exit

Conversation

@szmania
Copy link
Copy Markdown

@szmania szmania commented May 19, 2026

Summary

This PR implements the removal of auto-compaction when clearing or exiting the session, along with several other architectural refinements and reverts to synchronous operations for stability.

Key Changes

  • Auto-Compaction Optimization: Context compaction is now skipped when the user issues /clear, /exit, or /quit commands, preventing wasteful computation.
  • Synchronous Linter & Commands: Reverted the Linter and shell command execution from async to synchronous (using asyncio.to_thread for run_cmd). This simplifies the codebase and improves reliability in interrupt handling.
  • Nested Delegation Removal: Removed the allow_nested_delegation feature. Sub-agents are no longer permitted to delegate to further sub-agents.
  • MCP Lifecycle Management: Enhanced the logic for disconnecting the "Local" MCP server when switching between Agent and non-Agent coders.
  • Notification Refinement: Removed bell notifications and notification cooldown logic from the IO layer.
  • Testing: Added comprehensive tests for the new compaction skipping logic and updated existing tests to reflect the synchronous linter changes.

Why Needed

  • Auto-compaction before a clear/exit was redundant and consumed unnecessary tokens/time.
  • Reverting to synchronous operations for certain tasks reduces complexity and potential race conditions in the async event loop.
  • Simplifying sub-agent capabilities ensures a more predictable agent hierarchy.

@dwash96 dwash96 merged commit 077d30c into cecli-dev:v0.100.0 May 20, 2026
1 check passed
@dwash96 dwash96 mentioned this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants