Skip to content

feat(runtime): cross-agent compaction orchestration (explicit, user-triggered) #3439

Description

@aheritier

Summary

Provide a team-level view of every live session's context budget and let the user trigger compaction on a specific sub-agent session (especially long-running background agents). A multi-agent differentiator no competitor has.

Proposed behavior

  • Team-level view (extend /context) listing every live session's budget.
  • Ability to trigger compaction on a specific named sub-agent session.
  • Decision: explicit user action only for now. Idle auto-compaction of background sessions is explicitly deferred (highest blast radius).

Implementation notes (starting points)

  • pkg/runtime — support compaction targeting a named session
  • pkg/runtime/agent_delegation.go, pkg/tools/builtin/agent/agent.go
  • TUI dialogs
  • ⚠️ Touches the delegation event-forwarding paths — highest blast radius; keep behind explicit user action.

Complexity: L.

Background: shared plan context-management-gap-analysis (Phase 3, item 8).

Dependencies / Relationships

Metadata

Metadata

Assignees

Labels

area/agentFor work that has to do with the general agent loop/agentic features of the apparea/runtimeRuntime engine, agent loop execution, tool dispatch, loop detectionarea/sessionsFor features/issues/fixes related to session lifecycle (resume, persistence, export)area/tuiFor features/issues/fixes related to the TUIkind/featPR adds a new feature (maps to feat:). Use on PRs only.

Fields

No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions