Browse Source

run: properly close session.list

Dax Raad 7 months ago
parent
commit
b00bb3c083
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/opencode/src/cli/cmd/run.ts

+ 3 - 1
packages/opencode/src/cli/cmd/run.ts

@@ -66,7 +66,9 @@ export const RunCommand = cmd({
     await bootstrap({ cwd: process.cwd() }, async () => {
     await bootstrap({ cwd: process.cwd() }, async () => {
       const session = await (async () => {
       const session = await (async () => {
         if (args.continue) {
         if (args.continue) {
-          const first = await Session.list().next()
+          const list = Session.list()
+          const first = await list.next()
+          await list.return()
           if (first.done) return
           if (first.done) return
           return first.value
           return first.value
         }
         }