Skip to content

Surface pending tool-calls to remote clients#476

Merged
ericdallo merged 1 commit into
editor-code-assistant:masterfrom
rschmukler:rs/remote-pending-tool-call-discovery
May 29, 2026
Merged

Surface pending tool-calls to remote clients#476
ericdallo merged 1 commit into
editor-code-assistant:masterfrom
rschmukler:rs/remote-pending-tool-call-discovery

Conversation

@rschmukler
Copy link
Copy Markdown
Contributor

The remote REST API only emitted toolCallRun via SSE, so a client connecting after a tool call entered :waiting-approval had no way to discover it — GET /api/v1/chats/:id omitted :tool-calls entirely and SSE never replays past events. The only recourse was to bounce back to the original editor to approve or reject.

GET /api/v1/chats/:id now returns a pendingToolCalls array (empty when none) with id, name, server, origin, arguments, manualApproval, summary and details — matching the toolCallRun event shape so clients can render the approval card on first paint. Session and list-chats entries gain a pendingApprovalCount for inbox-style "attention needed" indicators without N round-trips. Tool-call summary/details/manual-approval are now persisted alongside :arguments at the :preparing -> :check-approval transition so the handler can return them without recomputation. Purely additive: no change to existing fields or SSE event semantics.

  • I added a entry in changelog under unreleased section.
  • This is not an AI slop.

The remote REST API only emitted toolCallRun via SSE, so a client
connecting after a tool call entered :waiting-approval had no way to
discover it — GET /api/v1/chats/:id omitted :tool-calls entirely and SSE
never replays past events. The only recourse was to bounce back to the
original editor to approve or reject.

GET /api/v1/chats/:id now returns a pendingToolCalls array (empty when
none) with id, name, server, origin, arguments, manualApproval, summary
and details — matching the toolCallRun event shape so clients can render
the approval card on first paint. Session and list-chats entries gain a
pendingApprovalCount for inbox-style "attention needed" indicators
without N round-trips. Tool-call summary/details/manual-approval are now
persisted alongside :arguments at the :preparing -> :check-approval
transition so the handler can return them without recomputation. Purely
additive: no change to existing fields or SSE event semantics.
@ericdallo ericdallo enabled auto-merge May 29, 2026 15:53
@ericdallo ericdallo merged commit 0ed79e6 into editor-code-assistant:master May 29, 2026
9 checks passed
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