Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a21500d
fix(core): early-return denial cleanup, rebased onto main as one commit
easonLiangWorldedtech Nov 9, 2026
a17a24e
fix(tests): write the specs against the surface main actually declares
easonLiangWorldedtech Nov 9, 2026
081044d
test(core): move the 13 teardown specs out of Task.spec.ts
easonLiangWorldedtech Nov 12, 2026
e7a1e90
test(core): gate the metadata retry and isolate the abort-path release
easonLiangWorldedtech Nov 12, 2026
8ef7fdf
fix(core): record a failed diff release and surface it at the abort
easonLiangWorldedtech Nov 12, 2026
4674edf
fix(core): gate the late diff cleanup on what open published
easonLiangWorldedtech Nov 12, 2026
d9e09d0
fix(core): close the diff editor a late open() publishes after release
easonLiangWorldedtech Nov 12, 2026
6e8c8e9
fix(core): keep a placeholder whose content is not the one open() wrote
easonLiangWorldedtech Nov 12, 2026
6a7600f
test(core): cover the placeholder read failure that does not say the …
easonLiangWorldedtech Nov 12, 2026
2f77d04
fix(core): check the placeholder before the discard saves into it
easonLiangWorldedtech Nov 12, 2026
e3a17a8
test(core): pin the release against a diff command that resolves late
easonLiangWorldedtech Nov 13, 2026
4fa979b
fix(editor): decline the placeholder save when the guard read proved …
easonLiangWorldedtech Nov 13, 2026
b609ae4
fix(editor): re-check the placeholder immediately before unlinking it
easonLiangWorldedtech Nov 13, 2026
e2d2d4b
fix(editor): close the plain text tab a released session leaves behind
easonLiangWorldedtech Nov 13, 2026
d179cca
test(editor): pin disposal of the two temporary open listeners
easonLiangWorldedtech Nov 13, 2026
85033cd
test(editor): cover the dirty create whose placeholder still matches
easonLiangWorldedtech Nov 13, 2026
d09ce60
test(tools): bind the repeated-release row to the provider's real cle…
easonLiangWorldedtech Nov 13, 2026
f4cf7aa
test(editor): name every step of the released-session stand-down
easonLiangWorldedtech Nov 13, 2026
d372e1b
test(editor): cover a guard read that rejects with no error object
easonLiangWorldedtech Nov 13, 2026
2bcbc12
test(editor): cover the endings of the re-read and unlink that had no…
easonLiangWorldedtech Nov 13, 2026
a21aaa9
test(core): answer the mutation rows the digest printed at these coor…
easonLiangWorldedtech Nov 13, 2026
5250f91
Fix the partial-path mutation directive this branch added in WriteToF…
Nov 16, 2026
1969dd8
fix(tests): mock the mentions exports the teardown spec actually reli…
easonLiangWorldedtech Nov 29, 2026
2194766
fix(task): publish the failed diff release warning where say cannot c…
easonLiangWorldedtech Nov 29, 2026
0b98e97
test(task): check the diff release handle before the first yield
easonLiangWorldedtech Nov 29, 2026
b1fb9c9
test(task): dispose the provider that each teardown test builds
easonLiangWorldedtech Nov 29, 2026
d475373
test(task): give each teardown test its own temporary storage root
easonLiangWorldedtech Nov 29, 2026
a313cef
fix(task): let an abandoned stream join the diff-view release the tas…
easonLiangWorldedtech Nov 29, 2026
193aef0
fix(task): scope the unapproved diff view release to its own view and…
easonLiangWorldedtech Nov 29, 2026
ae28a79
test(task): prove a new view session clears the earlier release failure
easonLiangWorldedtech Nov 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/__tests__/removeClineFromStack-delegation.spec.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions src/core/assistant-message/presentAssistantMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,14 @@ async function presentAssistantMessageBlock(cline: Task, policySnapshot: Request
is_error: true,
})

// A write_to_file call that streamed partial deltas leaves per-task stream state
// (and possibly an open diff view) behind, and this guard bypasses handle(), so
// the teardown that execute()/onParameterParseFailure would have run never does.
// Release it here instead of leaking it into the next API request.
if (block.name === "write_to_file") {
await writeToFileTool.teardownAbandonedStream(cline)
Comment thread
easonLiangWorldedtech marked this conversation as resolved.
Resolved
}

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
break
}
}
Expand Down Expand Up @@ -796,6 +804,14 @@ async function presentAssistantMessageBlock(cline: Task, policySnapshot: Request
error.message,
)

// Same leak as the missing-nativeArgs guard: the block streamed partial
// deltas (handlePartial ran), this exit bypasses handle()/execute(), so the
// per-task stream state and any open diff view must be released here. A
// mode file restriction blocking the target path lands exactly here.
if (block.name === "write_to_file") {
await writeToFileTool.teardownAbandonedStream(cline)
}

break
}

Expand Down Expand Up @@ -873,6 +889,12 @@ async function presentAssistantMessageBlock(cline: Task, policySnapshot: Request
`Tool call repetition limit reached for ${block.name}. Please try a different approach.`,
),
)

// The repetition exit also bypasses handle(): release the stream state and
// diff view the partial deltas created, or they leak into the next request.
if (block.name === "write_to_file") {
await writeToFileTool.teardownAbandonedStream(cline)
}
break
}
}
Expand Down
Loading
Loading