From 5eab32da81b403c2a277222ab97417a8bf90c35f Mon Sep 17 00:00:00 2001 From: Rhys <105699450+rhjoh@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:44:44 +1000 Subject: fix(pi): restrict state reporting to tui sessions (#2159) Co-authored-by: Can Celik --- src/integration/assets/pi/herdr-agent-state.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/integration/assets/pi') diff --git a/src/integration/assets/pi/herdr-agent-state.ts b/src/integration/assets/pi/herdr-agent-state.ts index 2e79c7c6..67bc4188 100644 --- a/src/integration/assets/pi/herdr-agent-state.ts +++ b/src/integration/assets/pi/herdr-agent-state.ts @@ -2,7 +2,7 @@ // managed by herdr; reinstalling or updating the integration overwrites this file. // add custom hooks/plugins beside this file instead of editing it. // HERDR_INTEGRATION_ID=pi -// HERDR_INTEGRATION_VERSION=7 +// HERDR_INTEGRATION_VERSION=8 // @ts-nocheck import net from "node:net"; @@ -223,7 +223,9 @@ export default function (pi) { }); pi.on("session_start", async (event, ctx) => { - if (ctx?.hasUI !== true) { + // TUI only: RPC/JSON/print modes are headless (no PTY herdr can display), + // and RPC still reports hasUI=true, so mode is the reliable gate. + if (ctx?.mode !== "tui") { return; } rootSession = true; -- cgit v1.2.3