Repository navigation
fix(workspaces): start task agents on remote hosts - #13412
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe change forwards agent startup drafts through worktree creation for local and remote runtimes. Worktree creation results now report whether the backend spawned the startup terminal. Activation passes this state to terminal setup, treats backend-created terminals as authoritative, avoids duplicate fallback terminals, skips redundant web-runtime recovery, and preserves deferred issue-command delivery. Tests cover draft forwarding, activation metadata, remote requests, and mirrored terminal handling. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
(cherry picked from commit a3ca887)
Summary
Remote workspaces created from Tasks now start and prefill the requested Codex agent on the owning host instead of opening idle fallback shells.
worktree.create.startupDraftonly to paired runtimes.Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildFocused validation:
git diff --checkpassed.Deterministic Windows reproduction:
AI Review Report
The review traced terminal ownership from Tasks quick-create through
worktree.create, activation, host mirroring, and wake recovery. It identified the missingstartupDrafthandoff and the race between a successful host spawn and renderer fallback creation.The implementation was checked for macOS, Linux, and Windows compatibility. It adds no shortcut, label, path, shell, or Electron platform-specific behavior. It also preserves folder-workspace assumptions, direct SSH behavior, and local worktree startup.
Mixed client/host behavior was reviewed against the remote wire policy. The fix reuses an optional field and an existing optional response receipt; it introduces no opcode or required RPC field.
Security Audit
The forwarded value is the existing task draft already accepted by
worktree.createand is used as agent input, not interpolated into a shell command. No new authentication, secret, dependency, filesystem path, command-execution, or IPC surface is introduced. Runtime ownership checks still determine which host receives the draft.Notes
Compatibility matrix:
The reported
windows 2host is v1.4.177 and is in the fully supported cell.Tradeoff: once a compatible host reports that it spawned the startup terminal, the renderer waits for that terminal to mirror instead of creating a competing fallback. If host tab mirroring itself fails, the user may wait for recovery rather than immediately receiving an unrelated shell.