Skip to content

fix(coding-agent): drain follow-ups queued during agent_end#5115

Merged
badlogic merged 1 commit into
earendil-works:mainfrom
DanielThomas:dannyt/sendUserMessage-agent-end
May 28, 2026
Merged

fix(coding-agent): drain follow-ups queued during agent_end#5115
badlogic merged 1 commit into
earendil-works:mainfrom
DanielThomas:dannyt/sendUserMessage-agent-end

Conversation

@DanielThomas

Copy link
Copy Markdown
Contributor

When an extension queues a follow-up during agent_end it gets stuck on the follow-up queue until after the next user message, because you need to specify deliverAs:

Extension "<runtime>" error: Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.

I also took the opportunity to add an extension example that does something useful in agent_end that requires agent follow up.

When an extension queues a follow-up during `agent_end` it
gets stuck on the follow-up queue until after the next user
message.

Add a hasQueuedMessages() check to _handlePostAgentRun
so the existing while/continue loop drains them.

- One-line fix in _handlePostAgentRun
- Integration test in agent-session-queue
- git-merge-and-resolve example extension with tests
@badlogic badlogic added the inprogress Issue is being worked on label May 28, 2026
@badlogic badlogic merged commit 8e77f87 into earendil-works:main May 28, 2026
3 checks passed
@badlogic

Copy link
Copy Markdown
Collaborator

cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inprogress Issue is being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants