Skip to content

fix(cli): streaming deltas, task ID propagation, cancel recovery, and misc fixes#11736

Merged
cte merged 2 commits intomainfrom
cte/cli-fixes
Feb 25, 2026
Merged

fix(cli): streaming deltas, task ID propagation, cancel recovery, and misc fixes#11736
cte merged 2 commits intomainfrom
cte/cli-fixes

Conversation

@cte
Copy link
Collaborator

@cte cte commented Feb 25, 2026

Summary

  • Streaming deltas for tool_use events: json-event-emitter now computes structured deltas for ask messages (command, tool, mcp) instead of sending full snapshots, reducing output volume during streaming. Includes a new dedicated test suite.
  • Upfront task ID propagation: Task IDs are generated upfront via randomUUID() in stdin-stream and threaded through runTaskcreateTaskTask constructor. currentTaskId is exposed in ExtensionState immediately, before the task emits its first state update (task is created with startTask: false then started after being added to the stack).
  • Post-cancel recovery: After a cancel, stdin-stream now waits (with timeout) for the task to reach a resumable state before processing follow-up messages, preventing race conditions where messages arrive before the cancelled task is rehydrated.
  • Telemetry opt-out: ROO_CODE_DISABLE_TELEMETRY=1 env var disables cloud telemetry; backfillMessages also early-returns when telemetry is disabled.
  • Custom tools schema fix: Tools without parameters now receive a valid empty JSON Schema object ({ type: "object", properties: {}, required: [], additionalProperties: false }) instead of undefined, fixing validation errors with strict-mode APIs (Anthropic, OpenAI).
  • RooProtectedController path fix: Paths outside the working directory (starting with ..) are skipped early to avoid RangeError thrown by the ignore library.
  • Abort during retry: Silently handles task abort during exponential backoff retry countdown instead of logging a spurious error.
  • Custom tools experiment: Extension host now enables customTools: true in experiments.

Test plan

  • Verify CLI streaming mode emits delta-based tool_use events (not full snapshots) for command, tool, and mcp asks
  • Verify task ID is available in extension state immediately after task creation
  • Verify cancel → follow-up message sequencing doesn't race
  • Verify ROO_CODE_DISABLE_TELEMETRY=1 suppresses telemetry
  • Verify custom tools without parameters work with strict-mode APIs
  • Verify isWriteProtected doesn't throw for paths outside cwd
  • Run new test suites: json-event-emitter-streaming.test.ts, RooProtectedController.spec.ts, format-native.spec.ts

🤖 Generated with Claude Code

Interactively review PR in Roo Code Cloud

… misc fixes

- Stream tool_use ask messages (command, tool, mcp) as structured deltas
  instead of full snapshots in json-event-emitter
- Generate task ID upfront and propagate through runTask/createTask so
  currentTaskId is available in extension state immediately
- Wait for resumable state after cancel before processing follow-up
  messages to prevent race conditions in stdin-stream
- Add ROO_CODE_DISABLE_TELEMETRY=1 env var to disable cloud telemetry
- Provide valid empty JSON Schema for custom tools without parameters
  to fix strict-mode API validation
- Skip paths outside cwd in RooProtectedController to avoid RangeError
- Silently handle abort during exponential backoff retry countdown
- Enable customTools experiment in extension host

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. bug Something isn't working labels Feb 25, 2026
The ClineProvider.createTask change to call task.start() after
addClineToStack requires the test's TaskStub mock to have this method.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cte cte merged commit 70cbc71 into main Feb 25, 2026
7 checks passed
@cte cte deleted the cte/cli-fixes branch February 25, 2026 07:29
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant