Skip to content

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

Open
apc5074 wants to merge 1 commit into
PostHog:mainfrom
apc5074:fix-pi-bash-guidance
Open

apc5074 wants to merge 1 commit 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

@signed-commit-check

signed-commit-check Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Commit signatures resolved

GitHub now verifies every commit signature in this PR. No further action is needed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@apc5074
apc5074 force-pushed the fix-pi-bash-guidance branch from d60d4d0 to 111bb69 Compare October 27, 2026 17:55
@apc5074

apc5074 commented Oct 27, 2026

Copy link
Copy Markdown
Author

Updated with main + fixed conflicts

CI needs approval

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

2 participants