You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -240,25 +239,19 @@ export class BackgroundManager {
240
239
241
240
constmessage=`[BACKGROUND TASK COMPLETED] Task "${task.description}" finished in ${duration}. Use background_output with task_id="${task.id}" to get results.`
242
241
243
-
constmainSessionID=getMainSessionID()
244
-
if(!mainSessionID){
245
-
log("[background-agent] No main session ID available, relying on pending queue")
246
-
return
247
-
}
248
-
249
-
log("[background-agent] Sending notification to main session:",mainSessionID)
242
+
log("[background-agent] Sending notification to parent session:",{parentSessionID: task.parentSessionID})
250
243
251
244
setTimeout(async()=>{
252
245
try{
253
246
awaitthis.client.session.prompt({
254
-
path: {id: mainSessionID},
247
+
path: {id: task.parentSessionID},
255
248
body: {
256
249
parts: [{type: "text",text: message}],
257
250
},
258
251
query: {directory: this.directory},
259
252
})
260
253
this.clearNotificationsForTask(task.id)
261
-
log("[background-agent] Successfully sent prompt to main session")
254
+
log("[background-agent] Successfully sent prompt to parent session:",{parentSessionID: task.parentSessionID})
0 commit comments