From 550322cb0c1c0610390c6eda9f6bb0ad4a5ee8db Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Fri, 12 Dec 2025 10:27:02 +0900 Subject: [PATCH] fix(background-agent): use promptAsync to avoid response parsing errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit session.prompt() fails due to response Zod validation. promptAsync is fire-and-forget, no response parsing. 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- src/features/background-agent/manager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/background-agent/manager.ts b/src/features/background-agent/manager.ts index 884c8fc..2ad856b 100644 --- a/src/features/background-agent/manager.ts +++ b/src/features/background-agent/manager.ts @@ -244,7 +244,7 @@ export class BackgroundManager { setTimeout(async () => { try { - await this.client.session.prompt({ + await this.client.session.promptAsync({ path: { id: mainSessionID }, body: { parts: [{ type: "text", text: message }], @@ -252,9 +252,9 @@ export class BackgroundManager { query: { directory: this.directory }, }) this.clearNotificationsForTask(task.id) - log("[background-agent] Successfully sent to main session") + log("[background-agent] Successfully sent promptAsync to main session") } catch (error) { - log("[background-agent] session.prompt failed:", String(error)) + log("[background-agent] promptAsync failed:", String(error)) } }, 200) }