Skip to content

feat(cli): include exitCode in command tool_result events#11820

Merged
cte merged 1 commit intomainfrom
cte/cli-exit-code-in-tool-result
Mar 2, 2026
Merged

feat(cli): include exitCode in command tool_result events#11820
cte merged 1 commit intomainfrom
cte/cli-exit-code-in-tool-result

Conversation

@cte
Copy link
Copy Markdown
Collaborator

@cte cte commented Mar 2, 2026

Summary

  • Propagate the command exit code through the JSON event emitter's tool_result events so CLI consumers can distinguish between successful and failed command executions
  • Add exitCode field to rooCliToolResultSchema in the types package
  • Extract exit code from commandExecutionStatus in stdin-stream.ts and pass it through to emitCommandOutputDone

Test plan

  • Updated existing streaming test to verify exitCode is included in tool_result events
  • Verify CLI consumers receive the exitCode field in command completion events
  • Run full test suite to confirm no regressions

🤖 Generated with Claude Code

Interactively review PR in Roo Code Cloud

Propagate the command exit code through the JSON event emitter so CLI
consumers can distinguish between successful and failed command
executions without parsing output text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels Mar 2, 2026
@cte cte merged commit eb21471 into main Mar 2, 2026
14 checks passed
@cte cte deleted the cte/cli-exit-code-in-tool-result branch March 2, 2026 08:03
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Mar 2, 2026
@github-actions github-actions bot mentioned this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant