Skip to content

[Bug]: Run on ignores the destination project's default workspace for unsent drafts #43187

Done

Description

@AppsAtMe

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Connect two T3 Code machines and register a checkout of the same Git repository on both. Make sure both copies are available under the project's Run on picker.
  2. On the source, set the new-thread workspace default to Current checkout. For the destination project, set the default to New worktree and enable starting new worktrees from the remote. Give the destination's local main a commit that its origin/main lacks so the two bases are distinguishable.
  3. Start an unsent draft on the source and enter a prompt. Leave the Workspace picker alone so the draft inherits its initial settings.
  4. In Run on, select the destination and send the prompt.

Expected behavior

The draft picks up the destination project's New worktree default and starts in a new worktree at the destination's origin/main. The launch strategy should be {"type":"worktree","baseRef":"main","startFromOrigin":true}.

Actual behavior

The composer keeps Current checkout. The browser sends orchestration.launchThread over WebSocket to the correct destination project with workspace strategy {"type":"root","branch":"main"}. The first turn runs in the destination project root at its local main commit.

As a control, explicitly selecting Current checkout on the source before changing Run on correctly keeps that choice and runs in the destination project root. That behavior should be preserved. PR #4964 preserves draft workspace choices during a machine switch. PR #37593 covers inherited model selection.

Impact

Major degradation or frequent failure. With this configuration, the first turn can make changes in the destination's main checkout when the project is configured to isolate new work in a worktree.

Version or commit

Reproduced on upstream commit 07276c41971d7b985b1e836c22948674a3ab9971. Source inspection confirmed the carry-over at 8ada2c0f1c8de70baa2755ab2a308728e1b23757.

Environment

Web client in Chromium with two isolated T3 servers on one host over loopback to represent the two machines. Replay provider and a disposable Git fixture. No live model calls.

Verification

The browser scenario captured the destination launch request and checked the completed turn's recorded file read against its working directory and Git HEAD. On the tested upstream commit, the inherited case failed because it launched with root. With a local fix, it launched with worktree at origin/main, and the explicit Current checkout control still ran at the destination's local main. The prompt reached the destination in both cases.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions