Help us improve
Share bugs, ideas, or general feedback.
From codegen-bridge
Use when batch-delegating multiple independent tasks to Codegen cloud agents in a single call. Uses codegen_bulk_create_runs for parallel execution. Best for plans where tasks have no inter-dependencies.
npx claudepluginhub evgenygurin/codegen-bridge --plugin codegen-bridgeHow this skill is triggered — by the user, by Claude, or both
Slash command
/codegen-bridge:bulk-delegationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Delegate multiple independent tasks to Codegen agents simultaneously using `codegen_bulk_create_runs`. Instead of creating runs one at a time, submit an entire batch and monitor them in parallel.
Decomposes large changes, migrations, or multi-issue fixes into parallel work packages executed via independent subagents with quality gates to prevent conflicts.
Decomposes large-scale changes like migrations, refactors, and codemods into 5-30 independent units, spawns parallel agents in isolated git worktrees, runs tests, and opens PRs for 10+ files.
Orchestrates multi-agent workflows in Claude Code: research swarms, parallel builds, sequential pipelines, and codebase audits.
Share bugs, ideas, or general feedback.
Delegate multiple independent tasks to Codegen agents simultaneously using codegen_bulk_create_runs. Instead of creating runs one at a time, submit an entire batch and monitor them in parallel.
Core principle: Independent tasks run faster in parallel. Dependent tasks must stay sequential.
Announce at start: "I'm using the bulk-delegation skill to launch multiple agent runs in parallel."
| Scenario | Use Bulk? | Reason |
|---|---|---|
| 5 independent feature tasks | Yes | No dependencies, all can run at once |
| Multi-step refactor (A depends on B) | No | Sequential dependencies |
| Same change across 3 repos | Yes | Identical tasks, different repos |
| Test suite for 4 modules | Yes | Each module is independent |
| Feature + its tests | No | Tests depend on feature code |
Rule of thumb: If reversing the task order would produce the same result, use bulk delegation.
CODEGEN_API_KEY and CODEGEN_ORG_ID environment variables setcodegen_bulk_create_runs tool availablecodegen_check_integration_health to verify platform health before batchReview the plan and classify each task:
Group independent tasks into a batch. Dependent tasks must run sequentially after their prerequisites complete.
Example plan with 5 tasks:
Task 1: Add user model [independent]
Task 2: Add product model [independent]
Task 3: Add order model [depends on 1, 2]
Task 4: Add user API endpoints [depends on 1]
Task 5: Add product API tests [depends on 2]
Batches:
codegen_check_integration_health to verify platform connectivitycodegen_list_repos to confirm repository accesscodegen_start_execution(mode="plan", plan_tasks=[...])For each task in the batch, compose a self-contained prompt:
## Context
- Repository: <name>
- Tech stack: <languages, frameworks>
- This task is part of a batch — other tasks run in parallel
## Your Task
<Full task description — all steps verbatim from the plan>
## Constraints
- Create a branch from main
- Run tests after changes
- Use conventional commit messages
- Create a PR when done
- Do NOT modify files outside your task scope
Each prompt must be fully self-contained — agents in a batch cannot see each other's work.
codegen_bulk_create_runs(
tasks=[
{
prompt: <task_1_prompt>,
execution_id: <ctx_id>,
repo_id: <detected_or_explicit>
},
{
prompt: <task_2_prompt>,
execution_id: <ctx_id>,
repo_id: <detected_or_explicit>
}
],
agent_type="claude_code"
)
The response returns all run IDs at once. Report to user:
Use codegen_monitor_run_background for each run, or poll manually:
Background monitoring (preferred):
# For each run_id from the batch
codegen_monitor_run_background(run_id=<id>, execution_id=<ctx_id>)
You will be notified as each run reaches a terminal state.
Manual polling (fallback):
# Poll all runs in a round-robin fashion
for each run_id:
codegen_get_run(run_id=<id>, execution_id=<ctx_id>)
sleep 30
Report progress as runs complete:
Batch progress: 2/5 runs completed
Run #101: Add user model [completed] PR #40
Run #102: Add product model [completed] PR #41
Run #103: Add order service [running]
Run #104: Add user endpoints [running]
Run #105: Add product tests [queued]
If a run in the batch fails:
codegen_stop_run for each still-running runAfter all runs complete, use codegen_get_run_analytics for aggregate metrics:
| Aspect | Recommendation |
|---|---|
| Batch size | 3-8 tasks per batch (API and sandbox limits) |
| Prompt size | Keep under 4000 chars per task |
| Timeout | 10 minutes per run; escalate to user after |
| Concurrency | Codegen manages sandbox allocation automatically |
| Error | Action |
|---|---|
| Partial batch failure (some created, some failed) | Report which succeeded; retry failed ones individually |
| HTTP 429 (rate limit) | Wait 60 seconds, retry the batch |
| HTTP 402 (billing limit) | Stop immediately, report to user |
| All runs fail with same error | Likely a systemic issue — check integration health |
codegen_get_run_analytics after completion for batch performance summary