buzz icon indicating copy to clipboard operation
buzz copied to clipboard

feat(acp): send `additionalDirectories` at session start, with per-agent extra folders

Open uevuleocha opened this issue 4 weeks ago • 0 comments

Summary

Some ACP agents now accept extra working folders at session start, but Buzz never sends them. So a sandboxed harness can only touch the nest. Please add an optional per-agent Additional directories list, and pass it as additionalDirectories in session/new, session/load and session/resume when the agent advertises support.

Why

Buzz starts every managed agent with cwd = the nest (~/.buzz). Claude Code and Codex agents can still work in other folders when told to. Google's antigravity-acp cannot: its pre-tool hook refuses every file tool call outside the session's allowed folders, which are cwd plus its own skills and Temp folders.

Since antigravity-acp 1.4.5, the initialize reply advertises sessionCapabilities.additionalDirectories, and folders listed there in session/new are allowed. Buzz has no code that sends this field (searching the repo for additionalDirectories finds nothing), so in Buzz an Antigravity agent can chat and run buzz CLI commands but cannot read or write any project.

Proposal

  1. Edit agent → Advanced: an optional, repeatable Additional directories field holding absolute paths.
  2. At session start: if the agent's initialize reply advertises sessionCapabilities.additionalDirectories, include the list in params.additionalDirectories for session/new, session/load and session/resume. If it doesn't, send nothing, so other runtimes are unaffected.
  3. Optionally, validate that each path exists when the agent is saved.

Evidence it works

I proved this with a small stdio proxy registered as a Custom harness. It passes all traffic through and only adds additionalDirectories to those three methods. With it, three Antigravity agents in Buzz read files across the user profile with zero errors. Without it, every read outside the nest is refused. The proxy is a workaround; this belongs in Buzz.

Related

  • #4977 (per-agent working directories): complementary, not a replacement. It moves the single cwd, while this adds folders alongside it, so an agent can keep the nest and still reach a project.
  • #3364 (RFC: repository-scoped managed agents): same underlying need, approached through cwd.
  • #5828 (Repos Directory ignored on Windows): a separate bug. Fixing it moves REPOS, but sandboxed harnesses resolve links with realpath(), so a junction in the nest still wouldn't help them.
  • Google side: google-antigravity/antigravity-cli#1273.

Environment

  • Buzz Desktop 0.5.28, Windows 11
  • Custom ACP harness: antigravity-acp 1.4.5 (agy_acp_server.exe)

uevuleocha avatar Nov 02 '26 19:11 uevuleocha