Skip to content

fix(workflow): reuse source worktree for contextual launches#301

Merged
jcanizalez merged 2 commits intomainfrom
fix/contextual-workflow-worktree-cwd
May 8, 2026
Merged

fix(workflow): reuse source worktree for contextual launches#301
jcanizalez merged 2 commits intomainfrom
fix/contextual-workflow-worktree-cwd

Conversation

@jcanizalez
Copy link
Copy Markdown
Collaborator

Summary

  • Contextual workflows launched from a worktree-backed card resolved useWorktree=true via 'fromContext' but never set existingWorktreePath, so createTerminal/createHeadlessSession spawned a fresh worktree off the project root and the agent ran in the wrong cwd.
  • Adds a fromContext branch in executeNode that resolves the source/task worktreePath and passes it as existingWorktreePath. The existing inheritedWorktree flag keeps cleanup from deleting the reused worktree.
  • Also rolls in the GitHub org rename from jcanizalez/vorn to vorn-run/vorn across README, install scripts, electron-builder config, MCP package metadata, and the website.

Test plan

  • Right-click a worktree-backed card and trigger a contextual workflow whose launch step uses useWorktree: 'fromContext'; confirm the new agent lands in the same worktree path as the source.
  • Run a contextual workflow from a non-worktree card; confirm it still launches at the project root.
  • After the run completes, verify the inherited worktree is not deleted by the cleanup pass.

jcanizalez added 2 commits May 7, 2026 18:13
Contextual workflows launched from a worktree-backed card resolved
useWorktree=true via 'fromContext' but never set existingWorktreePath,
so createTerminal/createHeadlessSession spawned a fresh worktree off
the project root and the agent ran in the wrong cwd. Add a fromContext
branch that resolves the source/task worktreePath and passes it as
existingWorktreePath; the existing inheritedWorktree flag keeps cleanup
from deleting the reused worktree.
Copilot AI review requested due to automatic review settings May 8, 2026 00:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes contextual workflow launches so that useWorktree: 'fromContext' correctly reuses the source/task’s existing worktree (via existingWorktreePath), preventing agents from starting in an unintended fresh worktree/cwd. Also updates repository references to reflect the GitHub org rename to vorn-run/vorn.

Changes:

  • Reuse the contextual source/task worktreePath when launching an agent with useWorktree: 'fromContext' by passing it as existingWorktreePath.
  • Update README/website/install scripts/electron-builder/MCP metadata to the new vorn-run/vorn repository coordinates.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/index.html Updates GitHub/release/install URLs and client-side repo constant to vorn-run/vorn.
src/renderer/lib/workflow-execution.ts Adds fromContext worktree resolution to pass existingWorktreePath for contextual launches.
README.md Updates badges and install/release links to vorn-run/vorn.
packages/mcp/package.json Updates repository URL to vorn-run/vorn.
install.sh Updates default repo slug to vorn-run/vorn.
install.ps1 Updates default repo slug to vorn-run/vorn.
electron-builder.yml Updates GitHub publish owner to vorn-run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jcanizalez jcanizalez merged commit fd4435b into main May 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants