| name | orchestrate |
| description | Check Vibe Kanban for open tasks, manage workspace lifecycle, start new workspaces for the next highest-priority task. Run manually or via cron. |
Agent Orchestration
You are an orchestrator. Follow these steps exactly.
Step 1: Load Config
Read ~/.vibe-kanban-orchestrate.json to get:
max_concurrent_workspaces (default: 2)
default_branch (default: "main")
prompt
review (nested object with enabled, executor, variant, prompt)
If the file doesn't exist or is invalid, use these defaults:
- max_concurrent_workspaces: 2
- default_branch: "main"
- prompt: "You are an autonomous coding agent working on a task from the backlog. Read the task description carefully, explore the codebase, implement changes with tests, follow existing conventions, and create a PR when done."
- review:
- enabled: true
- executor: (not set — uses server default)
- variant: (not set — uses server default)
- prompt: "You are a code reviewer. Review the open PR in this workspace. Examine all changes for bugs, code quality issues, missing tests, and deviations from the issue requirements. Fix any issues you find and push your changes."
Step 2: Check Completed Work
- Call
list_workspaces(archived: false) to get all active workspaces.
- For each workspace that has a linked issue:
- Call
get_issue(issue_id) to check the issue state.
- If
pull_requests contains a PR with a merged status and the issue status is "In review", call update_issue(issue_id, status: "Done").
- Report: "Marked as Done (PR merged)".
Step 3: Check for Reviewable Work
- If
review.enabled is false, skip this step.
- Iterate over active workspaces from Step 2.
- For each workspace with a linked issue:
- Call
get_issue(issue_id) to check the issue state.
- If
latest_pr_status shows an open PR and the issue status is "In progress":
- Call
create_session(workspace_id) — pass executor and/or variant from review config only if set.
- Call
run_session_prompt(session_id, <review.prompt>).
- Call
update_issue(issue_id, status: "In review").
- Report: "Started review for : "
Step 4: Check Workspace Health
Review each non-archived workspace from Step 2:
- Check workspace
updated_at — if it hasn't been updated in over 2 hours, flag it as potentially stuck.
- Check linked issue's
latest_pr_status — if the PR was closed (not merged), flag the workspace as failed.
- Report any stuck or failed workspaces so the user is aware. Do NOT automatically take action on these — just report them.
Step 5: Check Concurrency
- Count non-archived workspaces (from Step 2 results), excluding any whose linked issue status is "In review".
- If count >=
max_concurrent_workspaces from config:
- Report: "Max concurrency reached (/). Not picking up new work."
- Skip to Step 10 (Report).
Step 6: Gather Eligible Work
- Call
list_organizations to get all orgs.
- For each org, call
list_projects(organization_id).
- For each project, call
list_issues(project_id, status: "To do").
- Collect all "To do" issues, keeping track of which project each belongs to.
Step 7: Filter by Dependencies
For each candidate issue:
- Call
get_issue(issue_id) to get full details including relationships and sub_issues.
- Check
relationships — if any relationship has relationship_type: "blocking" where the blocking issue's status is NOT "Done", skip this issue.
- Issues with no blocking dependencies are eligible.
Sort eligible issues:
- By priority: urgent (1) > high (2) > medium (3) > low (4) > null (5)
- Within same priority: by
created_at ascending (oldest first)
If no eligible issues exist, report "No eligible work found" and skip to Step 10.
Step 8: Match Repo
- Call
list_repos to get all available repos.
- Take the selected issue's project name and find a repo with a matching name (case-insensitive).
- If no match: skip this issue, try the next eligible issue. If all exhausted, report "No repo match found for any eligible issue" and skip to Step 10.
Step 9: Start Workspace
- Determine the prompt: use
prompt from config.
- Determine the branch: use
default_branch from config.
- Call
start_workspace with:
name: The issue title
executor: "CLAUDE_CODE"
repositories: [{ repo_id: <matched_repo_id>, branch: <branch> }]
issue_id: The issue's ID
prompt: <prompt>\n\nTask:\n<issue title>\n<issue description>
- Call
update_issue(issue_id, status: "In progress").
- Report: "Started workspace for : (repo: , branch: )"
Step 10: Report Summary
Output a summary with these sections:
## Orchestration Report
### Completed
- <issues marked as Done, or "None">
### Reviews
- <reviews started, or "None">
### Health Warnings
- <stuck or failed workspaces, or "None">
### Started
- <new workspace started, or "No new work picked up">
### Skipped
- <issues skipped with reasons, or "None">
### Status
- Active workspaces: <count>/<max>