Commit 9648c33d0af3

Vincent Demeester <vincent@sbr.pm>
2026-07-06 12:20:36
fix(pi): mutate event.input in place for git rebase hook
tool_call return values only control blocking, not input modification. Mutated event.input.command directly as documented in pi extensions API.
1 parent 2d11bbe
Changed files (1)
dots
pi
agent
extensions
defaults
dots/pi/agent/extensions/defaults/index.ts
@@ -127,16 +127,9 @@ export default function (pi: ExtensionAPI) {
 				? 'GIT_SEQUENCE_EDITOR=":" GIT_EDITOR="true"'
 				: 'GIT_EDITOR="true"';
 
+			// Mutate in place — tool_call return values only control blocking
+			event.input.command = `${prefix} ${command}`;
 			ctx.ui.notify(`Injected ${prefix} to prevent editor hang`, "info");
-
-			return {
-				input: {
-					...event.input,
-					command: `${prefix} ${command}`,
-				},
-			};
 		}
-
-		return undefined;
 	});
 }