Skip to content

fix(buzz-acp): ground the agent workspace on Windows - #3730

Open
sumit-m wants to merge 1 commit into
block:mainfrom
sumit-m:windows-agent-workspace
Open

fix(buzz-acp): ground the agent workspace on Windows#3730
sumit-m wants to merge 1 commit into
block:mainfrom
sumit-m:windows-agent-workspace

Conversation

@sumit-m

@sumit-m sumit-m commented Jul 30, 2026

Copy link
Copy Markdown

Problem

workspace_section decides whether to emit the [Workspace] grounding block by testing cwd.starts_with('/'). No Windows path satisfies that, so on Windows the section is always None: agents are never told their working directory, nor that AGENTS.md, PLANS/, RESEARCH/, WORK_LOGS/, OUTBOX/ and REPOS/ live there.

The cwd itself is set correctly, so files still land in the right place by default — but the prompt loses the grounding that exists precisely to stop the agent hunting around $HOME for those directories.

Change

  • Use Path::is_absolute for the absoluteness test. It is target-aware, so C:\Users\me\.buzz qualifies. The explicit cwd != "/" check stays, because is_absolute("/") is true on Unix and that value is the current_dir() failure sentinel.
  • Join REPOS with Path::join rather than interpolating a literal /, so a Windows nest reads …\.buzz\REPOS instead of a mixed-separator path.

Tests

The existing tests hardcoded /Users/me/.buzz with no cfg gate, which is why this went unnoticed — on Windows they asserted nothing meaningful. They now go through a cfg'd SAMPLE_ABS_CWD so the suite exercises the platform it runs on, plus a cross-platform regression guard and one rejection case per platform (C:foo drive-relative on Windows, a Windows path on Unix).

cargo clippy -p buzz-acp --all-targets clean; pool::tests 98/98 on Windows.

workspace_section gated on cwd.starts_with('/'), which no Windows path
satisfies, so agents there got no [Workspace] section and were never told
where PLANS/ and REPOS/ live. Use Path::is_absolute and join REPOS natively.

Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
@sumit-m
sumit-m requested a review from a team as a code owner July 30, 2026 12:58
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