feat(pi-extension): blocklist-only bash safety + interactive plan file path#222
Merged
backnotprop merged 3 commits intomainfrom Mar 4, 2026
Merged
feat(pi-extension): blocklist-only bash safety + interactive plan file path#222backnotprop merged 3 commits intomainfrom
backnotprop merged 3 commits intomainfrom
Conversation
…e path Switch from allowlist+blocklist to blocklist-only for bash command gating during planning. Commands are now allowed unless they match a destructive pattern, fixing false positives that blocked web fetching (curl, wget). Preserve tools from other extensions during planning instead of clobbering with a hardcoded tool list. Capture active tools on enter, restore on exit. Add interactive plan file path selection: /plannotator accepts optional path arg or shows input dialog. New /plannotator-set-file command for mid-session path changes. Enables monorepo workflows with per-feature plan files. Closes #221 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…idance Delete DESTRUCTIVE_PATTERNS and isDestructiveCommand() from utils.ts. Remove bash interception from tool_call handler. Bash is now unrestricted during planning — the system prompt guides the agent not to run destructive commands. Write/edit file restrictions to the plan file remain enforced. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses Pi user feedback about two pain points:
Tool gating too aggressive: Switched bash safety from allowlist+blocklist to blocklist-only. Commands are now allowed unless they match a destructive pattern (rm, git push, npm install, etc.), fixing false positives that blocked
curl/wgetfor web content fetching. Also preserves tools from other extensions during planning instead of clobbering with a hardcoded list.Plan file path inflexible:
/plannotatornow accepts an optional path argument (/plannotator plans/auth.md) or prompts interactively via input dialog. New/plannotator-set-filecommand allows changing the plan file mid-session. Enables monorepo workflows with per-feature plan files.Test plan
/plannotatorshows file path input dialog, Enter confirms, Escape cancels/plannotator plans/auth.mdenters planning with that path directly/plannotator-set-file docs/design.mdchanges path mid-sessionCtrl+Alt+Ptoggles without dialogcurl https://example.com 2>/dev/nullallowed during planningrm -rf /,npm install,git pushblocked during planning🤖 Generated with Claude Code