run: properly close session.list

pull/869/head
Dax Raad 2025-07-10 16:13:01 -04:00
parent d9befd3aa6
commit b00bb3c083
1 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,9 @@ export const RunCommand = cmd({
await bootstrap({ cwd: process.cwd() }, async () => {
const session = await (async () => {
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
return first.value
}