Skip to content

Surface waiting ask_user tool calls in remote pendingToolCalls#493

Merged
ericdallo merged 2 commits into
editor-code-assistant:masterfrom
rschmukler:rs/fix-ask-user
Jun 7, 2026
Merged

Surface waiting ask_user tool calls in remote pendingToolCalls#493
ericdallo merged 2 commits into
editor-code-assistant:masterfrom
rschmukler:rs/fix-ask-user

Conversation

@rschmukler

Copy link
Copy Markdown
Contributor

A web/SSE client that reconnects rebuilds state via GET /api/v1/chats/:id, but a chat blocked on ask_user was invisible there: the tool call sits in :executing (not :waiting-approval) while its handler blocks on the answer, so pendingToolCalls never listed it and the client couldn't re-render the question.

ask_user now mints its requestId up front, stores it in tool-call state, and passes it to the messenger so the SSE event and the persisted id match. pendingToolCalls includes :executing ask_user calls and carries requestId so a reconnecting client can answer via POST /api/v1/answer.

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

A web/SSE client that reconnects rebuilds state via GET /api/v1/chats/:id,
but a chat blocked on ask_user was invisible there: the tool call sits in
:executing (not :waiting-approval) while its handler blocks on the answer,
so pendingToolCalls never listed it and the client couldn't re-render the
question.

ask_user now mints its requestId up front, stores it in tool-call state,
and passes it to the messenger so the SSE event and the persisted id match.
pendingToolCalls includes :executing ask_user calls and carries requestId
so a reconnecting client can answer via POST /api/v1/answer.

@ericdallo ericdallo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@ericdallo ericdallo merged commit e3f0747 into editor-code-assistant:master Jun 7, 2026
7 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