Skip to content

Reapply Batch 1: 22 clean non-AI-SDK cherry-picks#11473

Merged
hannesrudolph merged 23 commits intomainfrom
reapply/batch-1-clean-cherry-picks
Feb 14, 2026
Merged

Reapply Batch 1: 22 clean non-AI-SDK cherry-picks#11473
hannesrudolph merged 23 commits intomainfrom
reapply/batch-1-clean-cherry-picks

Conversation

@hannesrudolph
Copy link
Collaborator

Reapply Batch 1 — Clean Cherry-Picks

Step 1 of the reapplication plan from docs/reapplication-plan.md

Context

PR #11462 reverted the codebase to pre-AI-SDK state (Jan 29, 2026). PR #11463 reapplied 21 non-AI-SDK commits. This PR reapplies 22 additional non-AI-SDK PRs that were verified to cherry-pick cleanly with zero conflicts.

What This Adds (22 commits + 1 fix)

Bug Fixes (10 commits)

Features (6 commits)

Refactors & Chores (6 commits)

Fix (1 commit)

  • 93806b7048 fix: add maxReadFileLine to ExtensionState type for webview compatibility

Verification

✅ 5,359 backend tests passed
✅ 1,229 webview-ui tests passed
✅ TypeScript check passed (all packages)
✅ Lint passed

Related

  • Part 1 of 5-batch reapplication plan
  • See docs/reapplication-plan.md for full plan
  • Follow-up: Batch 2 (13 PRs with minor conflicts)

roomote bot and others added 23 commits February 14, 2026 12:57
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
…gemini-embedding-001 (#11038)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
…11131)

Tool IDs from providers like Gemini/OpenRouter contain special characters
(e.g., 'functions.read_file:0') that are sanitized when saving tool_use
blocks to API history. However, tool_result blocks were using the original
unsanitized IDs, causing ToolResultIdMismatchError.

This fix ensures tool_result blocks use sanitizeToolUseId() to match the
sanitized tool_use IDs in conversation history.

