Skip to content

Commit bcdb83e

Browse files
committed
fix(core): stop the extra reply after backgrounding work
Ctrl+B already returns a tool result for the blocked call. The synthetic steer started a second model turn, so drop it.
1 parent c8d5295 commit bcdb83e

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

‎packages/core/src/session.ts‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -441,21 +441,7 @@ const layer = Layer.effect(
441441
active: execution.active,
442442
background: Effect.fn("Session.background")(function* (sessionID) {
443443
yield* result.get(sessionID)
444-
const backgrounded = yield* jobs.backgroundAll({ sessionID })
445-
if (backgrounded.length === 0) return
446-
yield* result
447-
.synthetic({
448-
sessionID,
449-
text: [
450-
"User requested that active blocking work be moved to the background.",
451-
"",
452-
"Backgrounded work:",
453-
...backgrounded.map((job) => `- ${job.type}: ${job.title && job.title.length > 0 ? job.title : job.id}`),
454-
"",
455-
"The backgrounded work is still unfinished. Move on to other work if you can. If there is nothing else useful to do, finish your response. Do not wait, sleep, poll, or report the backgrounded work as complete until a later completion notification is added to the conversation.",
456-
].join("\n"),
457-
})
458-
.pipe(Effect.catchTag("Session.SyntheticConflictError", Effect.die))
444+
yield* jobs.backgroundAll({ sessionID })
459445
}),
460446
resume: (sessionID) => sessions.forSession(sessionID).resume(),
461447
synthetic: (input) => sessions.forSession(input.sessionID).synthetic(input),

0 commit comments

Comments
 (0)