Skip to content

Commit 3d35d41

Browse files
committed
pi-agenticoding/03: silence stale manual handoff cleanup
1 parent 1041f05 commit 3d35d41

3 files changed

Lines changed: 5 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **Breaking:** handoff no longer auto-sends `Proceed.` after compaction and no longer supports configurable auto-resume. The superseded `handoff.resumeBehavior` (`"wait"`/`"proceed"`) setting is ignored.
1313
- Added `handoff.automaticEnabled` raw settings support with JSON boolean values. Missing settings default to automatic handoff enabled; `false` removes the agent-facing handoff tool and handoff-call guidance during normal turns while preserving explicit `/handoff <direction>`.
1414
- Added the extension-owned `/agenticoding-settings` TUI panel for automatic handoff availability. TUI saves are global-only to `~/.pi/agent/settings.json`, preserve unrelated settings keys, persist real booleans, and visibly warn when a project override masks the global value.
15-
- Manual `/handoff <direction>` now waits behind the scenes when the assistant is streaming, then enables the `handoff` tool and starts a fresh handoff turn once idle. Visible `agenticoding-handoff-diagnostic` conversation messages have been removed from this flow.
15+
- Manual `/handoff <direction>` now waits behind the scenes when the assistant is streaming, then enables the `handoff` tool and starts a fresh handoff turn once idle. Visible stale-cleanup diagnostics have been removed from this flow, including TUI warnings and `agenticoding-handoff-diagnostic` conversation messages.
1616

1717
## [0.3.0] - 2026-05-23
1818

agenticoding.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ test("handoff compaction error clears pending state and status", async () => {
10721072
assert.equal(statuses.get(STATUS_KEY_HANDOFF), undefined);
10731073
});
10741074

1075-
test("turn_end fallback clears stale requested handoff status", async () => {
1075+
test("turn_end fallback silently clears stale requested handoff status", async () => {
10761076
const pi = new MockPi();
10771077
registerAgenticoding(pi as any);
10781078
const statuses = new Map<string, string | undefined>();
@@ -1105,8 +1105,7 @@ test("turn_end fallback clears stale requested handoff status", async () => {
11051105
});
11061106

11071107
assert.equal(statuses.get(STATUS_KEY_HANDOFF), undefined);
1108-
assert.equal(notifications[0].level, "warning");
1109-
assert.match(notifications[0].message, /did not call the handoff tool/);
1108+
assert.deepEqual(notifications, []);
11101109
assert.deepEqual(pi.sentMessages, []);
11111110
});
11121111

@@ -1253,7 +1252,7 @@ test("buildNudge handles null percent and boundary hints before topic guidance",
12531252
assert.match(noTopic, /No active notebook topic is set/);
12541253
});
12551254

1256-
test("watchdog stale requested handoff cleanup avoids conversation diagnostics", async () => {
1255+
test("watchdog stale requested handoff cleanup stays silent", async () => {
12571256
const pi = new MockPi();
12581257
const state = createState();
12591258
state.pendingRequestedHandoff = { direction: "implement auth", enforcementAttempts: 0, toolCalled: false, awaitingAgentTurn: false };
@@ -1274,8 +1273,7 @@ test("watchdog stale requested handoff cleanup avoids conversation diagnostics",
12741273
);
12751274

12761275
assert.equal(state.pendingRequestedHandoff, null);
1277-
assert.equal(notifications[0].level, "warning");
1278-
assert.match(notifications[0].message, /did not call the handoff tool/);
1276+
assert.deepEqual(notifications, []);
12791277
assert.deepEqual(pi.sentMessages, []);
12801278
assert.deepEqual(pi.sentUserMessages, []);
12811279
});

handoff/cleanup.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import type { AgenticodingState } from "../state.js";
33
import { STATUS_KEY_HANDOFF } from "../tui.js";
44
import { updateHandoffToolAvailability } from "./availability.js";
55

6-
export function buildMissingRequestedHandoffDiagnostic(direction: string): string {
7-
return `Manual /handoff did not compact for direction "${direction}" because the assistant did not call the handoff tool. The temporary handoff tool activation has been cleared.`;
8-
}
9-
106
export function emitHandoffDiagnostic(
117
pi: ExtensionAPI,
128
ctx: ExtensionContext,
@@ -27,8 +23,6 @@ export async function clearStaleRequestedHandoff(
2723
if (!requested) {
2824
return;
2925
}
30-
const message = buildMissingRequestedHandoffDiagnostic(requested.direction);
31-
emitHandoffDiagnostic(pi, ctx, message, "warning");
3226
state.pendingRequestedHandoff = null;
3327
state.pendingRequestedHandoffPrompt = null;
3428
if (ctx.hasUI) {

0 commit comments

Comments
 (0)