fix: per-process PONYTAIL_DEFAULT_MODE=off no longer clears shared flag by tanish19078 · Pull Request #813 · DietrichGebert/ponytail · GitHub
Skip to content

fix: per-process PONYTAIL_DEFAULT_MODE=off no longer clears shared flag - #813

Open
tanish19078 wants to merge 1 commit into
DietrichGebert:mainfrom
tanish19078:fix-809-per-process-off-keeps-shared-flag
Open

fix: per-process PONYTAIL_DEFAULT_MODE=off no longer clears shared flag#813
tanish19078 wants to merge 1 commit into
DietrichGebert:mainfrom
tanish19078:fix-809-per-process-off-keeps-shared-flag

Conversation

@tanish19078

Copy link
Copy Markdown

Fixes #809 (partial: the env-override blast radius; full session-scoping of /ponytail-review is a bigger redesign, deliberately out of scope).

Starting one session with PONYTAIL_DEFAULT_MODE=off ran clearMode() in ponytail-activate.js, deleting the shared flag and silently turning ponytail off for every other session's subagents. Reproduced per the issue: flag full -> env-off activate -> flag gone.

  • New isPerProcessOff() in hooks/ponytail-config.js: true only when the env override says off while the configured default is something else (a config-file off still means off everywhere).
  • ponytail-activate.js skips clearMode() in that case; ponytail-subagent.js exits silently so the exempt session injects nothing.

Verification: issue repro now leaves flag full (hook prints OK, exit 0); config-file off still clears stale flags; node --test tests/*.test.js 84/84 + pi-extension 23/23 pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant