Summary
Selecting Grok Build as the managed-agent runtime starts Fizz/Honey/Bumble with:
agent_cmd=/Users/.../grok
and empty agent_args. That launches the interactive TUI, not the ACP server. Under Buzz (no controlling TTY) every pool worker exits immediately:
Error: Device not configured (os error 6)
ERROR buzz_acp: agent initialize failed: Agent process exited unexpectedly
Error: all 10 agents failed to start — cannot continue
Claude / other ACP-native adapters work on the same machine. The Grok CLI is installed and authenticated; this is a harness arg wiring bug, not auth.
Environment
- Buzz: 0.5.0 (macOS, desktop)
- Grok CLI: 0.2.114 (
~/.local/bin/grok → ~/.grok/bin/grok)
- OS: macOS arm64
- Config:
preferred_runtime: "grok" in global-agent-config.json
- Managed agents end up with:
"agent_command": "claude-agent-acp",
"agent_command_override": "grok",
"agent_args": []
Steps to reproduce
- Install Grok CLI (
grok on PATH / ~/.grok/bin) and grok login (or set XAI_API_KEY).
- Install latest Buzz desktop; create/start Welcome Team agents (Fizz etc.).
- Set agent runtime / preferred runtime to Grok Build.
- Start agents and open the harness log.
Expected
Spawn should match the preset harness definition on main:
// desktop/src-tauri/src/managed_agents/discovery.rs — PRESET_HARNESSES
PresetHarness {
id: "grok",
label: "Grok Build",
command: "grok",
args: &["agent", "--always-approve", "stdio"],
...
}
i.e. effectively:
grok agent --always-approve stdio
ACP initialize should succeed (same as a manual pipe of JSON-RPC over stdio).
Actual
- Log line:
agent_cmd=.../grok with no agent stdio args.
- Child prints
Error: Device not configured (os error 6) (ENXIO) and exits.
- All parallel workers fail; harness exits status 1:
all 10 agents failed to start.
Manual repro of the bad spawn:
# bare TUI, no TTY — same ENXIO Buzz sees
/Users/$USER/.local/bin/grok </dev/null
# → Error: Device not configured (os error 6)
# correct ACP entrypoint — works
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{},"clientInfo":{"name":"test","version":"0"}}}' \
| grok agent stdio
# → initialize result with protocolVersion 1, authMethods, models, etc.
Root cause (from current main)
Two related gaps:
1. Preset args are not applied when only the command override is set
UI / preferred_runtime = "grok" pins agent_command_override: "grok" but leaves agent_args: [] on the managed agent record. Spawn uses the override binary + the stored (empty) args, so the preset's ["agent", "--always-approve", "stdio"] never reach the process.
2. default_agent_args("grok") does not fill in the preset defaults
In both:
desktop/src-tauri/src/managed_agents/discovery.rs → default_agent_args
crates/buzz-acp/src/config.rs → default_agent_args
only goose / Claude / Codex / buzz-agent are special-cased. grok falls through to None, so normalize_agent_args("grok", []) returns [] instead of the preset ACP args.
Same class of risk for other Tier-2 presets that need non-empty args when the agent record has empty agent_args (omp → acp, opencode → acp, kimi → acp, etc.) if spawn only sees the command + empty stored args.
Suggested fix
-
Include Grok (and other preset harnesses) in default_agent_args, mirroring PRESET_HARNESSES, e.g.:
"grok" => Some(vec![
"agent".into(),
"--always-approve".into(),
"stdio".into(),
]),
"omp" | "opencode" | "kimi" | "cursor" | "cursor-agent" => Some(vec!["acp".into()]),
// ...
Prefer a single source of truth: derive defaults from PRESET_HARNESSES rather than a second match table.
-
When applying preferred_runtime / command override from a preset, also persist (or resolve at spawn) that preset's args, not only the command.
-
Regression test: spawn path / normalize_agent_args("grok", vec![]) must yield ["agent", "--always-approve", "stdio"]; integration smoke that BUZZ_ACP_AGENT_COMMAND=grok with empty args can complete ACP initialize without a TTY.
Workaround (works today)
Edit managed agents so args are set explicitly, then restart agents:
"agent_command_override": "/Users/<you>/.local/bin/grok",
"agent_args": ["agent", "stdio"]
or point the override at a tiny wrapper:
#!/bin/bash
exec "$HOME/.local/bin/grok" agent stdio "$@"
(--always-approve is recommended for managed agents so Grok-side tool prompts do not deadlock headless ACP; Buzz already documents this in the Grok preset PRs.)
Related
Acceptance criteria
Summary
Selecting Grok Build as the managed-agent runtime starts Fizz/Honey/Bumble with:
and empty
agent_args. That launches the interactive TUI, not the ACP server. Under Buzz (no controlling TTY) every pool worker exits immediately:Claude / other ACP-native adapters work on the same machine. The Grok CLI is installed and authenticated; this is a harness arg wiring bug, not auth.
Environment
~/.local/bin/grok→~/.grok/bin/grok)preferred_runtime: "grok"inglobal-agent-config.jsonSteps to reproduce
grokon PATH /~/.grok/bin) andgrok login(or setXAI_API_KEY).Expected
Spawn should match the preset harness definition on
main:i.e. effectively:
ACP
initializeshould succeed (same as a manual pipe of JSON-RPC over stdio).Actual
agent_cmd=.../grokwith noagent stdioargs.Error: Device not configured (os error 6)(ENXIO) and exits.all 10 agents failed to start.Manual repro of the bad spawn:
Root cause (from current
main)Two related gaps:
1. Preset args are not applied when only the command override is set
UI /
preferred_runtime = "grok"pinsagent_command_override: "grok"but leavesagent_args: []on the managed agent record. Spawn uses the override binary + the stored (empty) args, so the preset's["agent", "--always-approve", "stdio"]never reach the process.2.
default_agent_args("grok")does not fill in the preset defaultsIn both:
desktop/src-tauri/src/managed_agents/discovery.rs→default_agent_argscrates/buzz-acp/src/config.rs→default_agent_argsonly
goose/ Claude / Codex /buzz-agentare special-cased.grokfalls through toNone, sonormalize_agent_args("grok", [])returns[]instead of the preset ACP args.Same class of risk for other Tier-2 presets that need non-empty args when the agent record has empty
agent_args(omp→acp,opencode→acp,kimi→acp, etc.) if spawn only sees the command + empty stored args.Suggested fix
Include Grok (and other preset harnesses) in
default_agent_args, mirroringPRESET_HARNESSES, e.g.:Prefer a single source of truth: derive defaults from
PRESET_HARNESSESrather than a second match table.When applying
preferred_runtime/ command override from a preset, also persist (or resolve at spawn) that preset'sargs, not only the command.Regression test: spawn path /
normalize_agent_args("grok", vec![])must yield["agent", "--always-approve", "stdio"]; integration smoke thatBUZZ_ACP_AGENT_COMMAND=grokwith empty args can complete ACPinitializewithout a TTY.Workaround (works today)
Edit managed agents so args are set explicitly, then restart agents:
or point the override at a tiny wrapper:
(
--always-approveis recommended for managed agents so Grok-side tool prompts do not deadlock headless ACP; Buzz already documents this in the Grok preset PRs.)Related
agent --always-approve stdio)/dev/tty/ spawn-context issues on the CLI side; current Grokagent stdiocompletesinitializefine over pipes — the Buzz-side empty-args spawn is sufficient to explain this failure.Acceptance criteria
agentInfo/ capabilities), not TUI ENXIOagent_args+ commandgroknormalizes toagent --always-approve stdio(or equivalent from preset)normalize_agent_args("grok", [])