dev lane: managed agents resolve a zero-byte `buzz` sidecar — `just dev` never replaces the Tauri stubs beside the app executable
Describe the bug
On a clean just dev, every managed agent's buzz CLI is unresolvable or zero-byte, so buzz-cli skill commands fail silently — including buzz agents draft-create (conversational agent setup). Looks like a trigger behind the symptom family in #2459.
Causal chain (each step verified on disk):
-
_ensure-sidecar-stubstouches five zero-byte placeholders indesktop/src-tauri/binaries/(the Tauri externalBin compile gate — intentional, per #2492). -
Tauri dev copies those stubs beside the app executable in
desktop/src-tauri/target/debug/(arch suffix dropped). The real binaries are built into the WORKSPACEtarget/debug/—desktop/src-tauriresolves to its own Cargo target dir, so nothing ever replaces the stubs. -
build_augmented_path(managed_agents/runtime/path.rs) puts~/.local/binat entry 1 and exe_parent — the stub directory — at entry 5. A live agent's composed PATH:~/.local/bin <- only `buzz-dev` (see 4) .../Application Support/Buzz/node-tools/bin .../Application Support/Buzz/runtimes/node/.../bin ~/Projects/buzz/desktop/src-tauri/target/debug <- five zero-byte stubs ...login shell PATH (no buzz anywhere)command -v buzzon that PATH: not resolvable (the stub is mode 644, zero bytes). -
ensure_cli_symlink(nest.rs:366) gates onbuzz_bin.exists()— which passes on the zero-byte stub — and links~/.local/bin/buzz-devto it. Dev builds deliberately link onlybuzz-dev, and agents invoke barebuzz(buzz-cli SKILL.md), so the human symlink cannot save the agent lane either.
Net: in the dev lane, the documented agent contract ("agents find the CLI via PATH augmentation", nest.rs:361-362) is broken by construction. desktop-standalone stages all five binaries; dev, staging, and production recipes do not. scripts/bundle-sidecars.sh is release-only (SRC_DIR="target/release"), so it cannot serve just dev as written.
Steps to reproduce
just dev— wait for desktop + managed agents to come upls -la desktop/src-tauri/target/debug/buzz— 0 bytes, mode 644- Ask any managed agent to run
buzz --help— command not found / silent failure (agent-visible buzz-cli actions likebuzz agents draft-createfail)
Expected behavior
A managed agent spawned by the dev-lane desktop can resolve and execute a real buzz CLI via its augmented PATH, per the contract in nest.rs.
Version and platform
- Buzz version: v0.5.2 (also confirmed on v0.5.0/v0.5.1; relevant recipes/code unchanged on current main by inspection)
- OS: macOS 15 (Darwin 24.6.0, Apple Silicon)
Logs / additional context
Duplicate search: closest are #2492 (Windows stub suffix — documents the stubs as intentional compile gates, different failure) and #2459 (lost agent replies when the agent's buzz CLI write fails — unconfirmed trigger, consistent with this). Open PRs #2655 / #3069 touch bundled/packaged sidecar preference for releases; neither appears to close the dev-lane staging gap.
Questions before we write any code:
- Do #2655 / #3069 already own this, or is the dev-lane staging gap separate?
- What is the intended dev-lane contract: should
just devstage debug sidecars into the exe-parent dir, or are dev agents expected to obtainbuzzanother way? - Should
ensure_cli_symlink's.exists()gate test executability/non-zero size so it never links to a stub?
Happy to PR the minimal fix for whichever contract you confirm. Our local workaround (post-just dev staging of the five workspace-target binaries into the exe-parent dir, fail-closed) restores agents immediately, so no urgency on our side.
Windows data point: there is a second mechanism here, separate from the stubs.
On Windows the augmented PATH is composed correctly but never reaches Claude Code agents. A live agent's PowerShell tool sees it in full, including the sidecar dir with a real 20 MB buzz.exe. Its Bash tool sees none of it — command -v buzz is empty, and the PATH there is just the registry PATH plus Git Bash's own profile prefix. Claude Code rebuilds the environment for its Bash tool instead of passing the inherited one, so no amount of PATH composition on our side can reach it.
That also explains why this reads as intermittent rather than broken: Claude Code retries the failed buzz messages send through its PowerShell tool, which does have the PATH. The log shows the same command twice — exit 127, then success. Possibly the trigger behind #2459.
Your question 3 — should the gate test executability? Yes, and on every platform. A zero-byte stub that resolves is worse than no link: the agent gets exit 0 and reports a message it never sent. A non-zero-length check is enough.
Your question 2 — dev-lane contract. For Windows, ~/.local/bin is the wrong target; it's only on my Bash PATH because it happens to be in my registry PATH. %USERPROFILE%\bin is reliable, because Git Bash's /etc/profile prepends $HOME/bin unconditionally:
$ PATH=C:\WINDOWS\system32 bash -lc 'echo $PATH'
/c/Users/<me>/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/WINDOWS/system32:...
The open question is the name. Agents invoke bare buzz, so a dev build creating only buzz-dev leaves them broken — but creating buzz from a dev build discards the isolation cli_link_name protects. I have this running locally as buzz.exe (single name, symlink → hard link → copy fallback, refreshed each boot) and will send it as a PR, but that's a contract call I'd rather a maintainer made. Say which way and I'll write it.
Not a maintainer — just a user who hit this today. Every buzz call from my managed agents was dying with permission denied, and I traced it down to the zero-byte stub and the .exists() gate on my own before I went looking for somewhere to contribute the fix. That's when I found this issue, which already covers everything I'd worked out. So rather than file a duplicate, here's my reproduction plus the one question I can answer concretely.
Independent macOS reproduction, plus a concrete answer to your question 1.
Reproduced on current origin/main (c3132c3ee), macOS 15 / Darwin 25.5.0, Apple Silicon. Every step of your causal chain holds:
$ ls -la desktop/src-tauri/binaries/
-rw-r--r-- 0 buzz-aarch64-apple-darwin
-rw-r--r-- 0 buzz-acp-aarch64-apple-darwin
-rw-r--r-- 0 buzz-agent-aarch64-apple-darwin
-rw-r--r-- 0 buzz-backend-kubernetes-aarch64-apple-darwin
-rw-r--r-- 0 buzz-dev-mcp-aarch64-apple-darwin
-rw-r--r-- 0 git-credential-nostr-aarch64-apple-darwin
$ ls -la desktop/src-tauri/target/debug/buzz
-rw-r--r-- 0 desktop/src-tauri/target/debug/buzz
$ ls -la ~/.local/bin/buzz-dev
buzz-dev -> .../desktop/src-tauri/target/debug/buzz # the zero-byte stub
Both code sites are unchanged on main: _ensure-sidecar-stubs is still touch-only (Justfile:166-179) and the symlink gate is still .exists() (nest.rs:342-343).
Question 1 — do #2655 / #3069 already own this? No. I diffed both:
- #2655 touches
Justfile, but only thedesktop-release-buildrecipe (replaces itstouchblock withcargo build --release+scripts/bundle-sidecars.sh)._ensure-sidecar-stubs— the dev lane — is untouched; the PR only edits its trailing comment. Itsdiscovery.rschanges are release-path preference. - #3069 touches
command_search.rs/discovery.rs/mod.rsonly — discovery order for bundled release sidecars. No Justfile, no dev-lane staging.
So the dev-lane staging gap is unowned by either PR.
One new data point on the symptom shape. Your repro reports command -v buzz as empty. That's bash. Under zsh the stub is resolved (it's a readable regular file on PATH) and execution fails at execve instead:
$ buzz repos list
zsh: permission denied: buzz
Same root cause, but the agent-visible error differs by shell. Worth noting because permission denied reads like a sandbox/entitlement problem and sends you looking in the wrong place — that cost me a while before I found the zero-byte stub. If the executability gate from your question 3 lands, it may be worth making the failure loud in the log with the resolved path, so the next person sees the stub immediately.
I confirm your answer to question 3 from the macOS side: a non-zero-length + executable-bit check is enough, and a stub that resolves is strictly worse than no link.
On question 2, I don't want to duplicate @sumit-m. As I read it there are two non-overlapping halves:
- the
~/.local/binlink name/target mechanism (ensure_cli_symlink) — @sumit-m has this running locally and offered the PR; - dev-lane staging of the real workspace-target binaries into exe-parent (
_ensure-sidecar-stubsor a newjust devstep).
Half 2 is only needed if the contract says agents should get buzz from exe-parent rather than from a dev-created buzz link at entry 1 — which is exactly the call you're asking a maintainer to make. So it really is blocked on that answer, not on someone volunteering.
If a maintainer confirms the staging direction, I'm happy to take half 2 on macOS/Linux and leave half 1 with @sumit-m. If the direction is instead a single buzz link from dev builds, half 2 isn't needed and I'll stay out of the way.