# refactor\(web\): proposed-plan follow-ups and implement-in-new-thread live in their own hooks · PR \#23091 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/23091)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: refactor/split3-send-plan

Target branch: refactor/split3-send-resume

Head commit: 9927f9e40537f202f9d8ca68f1f415a5b123bc86

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/23091)

[Commits](https://git.cafe/pingdotgg/t3code/pull/23091/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/23091/diffs?format=markdown)

## Description

---

Second layer of splitting `useComposerSend`.

The two proposed-plan send paths move to `useProposedPlanSend.ts`:
- `usePlanFollowUpSend` handles refining a plan, or implementing it on this thread. `useComposerSend` calls it from the plan branch of `onSend`.
- `useImplementPlanInNewThread` is called by ChatView directly. It owns the create/delete thread commands and `navigate`, so `useComposerSend` drops those, plus `defaultRuntimeMode` and `onImplementPlanInNewThread`.

| | before | after |
|---|---|---|
| `useComposerSend.ts` lines | 1,823 | 1,553 |
| `useComposerSend` input fields | 78 | 77 |

Render boundaries are unchanged.

Tested in this worktree's dev server (isolated `.t3`, throwaway git repo as the project) with the whole stack applied: plain send from a draft (new thread), send with an image, queued follow-up and Ctrl+Enter steer during a running turn, resume of a stopped run, plan refinement and "Implement in a new thread" (legacy plan mode on), and a two-model start (two threads, two worktrees). All replies arrived and nothing errored. Also ran `apps/web` typecheck, lint on changed files (only the pre-existing `prefer-set-has` warning in `useComposerSend.ts` remains) and the React Compiler coverage test for changed files (0 bailouts).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

