Files
kandev/apps/web/components/task
José Almeida 2b16a53d6d fix: inherit parent workspace for subtasks (UI + MCP) (#1131)
* fix(backend): inherit parent workspace for subtasks on all start paths

Subtasks with workspace_mode inherit_parent were provisioning a fresh
worktree and tasks folder instead of reusing the parent's. Two causes:

- propagateInheritedEnvironment ran only in PrepareTaskSession, so the
  direct start path (startTask, used by MCP auto-start) never bound the
  child session to the parent's TaskEnvironment. Moved it into
  prepareSessionForStart so every launch entry point inherits.
- The service CreateTask path did not inherit the parent's repositories
  when none were supplied (the UI omits them expecting inheritance), so
  the child was repo-less and could not establish/reuse a worktree. Now
  mirrors the MCP path: inherit RepositoryID + BaseBranch, drop
  CheckoutBranch.

* fix(web): hide executor profile for inherit-parent subtasks

When a subtask inherits the parent's materialized workspace, its
executor is inherited too, so picking an executor profile is
meaningless. Hide the selector under inherit_parent and omit
executor_profile_id from the create payload.

* fix(backend): fail fast when subtask parent-repo inheritance lookup errors

Return the error from inheritParentRepositories instead of swallowing it:
a subtask silently created with no repositories would reintroduce the
fresh-worktree bug at launch. Also clarified that inheritance applies to
any repo-less subtask, matching the MCP path.
2026-05-28 23:54:42 +01:00
..
2026-02-24 23:01:41 +00:00
2026-02-24 23:01:41 +00:00