#809·ponytail

Mode flag is machine-global: /ponytail-review (and PONYTAIL_DEFAULT_MODE=off in one session) changes every other session's subagents

Author: Cdsv127Created Sep 4, 2026Updated Sep 10, 2026

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:

  1. /ponytail-review in one pane writes review to the flag (ponytail-mode-tracker.js), and from then on the SubagentStart hook in every other pane injects PONYTAIL 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 throwaway CLAUDE_CONFIG_DIR: flag full/ponytail-reviewreview; an ordinary next prompt leaves it review; a subagent then receives the review pointer.
  2. Starting one session with PONYTAIL_DEFAULT_MODE=off (to keep ponytail out of a specific headless claude -p subprocess) runs clearMode() in ponytail-activate.js, which deletes the shared flag — ponytail silently turns off for every other pane's subagents. Reproduced by running the hook directly: flag fullPONYTAIL_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.