"keeps its note until the session is resumed" started `sleep 0.5` and counted on the turn taking less than that before /new. On a loaded machine (load 7 on two cores) the turn took longer, the job ended while the session was still open, and its note went in as a turn instead of waiting. The command now waits for a file written after /new. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 file changed
+3
-1
+3
-1
@@ -164,7 +164,8 @@ describe("in an app", () => {
|
||||
const store = new Store(join(dir(), "s.db"))
|
||||
const a = app(
|
||||
[
|
||||
{ chunks: [toolCall(0, "t1", "bash", JSON.stringify({ command: "sleep 0.5; echo late", background: true, description: "later" }))] },
|
||||
// It ends once the session is no longer open (the file below), however slow the turn was.
|
||||
{ chunks: [toolCall(0, "t1", "bash", JSON.stringify({ command: "until [ -e go ]; do sleep 0.05; done; echo late", background: true, description: "later" }))] },
|
||||
{ chunks: [delta({ content: "Running." })] },
|
||||
{ chunks: [delta({ content: "Back, and it finished." })] },
|
||||
],
|
||||
@@ -173,6 +174,7 @@ describe("in an app", () => {
|
||||
const first = a.engine.sessionId!
|
||||
await a.turns.prompt("start it")
|
||||
a.newSession()
|
||||
writeFileSync(join(a.project.root, "go"), "")
|
||||
const job = await ended(a.registry, first, "job1")
|
||||
expect(job.note).toContain("late")
|
||||
expect(a.registry.get(first, "job1")!.note).toStartWith(MARKS.command)
|
||||
|
||||
Reference in new issue
Block a user