Skip to content

v1.110.3

Choose a tag to compare

@MarkEhr MarkEhr released this 29 May 16:42
· 15 commits to master since this release

What's New

Added

  • 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.

Technical Details

  • Status codes: 200 ("collapse-initiated"), 404 ("not-found"), 409 ("busy" + currentStatus — Claude rejects slash commands mid-turn), 500 ("error" + runtime error).
  • 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.