Roo-Code/packages
Hannes Rudolph b7857bcd6a
fix: harden delegation lifecycle against race conditions with per-task metadata, mutual-exclusion guards, and multi-layer failure recovery (#11379)
* fix: race conditions in subtask delegation system

Comprehensive fix for race conditions and error handling gaps in the subtask
delegation system. Addresses multiple failure modes that could leave parent
tasks permanently stuck in 'delegated' status, causing nested subtasks to hang.

Key fixes:
- Remove initialStatus from taskMetadata rebuild (eliminates status overwrites)
- Persist delegation metadata to per-task files (resolves globalState eviction)
- Add delegationInProgress mutex guard (prevents concurrent delegation ops)
- TOCTOU race fixes with fresh re-reads before writes
- Abort-aware pWaitFor predicate (prevents false 60s timeout on user input)
- Remove silent .catch(() => {}) — all errors now logged unless task is aborting
- Single-attempt delegation with parent repair on failure (no retry band-aids)
- Cancel debouncedEmitTokenUsage in dispose() (prevents zombie callbacks)
- new_task isolation truncation for parallel tool calls

* fix: write all 6 delegation fields in every saveDelegationMeta call site

* fix: align delegation tests with single-attempt implementation (no retry)
2026-02-12 13:06:25 -05:00
..
build Custom tool calling (#10083) 2025-12-21 12:43:06 -08:00
cloud refactor(read_file): Codex-inspired read_file refactor EXT-617 (#10981) 2026-01-29 15:16:32 -07:00
config-eslint Upgrade to ESLint 9 + share eslint config across workspaces (#3815) 2025-05-21 21:30:21 -07:00
config-typescript Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
core feat: rename search_and_replace tool to edit and unify edit-family UI (#11296) 2026-02-10 17:32:35 -07:00
evals refactor: remove browser use functionality entirely (#11392) 2026-02-11 18:11:21 -07:00
ipc Better IPC error logging (#9727) 2025-12-01 15:02:34 -08:00
telemetry fix(condense): remove custom condensing model option (#10901) 2026-01-22 20:06:04 -05:00
types fix: harden delegation lifecycle against race conditions with per-task metadata, mutual-exclusion guards, and multi-layer failure recovery (#11379) 2026-02-12 13:06:25 -05:00
vscode-shim Some cleanup in ExtensionHost (#10600) 2026-01-10 02:29:33 -08:00