Skip to content

feat(worktree): add waitForSetup option to block agent until setup completes#1152

Open
MinLeeV5 wants to merge 2 commits into
getpaseo:mainfrom
MinLeeV5:feat/wait-for-setup
Open

feat(worktree): add waitForSetup option to block agent until setup completes#1152
MinLeeV5 wants to merge 2 commits into
getpaseo:mainfrom
MinLeeV5:feat/wait-for-setup

Conversation

@MinLeeV5
Copy link
Copy Markdown

Summary

Adds a waitForSetup boolean option to paseo.json's worktree config. When set to true, the agent session will not start until all setup commands have completed successfully.

This solves the issue where agents begin working before dependencies are installed in projects with heavy setup steps (e.g. monorepos with pnpm install).

Usage

{
  "worktree": {
    "setup": "pnpm install",
    "waitForSetup": true
  }
}

Changes

  • paseo-config-schema.ts — Added waitForSetup boolean field to worktree config schema
  • worktree.ts — Added getWorktreeWaitForSetup() helper to read the config value
  • worktree-session.ts — When waitForSetup is true, passes runSetup: true to worktree creation (synchronous) instead of deferring to the async startAfterAgentCreate continuation
  • public-docs/worktrees.md — Documented the new option under "Setup and teardown"

Behavior

waitForSetup Behavior
false (default) Setup runs in background, agent starts immediately (existing behavior)
true Setup runs synchronously during worktree creation, agent starts after completion

Closes #1151

MinLeeV5 and others added 2 commits May 24, 2026 10:15
…mpletes

When `waitForSetup: true` is set in paseo.json, the agent session will
not start until all worktree setup commands have finished. This prevents
agents from attempting to work before dependencies are installed.

Closes getpaseo#1151
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.

feat: Option to block agent session until worktree setup completes

1 participant