Skip to content

Conversation

@michaelneale
Copy link
Collaborator

--output stream-json

so it can stream output to stdout as it goes, simmilar to other cli tools.

Copilot AI review requested due to automatic review settings December 22, 2025 01:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new --output-format stream-json option that enables streaming JSON output (JSONL format) to stdout, allowing real-time consumption of events as they occur during goose execution.

  • Adds stream-json as a new output format option alongside existing text and json formats
  • Introduces StreamEvent and NotificationData enums to structure streaming events
  • Emits JSON events for messages, notifications, model changes, errors, and completion

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
crates/goose-cli/src/cli.rs Updates CLI argument parser to accept stream-json as a valid output format option
crates/goose-cli/src/session/mod.rs Adds streaming event data structures and implements JSON event emission throughout the agent response processing loop

@michaelneale michaelneale self-assigned this Dec 22, 2025
additional_sub_recipes: Vec<String>,

/// Output format (text, json)
/// Output format (text, json, stream-json)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DOsinga I guess at this level they are distinct - and this is consistent with what others like codex do

Copilot AI review requested due to automatic review settings December 22, 2025 23:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@michaelneale michaelneale merged commit 1a79f28 into main Dec 22, 2025
26 checks passed
@michaelneale michaelneale deleted the micn/stream-json-cli branch December 22, 2025 23:24
wpfleger96 added a commit that referenced this pull request Dec 23, 2025
* main: (155 commits)
  remove Tool Selection Strategy preview (#6250)
  fix(cli): correct bash syntax in terminal integration functions (#6181)
  fix : opening a session to view it modifies session history order in desktop (#6156)
  test: fix recipe and audio tests to avoid side effects (#6231)
  chore: Update gemini versions in test_providers.sh (#6246)
  feat: option to stream json - jsonl really (#6228)
  feat: add mcp app renderer (#6095)
  docs: update skills extension to support .agents/skills directories (#6199)
  Add YouTube short to Chrome DevTools MCP tutorial (#6244)
  docs: Caveats for privacy information in logs documentation (#6218)
  move goose issue solver to opus (#6233)
  feat: improved UX for tool calls via execute_code (#6205)
  Blog: Code Mode Doesn't Replace MCP (#6227)
  fix: prevent keychain requests during cargo test (#6219)
  test: fix test_max_turns_limit slow execution and wrong message type (#6221)
  Skills vs MCP blog (#6220)
  Add blog post: Does Your AI Agent Need a Plan? (#6209)
  fix(ui): enable MCP UI to send a prompt message when an element is clicked (#6207)
  docs: param option for recipe deeplink/open (#6206)
  docs: edit in place or fork session (#6203)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants