Skip to content

fix(pi): sync bash prompt with the fence - #1000

Open
apc5074 wants to merge 3 commits into
PostHog:mainfrom
apc5074:fix-pi-bash-guidance
Open

fix(pi): sync bash prompt with the fence#1000
apc5074 wants to merge 3 commits into
PostHog:mainfrom
apc5074:fix-pi-bash-guidance

Conversation

@apc5074

@apc5074 apc5074 commented Jul 28, 2026

Copy link
Copy Markdown

Problem

Closes #894.

Pi agents were getting stuck on a few things that should work:

  • Agents thought they could not remove .posthog-events.json, even though scoped rm is allowed.
  • Agents were unsure when new events did not show up in read-data-schema yet.
  • Valid quoted paths like app/(main)/page.tsx were blocked because they contain parentheses.

Changes

  • Updated the pi runtime notes to mention scoped rm and .posthog-events.json cleanup.
  • Added shared guidance that new events may not appear in read-data-schema until they are ingested.
  • Allowed parentheses inside quoted bash arguments, while still blocking real shell syntax.
  • Made pi task mode use the same scoped rm boundary as linear pi runs.
  • Added regression tests.

Test plan

  • pnpm exec vitest run src/lib/__tests__/wizard-can-use-tool.test.ts src/lib/agent/runner/harness/pi/__tests__/runtime-notes.test.ts src/lib/agent/runner/harness/pi/__tests__/security.test.ts src/lib/agent/__tests__/commandments.test.ts
  • pnpm build
  • pnpm test
  • pnpm fix

@apc5074
apc5074 force-pushed the fix-pi-bash-guidance branch from 4038e9b to 10546d1 Compare July 29, 2026 00:34
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.

pi: prompt drift behind enforcement — agents self-censor rm, stall on schema lag, and trip fence false-positives

1 participant