Repository navigation
feat(claude-code): enable task tools and replay their plan on reopen - #976
Merged
BytePioneer-AI merged 2 commits intoNov 21, 2026
Merged
Conversation
Launch Claude Code with CLAUDE_CODE_ENABLE_TODO_TOOLS=1 unless the user set it, so SDK sessions get TaskCreate/TaskGet/TaskList/TaskUpdate. History replay now feeds root task tool results through the shared task tracker and projects them as Todo plan items, and TaskGet refreshes the read task like TaskList. Desktop restores a plan only from turn/plan/updated, so the Host replays the latest plan when a Thread is reopened. A new optional persistentPlan session capability marks Harnesses whose plan outlives its Turn; Claude Code sets it.
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
… clear, index by Turn ID Side Chat now replays plans only from ownTurns so hidden inherited Turns are not exposed; empty Todo clear notifications fire only when the tool succeeds; historical plans are stored by Turn ID instead of a Turn-object WeakMap so shallow copies keep their plan.
Owner
|
Merged, thanks @ump45nose! Verified against real Claude Code 2.1.328 (Haiku 4.5): parallel |
BytePioneer-AI
added a commit
that referenced
this pull request
Nov 21, 2026
…eview findings Resolve conflicts with main (preserving dfe3d82 trailing background promotion alongside independent autonomous wake Turns, #944 live WAL fork, #996 legacy merged Turn identities, #976 Turn-ID plan replay, and #942 request-level TTFT); validate turn.autonomous.completed strictly in harness-broker; isolate autonomous Turn recording/projection failures from foreground Turns and retry stale history reads; keep wake-observer polling until the window deadline so a notified-but-uncommitted wake is not dropped after publishing an earlier wake.
ump45nose
added a commit
to ump45nose/codex-host
that referenced
this pull request
Nov 27, 2026
Eleven manifest lines still carried fork copies of changes that upstream has already released. Each one names a merged PR whose head commit is an ancestor of v0.28.2, so the line only re-applies the pre-review copy of code that the release tag already contains, and that duplication is what turns the manifest replay into conflicts. Removed lines and their merged PRs: - thin/cursor-fast-selection (BytePioneer-AI#782) - thin/delegation-inspect-fast-models (BytePioneer-AI#986) - thin/delegation-catalog-parent (BytePioneer-AI#970) - thin/settings-hide-desktop-envs (BytePioneer-AI#972) - thin/settle-turns-after-session-fault (BytePioneer-AI#969) - thin/external-thread-turn-recency (BytePioneer-AI#973) - thin/claude-code-todo-tools (BytePioneer-AI#976) - thin/reasoning-summary-parts (BytePioneer-AI#967) - thin/shared-archived-thread-revival (BytePioneer-AI#988) - fix/desktop-mcp-session-reap-v0.22 (BytePioneer-AI#981) - fix/macos-descriptor-mode (BytePioneer-AI#1004) For the two lines whose comments noted that the fork copy predated the PR's review changes (BytePioneer-AI#969, BytePioneer-AI#976), the reviewed upstream version replaces it. Checked with `scripts/vincent-release.sh audit` (ancestor and patch-cherry checks) and by replaying the manifest onto v0.28.2 in a scratch worktree: these eleven lines no longer merge, and the fifteen remaining lines are fork-only changes that need re-cutting from the new tag. Lines for fork-only additions are untouched: the extras documented for BytePioneer-AI#470, BytePioneer-AI#987 and BytePioneer-AI#989 stay, and the lines for the closed PRs BytePioneer-AI#576, BytePioneer-AI#783, BytePioneer-AI#784, BytePioneer-AI#785 and BytePioneer-AI#396 stay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Claude Code's SDK sessions don't get the native task tools, and when a Thread is reopened its plan disappears from Desktop.
CLAUDE_CODE_ENABLE_TODO_TOOLS=1unless the user already set it, so non-interactive sessions getTaskCreate/TaskGet/TaskList/TaskUpdate.CLAUDE_CODE_ENABLE_TASKSstays unset because it hides them again. These already feed the Codex plan panel live through the task tracker.ClaudeTaskTracker, projects them as Todo plan items, and a resumed Session continues the restored task list.TaskGetrefreshes the read task likeTaskList. An explicit empty list clears the plan.turn/plan/updated, never from Thread history. Onthread/resumeandthread/readwith turns, the Host now replays the latest plan: the live plan if a Turn is active, otherwise the last plan in history (historicalPlanUpdatein protocol-core). The plan is kept off the Turn objects sent to clients.persistentPlansays so; Claude Code sets it, and other Harnesses keep plans with the Turn that made them.Related issues
Builds on #917 (MCP tool and web search items), which touched the same history mapping.
Test plan
main:npx tsc -bpassed;node tools/check-boundaries.mjspassed; prettier and eslint clean on the changed files.npx vitest run --config tests/vitest.config.json the Claude Code adapter tests,codex-ui-projector,app-server-host.projection-4and shared-contracts: 912 passed, 3 skipped. New cases cover: the env default and a user override; task tools across Turns in history; a resumed Session continuing the task list; replay on reopen only whenpersistentPlanis set; replaying the active Turn's live plan; clearing from an empty list.npm run lintreports 3 errors inantigravity/test/acp-transport.test.tsandapp-server-host.background-output.test.ts, which this PR doesn't touch; they are on currentmain.persistentPlancapability is new in this PR.