From c9b4dc0578c3ff7dea91facdf71859140554abdd Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 2 Oct 2026 02:44:11 -0700 Subject: [PATCH] refactor(agent-launch): narrow the launch params by 'in' instead of a cast --- src/main/runtime/runtime-rpc/runtime-rpc-long-poll.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/runtime/runtime-rpc/runtime-rpc-long-poll.ts b/src/main/runtime/runtime-rpc/runtime-rpc-long-poll.ts index 15fc3af44f2..c1ddeb78a6e 100644 --- a/src/main/runtime/runtime-rpc/runtime-rpc-long-poll.ts +++ b/src/main/runtime/runtime-rpc/runtime-rpc-long-poll.ts @@ -32,7 +32,8 @@ export function classifyRuntimeLongPoll(request: RpcRequest): RuntimeLongPollCla (request.method === 'agent.launch' || request.method === 'agent.launchReplay') && typeof request.params === 'object' && request.params !== null && - (request.params as { prompt?: unknown }).prompt !== undefined + 'prompt' in request.params && + request.params.prompt !== undefined ) { return 'wait' }