fix(acp): default Grok (and tier-2 presets) to ACP entrypoint args - #3458
fix(acp): default Grok (and tier-2 presets) to ACP entrypoint args#3458madhu-korada wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2487dd5d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "grok" => Some(vec![ | ||
| "agent".to_string(), | ||
| "--always-approve".to_string(), | ||
| "stdio".to_string(), | ||
| ]), |
There was a problem hiding this comment.
Apply the Grok default when CLI args are omitted
When BUZZ_ACP_AGENT_COMMAND=grok (or --agent-command grok) is used without explicitly setting agent args, both CliArgs and AuthAgentArgs supply the legacy default "acp", so normalize_agent_args sees a nonempty vector and preserves it instead of selecting this new default. Standalone relay, models, and authentication launches therefore execute grok acp rather than grok agent --always-approve stdio; represent omitted args as empty before normalization or treat the legacy sole acp value as absent for Grok.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — fixed in d82a729.
normalize_agent_args now treats a sole bare "acp" as omitted for any command that has a known default (not only when the default is empty). So:
BUZZ_ACP_AGENT_COMMAND=grokwith clap/env defaultagent_args=["acp"]→agent --always-approve stdio- goose still gets
["acp"] - zero-arg adapters still get
[] - explicit multi-arg lists are unchanged
Also added DCO Signed-off-by on the commit.
e2487dd to
d82a729
Compare
Empty agent_args on managed-agent records is intentional; spawn is supposed to fill runtime defaults via normalize_agent_args. Grok was missing from default_agent_args, so selecting Grok Build launched bare `grok` (interactive TUI). Under the desktop (no controlling TTY) that exits with ENXIO and every pool worker fails. Also treat a sole legacy clap/env default of "acp" as omitted for known runtimes, so `BUZZ_ACP_AGENT_COMMAND=grok` without explicit args does not spawn `grok acp`. - default_agent_args: grok → agent --always-approve stdio - normalize: sole "acp" → runtime default - tests for empty, path, and legacy-acp grok args Fixes block#3457 Signed-off-by: Madhu Korada <madhu.korada@nimble.ai>
d82a729 to
fb9d097
Compare
Summary
Fixes #3457.
Selecting Grok Build as the managed-agent runtime launched bare
grok(the interactive TUI) because managed-agent records intentionally store emptyagent_argsand spawn is supposed to fill defaults vianormalize_agent_args/default_agent_args.Grok (and other Tier-2 presets) were not in that default table, so Buzz spawned:
Under the desktop (no controlling TTY) that dies with:
The catalog already documents the correct entrypoint:
…but empty instance args never resolved to those defaults.
Changes
desktop/.../discovery.rs—default_agent_argsfalls through toPRESET_HARNESSESby command identity (single source of truth for Tier-2).crates/buzz-acp/src/config.rs— mirror the same defaults for env/CLI launches (BUZZ_ACP_AGENT_COMMAND=grokwith empty args).pathforms ofgrok→["agent", "--always-approve", "stdio"]; other presets (omp,opencode,kimi,cursor-agent,openclaw, zero-arg adapters).Explicit non-empty
agent_argsare still preserved.Test plan
cargo test -p buzz-acp normalizes_cargo test --manifest-path desktop/src-tauri/Cargo.toml normalizes_Workaround (pre-fix)
Set instance args to
agent,stdio(oragent,--always-approve,stdio) or wrap withgrok-acp→exec grok agent stdio "$@".