You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use uim-fep, a Japanese input-method front-end. It owns the pane's PTY and runs my shell on an inner PTY, so herdr's foreground process is always uim-fep and nothing under it is detected. Wrapping the shell is just how a FEP is used — it's the normal setup for CJK input, not an exotic one.
HERDR_AGENT works, but it's only read from the pane's foreground process, so it has to sit on the FEP. When the FEP wraps a long-lived shell, the hint sticks for the whole life of the pane. Checked on an HERDR_AGENT=claude uim-fep pane:
inner program is vim → still reported as claude / idle
agent prompt on that pane → returns agent_prompted, and the text lands in the vim buffer
(herdr 0.7.5 stable, Linux, uim-fep 1.9.6)
requested change
When the pane's foreground process is a transparent PTY wrapper, run the same foreground-pgid resolution once more on its inner PTY instead of stopping at the wrapper.
Not a descendant scan — just the existing resolution applied one level down. It follows whatever is actually in the foreground inside, so running vim in the FEP means no agent is detected. A static HERDR_AGENT hint can never do that.
Gate it on a small manifest of known pass-through wrappers (uim-fep, skkfep, and similar) so nothing changes for anyone not using one.
Screen manifests shouldn't need to change. The pane buffer is what the FEP composited, and with each agent under uim-fep with its default status line I get real rule matches, not fallbacks:
Claude Code → live_prompt_box ✅
Codex → osc_title_working ✅
Devin → workspace_trust_prompt ✅
Linux would be /proc-based; macOS and Windows would need their own implementation.
why you want this
Right now the choice is: keep the FEP on the shell and lose agent detection, or move it onto each agent and lose Japanese input in the shell. I took the second one, and this is all it takes:
#!/usr/bin/env bash# uim-agent-exec <herdr-agent-kind> <command> [args...]set -euo pipefail
kind=$1;shift# outside a herdr pane, no uim-fep, or already inside one: run it as-isif [ -z"${HERDR_PANE_ID:-}" ] || [ -n"${UIM_FEP_PID:-}" ] ||!command -v uim-fep >/dev/null 2>&1;thenexec"$@"fi# HERDR_AGENT has to sit on uim-fep, since that is the pane's foreground processexec env "HERDR_AGENT=$kind" uim-fep -f "$HERDR_PANE_ID" -e "$@"
exec uim-agent-exec claude claude "$@"# one of these per agentexec uim-fep -f "$HERDR_PANE_ID" -e fish # and one to get an IM shell back, no HERDR_AGENT
Plus dropping the line in my shell rc that used to wrap every pane in uim-fep.
That works — all my agents are detected. What it costs is that a plain pane can't type Japanese any more: I run the second command first, and have to leave it again before starting an agent. A shell where I write commit messages in Japanese is where that shows up.
If you think the wrapper above is good enough and the answer is "wrap the agent, not the shell", close this with that — I'd rather have it written down somewhere than keep guessing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
idea / problem
I use
uim-fep, a Japanese input-method front-end. It owns the pane's PTY and runs my shell on an inner PTY, so herdr's foreground process is alwaysuim-fepand nothing under it is detected. Wrapping the shell is just how a FEP is used — it's the normal setup for CJK input, not an exotic one.HERDR_AGENTworks, but it's only read from the pane's foreground process, so it has to sit on the FEP. When the FEP wraps a long-lived shell, the hint sticks for the whole life of the pane. Checked on anHERDR_AGENT=claude uim-feppane:vim→ still reported asclaude / idleagent prompton that pane → returnsagent_prompted, and the text lands in the vim buffer(herdr 0.7.5 stable, Linux, uim-fep 1.9.6)
requested change
When the pane's foreground process is a transparent PTY wrapper, run the same foreground-pgid resolution once more on its inner PTY instead of stopping at the wrapper.
Not a descendant scan — just the existing resolution applied one level down. It follows whatever is actually in the foreground inside, so running
vimin the FEP means no agent is detected. A staticHERDR_AGENThint can never do that.Gate it on a small manifest of known pass-through wrappers (
uim-fep,skkfep, and similar) so nothing changes for anyone not using one.Screen manifests shouldn't need to change. The pane buffer is what the FEP composited, and with each agent under
uim-fepwith its default status line I get real rule matches, not fallbacks:live_prompt_box✅osc_title_working✅workspace_trust_prompt✅Linux would be
/proc-based; macOS and Windows would need their own implementation.why you want this
Right now the choice is: keep the FEP on the shell and lose agent detection, or move it onto each agent and lose Japanese input in the shell. I took the second one, and this is all it takes:
Plus dropping the line in my shell rc that used to wrap every pane in
uim-fep.That works — all my agents are detected. What it costs is that a plain pane can't type Japanese any more: I run the second command first, and have to leave it again before starting an agent. A shell where I write commit messages in Japanese is where that shows up.
If you think the wrapper above is good enough and the answer is "wrap the agent, not the shell", close this with that — I'd rather have it written down somewhere than keep guessing.
All reactions