refactor(sdk,workflows): migrate Copilot sendAndWait to send - #614
Conversation
…ify workflows Migrate Copilot session API from sendAndWait() to send() across all workflows, skill references, and documentation. Simplify builtin workflow implementations (ralph, deep-research-codebase) and example workflows for clarity and reduced boilerplate.
ReviewThanks for tackling the 🔴 Critical:
|
…e stage completion After the sendAndWait→send refactor (#614), Copilot stages were marked complete while the agent was still processing because send() is fire-and-forget. Wrap send() at the executor level to block until session.idle (or session.error), matching Claude query() and OpenCode session.prompt() blocking semantics.
…e stage completion (#617) After the sendAndWait→send refactor (#614), Copilot stages were marked complete while the agent was still processing because send() is fire-and-forget. Wrap send() at the executor level to block until session.idle (or session.error), matching Claude query() and OpenCode session.prompt() blocking semantics.
…e stage completion After the sendAndWait→send refactor (#614), Copilot stages were marked complete while the agent was still processing because send() is fire-and-forget. Wrap send() at the executor level to block until session.idle (or session.error), matching Claude query() and OpenCode session.prompt() blocking semantics.
Summary
Migrates all Copilot workflow stages from
sendAndWait()tosend(), eliminating per-call timeout constants and simplifying workflow code. Updates documentation and skill references to establishsend()as the recommended default API.Key Changes
s.session.sendAndWait({ prompt }, TIMEOUT_MS)withs.session.send({ prompt })across all Copilot workflow implementationsralphanddeep-research-codebaseCopilot implementations remove per-agent timeout constants (AGENT_SEND_TIMEOUT_MS,SCOUT_TIMEOUT_MS,EXPLORER_TIMEOUT_MS, etc.)hello-worldandparallel-hello-worldCopilot examples use the newsend()APIworkflow-creatorskill references (agent-sessions.md,control-flow.md,failure-modes.md,getting-started.md,session-config.md,user-input.md,SKILL.md) updated to recommendsend()by defaultsendto avoid the timeout problem entirely;sendAndWaitis preserved for explicit timeout-gated use casesMigration Notes
Replace all Copilot
sendAndWaitcalls withsend:sendAndWaitremains available when explicit timeout-based waiting is required. If used, always pass an explicit timeout (default to 5 minutes if unsure) — the 60-second SDK default throws on any real agent work.