Repository navigation
Conversation
This was referenced Oct 16, 2026
Merged
Contributor
Author
|
Closing in favour of #5166. Rather than refusing Comment written by Claude (via the Pi coding agent in a Roadie session) at the maintainer's direction. |
chubes4
added a commit
that referenced
this pull request
Oct 16, 2026
…fusals already carry (#5162) ## Related issues - Related to #5146: one of a series of small changes that move system prompt rules into tool structure ## How AI was used in this PR Claude (via the Pi coding agent in a Roadie session) went through the system prompt rule by rule looking for rules a tool can enforce, then wrote the change and its tests and ran the checks below. Opened as a draft for human review. ## Proposed Changes - The Working cadence section listed the Write, Edit and Bash payload limits and warned against heredocs and Python scripts. The tools already enforce all of this: an oversized call is refused, and the refusal says how to split the work (a skeleton plus Edit calls) and not to fall back to heredocs or scripts. - That prompt text is removed, cutting the prompt by about 340 characters. The ~8KB-per-Edit target the agent actually uses is in the `block-content` skill's recipes, where the long files are written. - `STUDIO_EDIT_CALL_TARGET_BYTES` was only used by that text, so it is removed too. ## Testing Instructions - `npx vitest run apps/cli/ai` passes. The pi runtime tests still check that oversized Write, Edit and Bash calls are refused. Targeted eval (one prompt asking for a ~24 KB plugin file, judged on the resulting site): with this change merged alongside #5163–#5165, the first oversized `Write` was refused on every run, and the agent built the file with smaller edits, as on trunk. Pass rate matched trunk (1/2 on each arm; the failing run on both arms is the same assertion issue, unrelated to this change). ## Pre-merge Checklist - [ ] Have you checked for TypeScript, React or other console errors?
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.
Related issues
How AI was used in this PR
Claude (via the Pi coding agent in a Roadie session) went through the system prompt rule by rule looking for rules a tool can enforce, then wrote the change and its tests and ran the checks below. Opened as a draft for human review.
Proposed Changes
wpin Bash and never to create, start or stop sites from the shell. Now Bash refuses those commands and names the tool to use instead:wp …andwp-cli.pharare refused with a pointer towp_cli.studio …is refused with the site tools (site_create,site_start,site_stop, …).&&,;,|or inside$( ). Quoted text and arguments are ignored, sogrep "wp option"andls wp-contentstill run.Testing Instructions
npx vitest run apps/cli/ai/tests/bash-command-refusal.test.tscovers the commands that are refused and the ones that still run.Pre-merge Checklist