Skip to content

Matrix YAML: support base_branch to branch worktrees off a non-main branch #162

@c-h-

Description

@c-h-

When launching matrix agents for autonomous implementation, we want to branch implementation worktrees off a research branch (e.g. research/ENG-1234) rather than main, so that spec/research artifacts are already present in the worktree.

Currently the matrix YAML supports branch (target branch name) and cwd (working directory), but there is no way to specify what branch to base the new worktree on. The workaround is to manually create worktrees with git worktree add ... origin/research/ENG-1234 before launching.

Proposed: Add base_branch field to matrix YAML entries:

matrix:
  - adapter: opencode
    model: ohm/moonshotai/Kimi-K2.5
    branch: auto/ENG-1234-kimi
    base_branch: research/ENG-1234

This would cause agentctl to create the worktree branched from origin/research/ENG-1234 instead of origin/main.

Context: ENG-8366 retro — spec was on a research branch but implementation agents couldn't access it because their worktrees branched from main.

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