Skip to content

fix(buzz-acp): loosen workspace-scan guardrail to allow named paths - #6261

Open
salman1993 wants to merge 1 commit into
mainfrom
leo/loosen-workspace-scan
Open

fix(buzz-acp): loosen workspace-scan guardrail to allow named paths#6261
salman1993 wants to merge 1 commit into
mainfrom
leo/loosen-workspace-scan

Conversation

@salman1993

Copy link
Copy Markdown
Contributor

Problem

Agents refused to read a specific, user-named path outside .buzz (e.g. ~/.claude/skills/context-health-check/SKILL.md), and behaved inconsistently — refusing in one channel, listing the same dir in another. This is the issue Aaron and Wes hit: buzz://message?channel=e62570dd-33ad-42c5-b92b-75f2689f9694&id=401199157f8a9734109fdddfbbce4603a1ff465fae895042f29738ad52a5d15f

Root cause: two prompt fragments told agents not to search $HOME "or other directories". The intent (added in #1194 by Will Pfleger) was narrow — stop unscoped $HOME sweeps that fire macOS TCC dialogs or make a model invent its own workspace dir. But "or other directories" reads as a blanket filesystem wall, so a cautious model generalized it to "any path outside .buzz" and refused a targeted, named read.

Fix

Prompt-only. Reframe both fragments per context-engineering guidance — state the reason and trust judgement, rather than banning a technique:

crates/buzz-acp/src/pool.rsworkspace_section()

…This is where you already are, so start here rather than scanning $HOME. Any specific path the user names is fine to read.

crates/buzz-acp/src/base_prompt.md line 106

These paths are relative to your working directory — start there for your own files rather than scanning $HOME or /. When the user names a specific path, read it.

Preserves the original anchor intent (start at the grounded workspace; avoid unscoped $HOME sweeps) while explicitly permitting a named-path read — the exact case that was broken.

Testing

cargo test -p buzz-acp — 816 unit + 9 integration tests pass, 0 failures. Prompt-only change; the doc comment at pool.rs:1327-1333 already states the narrow intent and is left as-is.

The [Workspace] anchor and base-prompt layout note told agents not to
search $HOME 'or other directories', which cautious models
overgeneralized into a filesystem wall — refusing to read a specific,
user-named path outside .buzz. That over-application is what Aaron and
Wes hit.

Reframe both fragments per context-engineering guidance: give the
reason (start at the grounded workspace; a $HOME scan is not what the
user intended unless they ask for it) and explicitly permit reading any
specific path the user names, inside or outside $HOME. Keeps the
original anchor intent (avoid unscoped $HOME sweeps that fire macOS TCC
prompts / invent workspace dirs) without the blanket prohibition.

Co-authored-by: Salman Mohammed <smohammed@squareup.com>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>
@salman1993

Copy link
Copy Markdown
Contributor Author

🤖 Benchmark result using read-named-path-outside-workspace from the Buzz-native dataset in #6264.

Test setup:

Results:

One separate tool ergonomics issue remains: all five runs first passed literal ~ to read_file, which resolved incorrectly as /app/~. Every agent recovered and successfully read the named external file, so this did not affect the benchmark result.

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.

1 participant