Mode flag is machine-global: /ponytail-review (and PONYTAIL_DEFAULT_MODE=off in one session) changes every other session's subagents
Version: ponytail 4.9.0, Claude Code 2.1.258, macOS.
What happens. hooks/ponytail-runtime.js keeps one mode flag per CLAUDE_CONFIG_DIR (~/.claude/.ponytail-active). Every Claude Code session on the machine shares it, so:
/ponytail-reviewin one pane writesreviewto the flag (ponytail-mode-tracker.js), and from then on the SubagentStart hook in every other pane injectsPONYTAIL MODE ACTIVE — level: review. Behavior defined by /ponytail-review skill.instead of the ladder — a "list deletions, apply nothing" persona lands in unrelated sessions' builder subagents until someone runs/ponytail full. Reproduced in a throwawayCLAUDE_CONFIG_DIR: flagfull→/ponytail-review→review; an ordinary next prompt leaves itreview; a subagent then receives the review pointer.- Starting one session with
PONYTAIL_DEFAULT_MODE=off(to keep ponytail out of a specific headlessclaude -psubprocess) runsclearMode()inponytail-activate.js, which deletes the shared flag — ponytail silently turns off for every other pane's subagents. Reproduced by running the hook directly: flagfull→PONYTAIL_DEFAULT_MODE=off node hooks/ponytail-activate.js→ flag gone.
Why it matters. Multi-pane workflows (several Claude Code sessions on one checkout, plus tools that spawn headless claude -p workers) are common. Session-scoped modes ("sticks until session end", per the README) are in practice machine-scoped, and there is no supported way to exempt one process without affecting the rest.
Suggestion. Key the flag by session (the hook payloads carry session_id), or honour a per-process override (PONYTAIL_MODE / PONYTAIL_DEFAULT_MODE=off) without clearing the shared flag. Happy to test a build.
Source: DietrichGebert/ponytail