Skip to content

fix: surface async user input events - #496

Open
jbulpitt wants to merge 1 commit into
agentclientprotocol:mainfrom
jbulpitt:fix/async-user-input-events
Open

fix: surface async user input events#496
jbulpitt wants to merge 1 commit into
agentclientprotocol:mainfrom
jbulpitt:fix/async-user-input-events

Conversation

@jbulpitt

Copy link
Copy Markdown

Summary

  • surface completed delivery: "async" agent-message questions through ACP _meta.codex.asyncUserInput
  • retain the app-server thread/turn/item correlations and structured question/options payload
  • suppress repeated completed text when the same item already emitted an agent-message delta
  • emit completed-only question text for clients that do not yet consume the extension

OpenAI Codex's request_user_input_async returns {"accepted":true} immediately. Its actual question arrives later as an item/started and item/completed agentMessage with delivery:"async" and questions; a reply is an ordinary new user message on the same thread, not a response to a pending JSON-RPC request. The current handler drops both item notifications, so ACP clients cannot render or route the question.

Verification

  • npm run typecheck
  • vitest run src/__tests__/CodexACPAgent/agent-message-events.test.ts --no-file-parallelism — 3/3
  • mutation proof: removing the production handler change makes both new cases fail; restoring it passes

The patch changes no blocking item/tool/requestUserInput request/response behavior.

Downstream context: jbulpitt/seam-acp#297

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.

1 participant