fix(coding-agent): stopped blocked vibe reset loops
Disable reset-mode loops when vibe mode prevents the required session transition, so the prompt is not resubmitted into the unchanged session. Added focused regression coverage for the blocked transition. Fixes #6607
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `/new`, `/drop`, `/fork`, and `/move` crashing or doing unnecessary work when invoked during vibe mode; interactive session transitions now show the existing exit-vibe warning and leave the session unchanged ([#6607](https://github.com/can1357/oh-my-pi/issues/6607)).
|
||||
- Fixed `/new`, `/drop`, `/fork`, and `/move` crashing or doing unnecessary work when invoked during vibe mode; interactive session transitions now show the existing exit-vibe warning and leave the session unchanged, and reset loops disable themselves instead of resubmitting into that unchanged session ([#6607](https://github.com/can1357/oh-my-pi/issues/6607)).
|
||||
|
||||
## [17.1.3] - 2026-07-24
|
||||
|
||||
|
||||
@@ -1395,6 +1395,11 @@ export class InteractiveMode implements InteractiveModeContext {
|
||||
return;
|
||||
}
|
||||
|
||||
if (action === "reset" && this.vibeModeEnabled) {
|
||||
this.disableLoopMode("Exit vibe mode before using reset loops. Loop mode disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!consumeLoopLimitIteration(this.loopLimit)) {
|
||||
this.disableLoopMode("Loop limit reached. Loop mode disabled.");
|
||||
return;
|
||||
|
||||
@@ -138,6 +138,25 @@ describe("InteractiveMode loop auto-submit", () => {
|
||||
expect(resolved[0].text).toBe("deliver this");
|
||||
});
|
||||
|
||||
it("disables reset loops when vibe blocks the session transition", async () => {
|
||||
vi.useFakeTimers();
|
||||
settings.set("loop.mode", "reset");
|
||||
mode.vibeModeEnabled = true;
|
||||
mode.loopModeEnabled = true;
|
||||
mode.loopPrompt = "do not resubmit";
|
||||
const showStatus = vi.spyOn(mode, "showStatus");
|
||||
const resolved: SubmittedUserInput[] = [];
|
||||
void mode.getUserInput().then(input => resolved.push(input));
|
||||
|
||||
vi.advanceTimersByTime(800);
|
||||
await flushMicrotasks();
|
||||
|
||||
expect(resolved).toHaveLength(0);
|
||||
expect(mode.loopModeEnabled).toBe(false);
|
||||
expect(mode.loopPrompt).toBeUndefined();
|
||||
expect(showStatus).toHaveBeenCalledWith("Exit vibe mode before using reset loops. Loop mode disabled.");
|
||||
});
|
||||
|
||||
it("reports waiting, running, paused, resumed, and disabled loop states", async () => {
|
||||
const setLoopModeStatus = vi.spyOn(mode.statusLine, "setLoopModeStatus");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user