Skip to content

feature: Allow model and harness selection before submitting implementation in a new thread#1877

Open
thehorse2000 wants to merge 1 commit intopingdotgg:mainfrom
thehorse2000:feat/implement-in-new-thread-allow-model-selection
Open

feature: Allow model and harness selection before submitting implementation in a new thread#1877
thehorse2000 wants to merge 1 commit intopingdotgg:mainfrom
thehorse2000:feat/implement-in-new-thread-allow-model-selection

Conversation

@thehorse2000
Copy link
Copy Markdown

@thehorse2000 thehorse2000 commented Apr 10, 2026

What Changed

onImplementPlanInNewThread in ChatView.tsx now navigates to a new draft thread with the implementation prompt pre-filled in the composer, instead of immediately creating a server thread and auto-submitting.

A single new store hook extraction (applyStickyState) was added alongside the existing composer draft hooks.

Why

Previously, "Implement in a new thread" locked the user into whatever model and harness were active on the plan thread — there was no opportunity to change them before the implementation run started.

Plan generation and implementation often benefit from different models or access modes (e.g. plan with a reasoning model under Supervised, implement with a faster model under Full access).

Using the existing draft-thread flow solves this cleanly: the draft composer already exposes the model picker and harness selector, so no new UI is needed. The implementation prompt is pre-filled so the user can review it, adjust settings, and submit when ready.

UI Changes

Before: Clicking "Implement in a new thread" immediately starts the implementation run in a new thread — the user arrives mid-execution with no chance to change the model or harness.

After: Clicking "Implement in a new thread" opens a new draft thread with the implementation prompt pre-filled in the composer. The user can change the model, harness
(Supervised / Auto-accept / Full access), or edit the prompt before manually submitting.

Monosnap.screencast.2026-04-10.11-25-14.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included a video for animation/interaction changes

Note

Medium Risk
Changes the “Implement in a new thread” flow from immediate server thread creation/dispatch to creating a local draft and navigating, which may affect users’ expectations and any downstream logic that assumed an implementation turn starts automatically.

Overview
Updates ChatView so “Implement in a new thread” now creates a new draft thread, pre-fills the implementation prompt, applies sticky composer settings (e.g. model/provider), and navigates to /draft/$draftId instead of creating a server thread and auto-submitting the first turn.

This removes the orchestration thread.create/thread.turn.start dispatch (and related error/cleanup handling) from that action, letting users adjust model/runtime/interaction settings before manually sending.

Reviewed by Cursor Bugbot for commit ef214d1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Navigate to a draft thread on 'implement plan in new thread' to allow model and harness selection

  • Previously, onImplementPlanInNewThread in ChatView.tsx immediately created a server thread and started a turn via orchestration APIs.
  • Now it creates a local draft thread, applies composer sticky state, sets the implementation prompt, and navigates to the draft route — letting the user choose a model and harness before submitting.
  • Behavioral Change: The action no longer triggers server-side thread creation or turn execution; instead it redirects to a draft view with the prompt pre-filled.

Macroscope summarized ef214d1.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 62a495e2-8707-4475-95c2-f467169b4df4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Apr 10, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ef214d1. Configure here.

await navigate({
to: "/draft/$draftId",
params: buildDraftThreadRouteParams(nextDraftId),
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation thread loses plan source linkage

High Severity

The old onImplementPlanInNewThread explicitly sent sourceProposedPlan: { threadId, planId } in the thread.turn.start command, linking the implementation thread to its originating plan. The new flow navigates to a draft thread, where upon submission the regular onSend path runs — but that path's thread.turn.start (around the bootstrap flow) never includes sourceProposedPlan. The onSubmitPlanFollowUp path does include it, but only fires on same-thread plan follow-ups where activeProposedPlan is non-null. On the draft thread, activeProposedPlan is always null since the draft has no proposed plans. This breaks server-side plan-to-implementation tracking and client-side features like the plan sidebar step display.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ef214d1. Configure here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good point but will increase PR scope, let me know if must be done in this scope.

interactionMode: DEFAULT_INTERACTION_MODE,
});
applyComposerDraftStickyState(nextDraftId);
setComposerDraftPrompt(nextDraftId, implementationPrompt);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing project draft silently discarded on implement

Medium Severity

onImplementPlanInNewThread always creates a fresh nextDraftId and calls setLogicalProjectDraftThreadId without first checking whether a draft already exists for the logical project. setLogicalProjectDraftThreadId replaces the logical-project-to-draft mapping and deletes the previous draft's thread state and composer content if it's no longer referenced. If the user had an in-progress draft with unsaved content for the same project, that content is silently destroyed. The existing openOrReuseProjectDraftThread and useHandleNewThread both check for and reuse existing drafts to avoid this.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ef214d1. Configure here.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 10, 2026

Approvability

Verdict: Needs human review

This PR introduces a feature change to implementation thread creation workflow with significant runtime behavior modifications. Two unresolved review comments identify substantive bugs: loss of plan source linkage (high severity) and silent draft data loss (medium severity). These issues need to be addressed before merging.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant