You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
POST /api/agents/:id/collapse-context REST endpoint — sends Claude Code's /compact slash command to any agent (including the same agent invoking it via a scheduled cron or end-of-flow step). POST /api/agents/:id/message cannot deliver slash commands (the leading / is passed through as message body instead of being intercepted by the CLI), so this dedicated endpoint is the only correct path. Logic factored into a new runtimeService.collapseAgentContext(agentId) helper returning a discriminated CollapseContextResult (collapse-initiated | not-found | busy + currentStatus | error + error); the existing WS collapse_context handler was refactored to share the same helper so REST and WS now have identical semantics.
Changed
Send Message to Agent skill updated — new "Collapsing an Agent's Context" section documents the endpoint, response shape, status codes (200/404/409/500), and the explicit /message vs /collapse-context decision rule for inter-agent automation.
Live-validated: POST /api/agents/nonexistent-id/collapse-context → HTTP 404 + {status:'not-found'}. The idle/busy path goes through the same helper as the WS handler already in production.
Bundled: client-side StatisticsModal refactor — extracted the agent-info modal from TerminalModals into its own component + SCSS partial.