fix: display shell output as static text instead of spinner
Summary
Shell command output (like device codes from gh auth login) was being displayed as spinner messages, causing critical information to be hidden or lost. This fix extracts the notification type from MCP logging messages and prints shell_output directly as static text, following the same pattern as task_execution notifications.
Type of Change
- [x] Bug fix
AI Assistance
- [x] This PR was created or reviewed with AI assistance
Testing
Manual testing:
- Tested
gh auth login- device code now displays correctly as static text - Verified shell output streams line-by-line without spinner corruption
Automated testing:
- ✅ Unit tests:
cargo test --package goose-cli(101/101 passed) - ✅ Linter:
./scripts/clippy-lint.sh(clean, no new warnings) - ✅ Format:
cargo fmt --check(passing)
Changes:
-
crates/goose-cli/src/session/mod.rs(+16, -2 lines)- Extract
typefield from MCP notifications (lines 1089-1093) - Add
shell_outputhandling to print directly without spinner (lines 1128-1138)
- Extract
Related Issues
Partial fix for #3196 - addresses shell output streaming during command execution. The original issue requests a hotkey to show full tool output; this fix ensures streaming output displays correctly in real-time.
Screenshots/Demos (for UX changes)
Before: Device code from gh auth login was hidden in spinner animation
After: Device code displays immediately as static text:
─── shell | developer ──────────────────────────
command: gh auth login
! First copy your one-time code: 85A2-6D9A
Open this URL to continue in your web browser: https://github.com/login/device
Related:
- Addresses shell output visibility during execution (related to #2767 shell truncation from #2613)
- See also #6067 (proposed hotkey for truncated output) and #3196 (original truncation request)
Context: This PR fixes streaming shell output being hidden in spinners during command execution.
If you can do the DCO check we can merge https://github.com/block/goose/pull/6041/checks?check_run_id=57941985111
@alexhancock DCO fixed and all checks passing now. Thanks for the quick reviews!
@clouatre Nice - thanks!