[Bug] <Bug Title Here>
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Summary
On Windows 11, interacting with channels in the Buzz desktop app causes multiple console / Windows Terminal windows to open and close. One window that stays open shows:
```
[process exited with code 1 (0x00000001)]
You can now close this terminal with Ctrl+D, or press Enter to restart.
```
## Environment
- OS: Windows 11 (10.0.26200)
- Buzz desktop: 0.4.21 (buzz-desktop.exe from %LOCALAPPDATA%\Buzz)
- Installer: Buzz_0.4.21_x64-setup_alpha-unsigned
- Default terminal: Windows Terminal (wt.exe present)
- Git for Windows / Git Bash: installed (C:\Program Files\Git\bin\bash.exe)
- Agent global config: provider: "openai", preferred_runtime: "buzz-agent"
- Built-in agents present: Fizz / Honey / Bumble (agent_command: buzz-agent, mcp_command: buzz-dev-mcp)
- OPENAI_API_KEY / OPENAI_COMPAT_API_KEY / ANTHROPIC_API_KEY: not set in user or process environment
## Steps to reproduce
1. Install Buzz 0.4.21 alpha on Windows 11.
2. Launch buzz-desktop.
3. Ensure Windows Terminal is the default terminal application.
4. Do not configure an LLM API key (or leave provider set to OpenAI without a key).
5. Open / switch between channels that involve managed agents (e.g. Welcome Team agents).
## Actual behavior
- Multiple CMD / Windows Terminal windows flash open and close repeatedly.
- At least one window remains with Windows Terminal’s process-exit banner and exit code 1.
- Running the helper directly confirms config failure:
```
buzz-agent.exe
→ ERROR buzz_agent: config: BUZZ_AGENT_PROVIDER is required
$env:BUZZ_AGENT_PROVIDER='openai'; buzz-agent.exe
→ ERROR buzz_agent: config: OPENAI_COMPAT_API_KEY required
(exit code 2)
```
buzz-acp.exe contains the string process exited, which matches the observed exit handling.
## Expected behavior
1. Agent subprocesses on Windows should be spawned hidden (CREATE_NO_WINDOW / equivalent), not as visible console windows — even when they fail.
2. Missing provider / API key should surface as an in-app error / agent status (e.g. in managed agent last_error), not a crash-loop of terminal windows.
3. Channel navigation should not keep respawning failing agent processes in a visible way.
## Notes / suspected cause
Two related issues:
- Config failure: agents start without a usable provider/API key and exit immediately.
- Windows packaging / spawn bug: console-subsystem helpers are launched without hiding the console. With Windows Terminal as the default terminal app, every spawn becomes a visible window; auto-restart / channel activity turns that into a flash loop.
Git Bash is present, so this does not look like the documented missing-bash Windows prerequisite.
## Suggested fix
- Spawn buzz-acp / buzz-agent / buzz-dev-mcp (and any cmd.exe wrappers) with CREATE_NO_WINDOW / DETACHED_PROCESS on Windows.
- Fail fast in the UI when provider/API key is missing instead of restart-looping the child process.
- Optionally gate agent auto-start until provider config validates.
## Workaround
- Configure a valid provider + API key (OPENAI_COMPAT_API_KEY for OpenAI-compat, or Anthropic equivalent), or deactivate managed agents.
- Temporarily set Default terminal application to Windows Console Host to reduce visible flashes (does not fix the underlying exit loop).
Happy to provide more logs / Process Explorer captures if useful.
Contributor guide
Research direction
Start by tracing the Windows launch paths for buzz-acp, buzz-agent, and buzz-dev-mcp, then reproduce the issue with no provider or API key configured. Check how failed agent processes are spawned, surfaced, and restarted when switching channels. Done means failed starts do not create visible terminal windows or a restart loop, and the missing configuration appears as an in-app agent error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100