Fixes EXT-711
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
…changes (#11205)

When using slash commands with `mode:` frontmatter (e.g., `/cli-release`
with `mode: code`), the CLI would fail with "Could not resolve
authentication method" from the Anthropic SDK, even when using a
non-Anthropic provider like `--provider roo`.

Root cause: In `markWebviewReady()`, the `webviewDidLaunch` message was
sent before `updateSettings`, creating a race condition. The
`webviewDidLaunch` handler's "first-time init" sync would read
`getState()` before CLI-provided settings were applied to the context
proxy. Since `getState()` defaults `apiProvider` to "anthropic" when
unset, this default was saved to the provider profile. When a slash
command triggered `handleModeSwitch()`, it found this corrupted profile
with `apiProvider: "anthropic"` (but no API key) and activated it,
overwriting the CLI's working roo provider configuration.

Fix:
1. Reorder `markWebviewReady()` to send `updateSettings` before
   `webviewDidLaunch`, ensuring the context proxy has CLI-provided
   values when the initialization handler runs.
2. Guard the first-time init sync with `checkExistKey(apiConfiguration)`
   to prevent saving a profile with only the default "anthropic"
   fallback and no actual API keys configured.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Remove the toolFormat constant and <tool_format> line from environment
details output. Native tool calling is now the only supported protocol,
making this code unnecessary.

Fixes #11206

Co-authored-by: Roo Code <roomote@roocode.com>
…ls (#11215)

* feat: extract translation and merge resolver modes into reusable skills

- Add roo-translation skill with comprehensive i18n guidelines
- Add roo-conflict-resolution skill for intelligent merge conflict resolution
- Add /roo-translate slash command as shortcut for translation skill
- Add /roo-resolve-conflicts slash command as shortcut for conflict resolution skill

The existing translate and merge-resolver modes are preserved. These new skills
and commands provide reusable access to the same functionality.

Closes CLO-722

* feat: add guidances directory with translator guidance file

- Add .roo/guidances/roo-translator.md for brand voice, tone, and word choice guidance
- Update roo-translation skill to reference the guidance file

The guidance file serves as a placeholder for translation style guidelines
that will be interpolated at runtime.

* fix: rename guidances directory to guidance (singular)

* fix: remove language-specific section from translator guidance

The guidance file should focus on brand voice, tone, and word choice only.

* fix: remove language-specific guidelines section from skill file

* Update .roo/skills/roo-translation/SKILL.md

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
* feat: add Claude Opus 4.6 support across all providers

Add Claude Opus 4.6 (claude-opus-4-6) model definitions and 1M context
support across Anthropic, Bedrock, Vertex AI, OpenRouter, and Vercel AI
Gateway providers.

- Anthropic: 128K max output, /5 pricing, 1M context tiers
- Bedrock: anthropic.claude-opus-4-6-v1:0 with 1M context + global inference
- Vertex: claude-opus-4-6 with 1M context tiers
- OpenRouter: prompt caching + reasoning budget sets
- Vercel AI Gateway: Opus 4.5 and 4.6 added to capability sets
- UI: 1M context checkbox for Opus 4.6 on all providers
- i18n: Updated 1M context descriptions across 18 locales

Also adds Opus 4.5 to Vercel AI Gateway (previously missing) and
OpenRouter maxTokens overrides for Opus 4.5/4.6.

Closes #11223

* fix: apply tier pricing when 1M context is enabled on Bedrock

When awsBedrock1MContext is enabled for tiered models like Opus 4.6,
also apply the 1M tier pricing (inputPrice, outputPrice, cache prices)
instead of only updating contextWindow. This ensures cost calculations
and UI display use the correct >200K rates.
feat: add gpt-5.3-codex model and make it default for OpenAI Codex provider

Co-authored-by: Roo Code <roomote@roocode.com>
… parent tasks (#11302)

* fix: make removeClineFromStack() delegation-aware to prevent orphaned parent tasks

When a delegated child task is removed via removeClineFromStack() (e.g., Clear
Task, navigate to history, start new task), the parent task was left orphaned
in "delegated" status with a stale awaitingChildId. This made the parent
unresumable without manual history repair.

This fix captures parentTaskId and childTaskId before abort/dispose, then
repairs the parent metadata (status -> active, clear awaitingChildId) when
the popped task is a delegated child and awaitingChildId matches.

Parent lookup + updateTaskHistory are wrapped in try/catch so failures are
non-fatal (logged but do not block the pop).

Closes #11301

* fix: add skipDelegationRepair opt-out to removeClineFromStack() for nested delegation

---------

Co-authored-by: Roo Code <roomote@roocode.com>
…e idempotent (#11313)

* fix(reliability): prevent webview postMessage crashes and make dispose idempotent

Closes: #11311

1. postMessageToWebview() now catches rejections from
   webview.postMessage() so that messages sent after the webview is
   disposed do not surface as unhandled promise rejections.

2. dispose() is guarded by a _disposed flag so that repeated calls
   (e.g. during rapid extension deactivation) are no-ops.

3. CloudService mock in ClineProvider.spec.ts updated to include
   off() — a pre-existing gap exposed by the new dispose test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add early _disposed check in postMessageToWebview

Skip the postMessage call entirely when the provider is already disposed,
avoiding unnecessary try/catch execution. Added test coverage for this path.

* chore: trigger CI

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
…task history (#11331)

* fix: resolve race condition in new_task delegation that loses parent task history

When delegateParentAndOpenChild creates a child task via createTask(), the
Task constructor fires startTask() as a fire-and-forget async call. The child
immediately begins its task loop and eventually calls saveClineMessages() →
updateTaskHistory(), which reads globalState, modifies it, and writes back.

Meanwhile, delegateParentAndOpenChild persists the parent's delegation
metadata (status: 'delegated', delegatedToId, awaitingChildId, childIds) via
a separate updateTaskHistory() call AFTER createTask() returns.

These two concurrent read-modify-write operations on globalState race: the
last writer wins, overwriting the other's changes. When the child's write
lands last, the parent's delegation fields are lost, making the parent task
unresumable when the child finishes.

Fix: create the child task with startTask: false, persist the parent's
delegation metadata first, then manually call child.start(). This ensures
the parent metadata is safely in globalState before the child begins writing.

* docs: clarify Task.start() only handles new tasks, not history resume
… race (#11335)

Add a promise-chain mutex (withTaskHistoryLock) to serialize all
read-modify-write operations on taskHistory, preventing concurrent
interleaving from silently dropping entries.

Reorder reopenParentFromDelegation to close the child instance
before marking it completed, so the abort path's stale 'active'
status write no longer overwrites the 'completed' state.

Covered by new tests: RPD-04/05/06, UTH-02/04, and a full mutex
concurrency suite.
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 14, 2026
@roomote
Copy link
Contributor

roomote bot commented Feb 14, 2026

Rooviewer Clock   See task

Reviewed all 22 cherry-picked commits + 1 fix. No issues found. The changes are well-structured, type-consistent, and thoroughly tested (5,359 backend + 1,229 webview-ui tests passing).

  • No bugs or contract violations identified
  • Delegation race condition fixes correctly ordered
  • Task history write serialization is sound
  • Legacy read_file backward compatibility is well-handled
  • All type contracts consistent across packages

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 14, 2026
@hannesrudolph hannesrudolph merged commit b2b7780 into main Feb 14, 2026
18 checks passed
@hannesrudolph hannesrudolph deleted the reapply/batch-1-clean-cherry-picks branch February 14, 2026 20:47
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants