Chat: a pi pane reported as herdr's custom agent `gentle-shell` gets a terminal, never the chat view
Versions
Ovis 0.5.0 (herdr plugin, github:devswha/[email protected]), herdr 0.9.5, Linux (Fedora 44).
Setup
gentle-shell is pi behind a launcher: it runs the vendored pi with its own isolated home, so the pane's pi process carries PI_CODING_AGENT_DIR=~/.gentle-shell/agent.
Inside herdr it does not reuse herdr's managed pi bridge. Per its own extension (extensions/gentle-herdr-agent.ts, gentle-shell#2705) it stops loading that bridge and reports the same lifecycle under herdr's custom-agent contract, with its own source and its own agent name. herdr therefore lists the pane as agent gentle-shell, and its status detection works.
Problem
That pane gets a terminal, never the chat view. Plain pi panes in the same Ovis show chat normally, so this is about the agent name, not about pi's reader.
What herdr reports for the pane:
{ "agent": "gentle-shell", "agent_status": "idle", "pane_id": "w3:p15", "terminal_title": "π - nicolas" }
Note that it carries no agent_session, while an opencode pane in the same session carries {"agent":"opencode","agent_session":{"source":"herdr:opencode","kind":"id","value":"ses_…"}}. herdr keeps the reported session reference only for its own herdr:* sources, so the transcript path does not arrive that way.
On the Ovis side, server/conversation.ts dispatches readers on the agent name with explicit comparisons (agent === "pi", "opencode", "codex", …) and has no fallback, so an agent it does not name gets the terminal only. shared/supported-agents.ts does not list gentle-shell either.
Why this looks tractable
Ovis's pi reader already handles a moved agent directory: server/pi.ts resolves the store from the pane process's own environment (/proc/<pid>/environ, PI_CODING_AGENT_DIR) rather than assuming ~/.pi/agent. gentle-shell's store has exactly pi's layout — verified on this machine against the live pane:
pid 608303 PI_CODING_AGENT_DIR=/home/nicolas/.gentle-shell/agent
sessions/--home-nicolas--/2026-11-17T14-06-52-131Z_01a1e9d4-fce1-73a2-82b6-11a1ac60faa8.jsonl
So the transcript is there, in the shape pi-tree.ts already parses.
Two gaps to close, both small:
- There is no
pi-ask-bridgesocket under~/.gentle-shell/agent(server/pi.tsuses it to name the session file), and herdr names no session for this pane either. The session file has to be picked from the store — by the id when herdr eventually reports one, or the newest file undersessions/<cwd-slug>/when it does not. - The kind has to reach the pi reader at all.
Proposal
Treat gentle-shell as a pi-family agent: route it to the pi reader, resolve the store through the existing PI_CODING_AGENT_DIR path, and take the session from sessions/<cwd-slug>/ when nobody names the file.
This is the same class as #3931 — a wrapper around a supported agent, where the chat view cannot find the transcript that is plainly on disk — and it would be fixed on the same side: Ovis reading the pane's own environment instead of assuming the default store.
Two alternatives I considered and am not asking for:
- Having gentle-shell report itself as
pi. That is exactly what its reporter deliberately avoids (its own name and source are the point of gentle-shell#2705), so it looks like the wrong side to fix. - Keying on herdr's
HERDR_AGENT=…hint for wrappers, the way #3931 proposes for Claude. That may be the cleaner general rule here too; I raise it because the two issues are the same shape and one decision could cover both.
Happy to test a build against this pane if that helps.