Overview
Oh My OpenCode orchestrates specialized agents like a development team. Instead of one agent doing everything, work flows through a delegation chain based on task type, with automatic intent classification and parallel execution.Orchestration Flow
The Intent Gate
Location: Phase 0 of Sisyphus/Hephaestus prompts Purpose: Classify user intent before taking action. Prevents misinterpretation and routes to optimal handler.Intent Classification Table
Fromsrc/agents/sisyphus.ts:212:
| Surface Form | True Intent | Routing |
|---|---|---|
| ”explain X”, “how does Y work” | Research/understanding | explore/librarian → synthesize → answer |
| ”implement X”, “add Y”, “create Z” | Implementation (explicit) | plan → delegate or execute |
| ”look into X”, “check Y”, “investigate” | Investigation | explore → report findings |
| ”what do you think about X?” | Evaluation | evaluate → propose → wait for confirmation |
| ”I’m seeing error X”, “Y is broken” | Fix needed | diagnose → fix minimally |
| ”refactor”, “improve”, “clean up” | Open-ended change | assess codebase first → propose approach |
Intent Verbalization
Before acting, agents verbalize their intent classification:Request Type Classification
Fromsrc/agents/sisyphus.ts:229:
- Trivial (single file, known location) → Direct tools only
- Explicit (specific file/line, clear command) → Execute directly
- Exploratory (“How does X work?”, “Find Y”) → Fire explore (1-3) + tools in parallel
- Open-ended (“Improve”, “Refactor”, “Add feature”) → Assess codebase first
- Ambiguous (unclear scope) → Ask ONE clarifying question
Ambiguity Check
Must ask when:- Multiple interpretations with 2x+ effort difference
- Missing critical info (file, error, context)
- User’s design seems flawed or suboptimal
- Single valid interpretation
- Multiple interpretations, similar effort (choose reasonable default, note assumption)
Delegation Mechanisms
Two Delegation Tools
| Tool | Purpose | Use Case |
|---|---|---|
call_omo_agent | Invoke specific named agent | Oracle, Librarian, Explore, Hephaestus |
task | Delegate by category OR agent | Category-based routing with skills |
call_omo_agent: Named Agent Invocation
File:src/tools/call-omo-agent/tools.ts
Parameters:
task: Category-Based Delegation
File:src/tools/delegate-task/tools.ts
Parameters:
- Model:
gemini-3.1-pro(visual-engineering default) - Skills: Playwright + Tailwind documentation injected
- Category prompt: Design-first mindset, bold aesthetics
Delegation Decision Tree
Fromsrc/agents/sisyphus.ts:251:
Prometheus Planning Mode
Activation: Press Tab in OpenCode, or@plan "your task"
File: src/agents/prometheus/interview-mode.ts
Interview-Based Planning
Workflow:-
Context Gathering:
-
User Request Summary:
- Concise restatement of requirements
- List of uncertainties and ambiguities
- Clarifying questions
-
Iteration Until Clarity:
- User answers questions
- Prometheus refines understanding
- Loop until 100% clear
-
Plan Generation:
- Task dependency graph
- Parallel execution waves
- Category + skills recommendations
- Actionable TODO list
-
Review Pipeline:
- Metis (gap analyzer): Surfaces missed requirements
- Momus (validator): Reviews plan quality
Plan Output Requirements
Fromsrc/tools/delegate-task/constants.ts:249:
MANDATORY SECTIONS:
1. Task Dependency Graph
2. Parallel Execution Graph
3. Category + Skills Recommendations
4. Actionable TODO List
Atlas Orchestration
Activation: Run/start-work after creating a Prometheus plan
File: src/agents/atlas/agent.ts
Execution Workflow
- Load TODOs: Read task list from session
- Identify Wave 1: Find all tasks with no dependencies
-
Parallel Dispatch:
-
Accumulate Learnings:
- Conventions discovered in Task 1 passed to Task 5
- Mistakes made early aren’t repeated
- System gets smarter as it works
-
Independent Verification:
- Each task has QA criteria
- Atlas verifies completion independently
- Marks task complete only after QA passes
- Wave Progression: Move to Wave 2 after Wave 1 completes
- Final Verification: Run all QA criteria after completion
Model-Specific Prompts
Atlas has optimized prompts per model family:- GPT models (
src/agents/atlas/gpt.ts): Explicit reasoning steps, principle-driven - Gemini models (
src/agents/atlas/gemini.ts): Concrete examples, visual cues - Claude models (
src/agents/atlas/default.ts): Instruction-following, structured output
src/agents/atlas/agent.ts:39):
Background Execution
Manager:src/features/background-agent/manager.ts
Concurrency Limit: 5 concurrent tasks per model/provider
Background Task Flow
Background vs Sync
| Mode | When to Use | Example |
|---|---|---|
Background (run_in_background=true) | Parallel research, non-blocking work | explore + librarian simultaneously |
Sync (run_in_background=false) | Sequential tasks needing immediate result | Oracle consultation before proceeding |
Skill Loading
Manager:src/features/opencode-skill-loader/
Purpose: Inject specialized knowledge into delegated agents
Skill Discovery
Skills loaded from:- Built-in skills (
src/features/builtin-skills/skills/) - OpenCode skills (
~/.config/opencode/skills/) - Project skills (
.opencode/skills/)
Skill Structure
SKILL.md format:Skill Injection
When you delegate withload_skills=["playwright", "tailwind"]:
- Skill content extracted from SKILL.md files
- Injected into system prompt:
- Agent has context for specialized task
- Gemini 3 Pro model (visual-engineering default)
- Playwright skill: Browser automation patterns
- Tailwind skill: Styling conventions
- Category prompt: Design-first mindset
Codebase Assessment
Phase: Phase 1 of Sisyphus/Hephaestus prompts (for open-ended tasks) File:src/agents/sisyphus.ts:275
Quick Assessment
- Check config files (linter, formatter, type config)
- Sample 2-3 similar files for consistency
- Note project age signals (dependencies, patterns)
State Classification
| State | Indicators | Action |
|---|---|---|
| Disciplined | Consistent patterns, configs present, tests exist | Follow existing style strictly |
| Transitional | Mixed patterns, some structure | Ask: “I see X and Y. Which to follow?” |
| Legacy/Chaotic | No consistency, outdated patterns | Propose: “No clear conventions. I suggest X. OK?” |
| Greenfield | New/empty project | Apply modern best practices |
- Different patterns may serve different purposes (intentional)
- Migration might be in progress
- You might be looking at wrong reference files
Ralph Loop: The Discipline Hook
File:src/hooks/ralph-loop/hook.ts
Purpose: Prevents agents from stopping mid-task. Yanks them back to work if idle with pending todos.
Hook Point: chat.message (continuation detection)
Logic:
"ralph-loop" to disabled_hooks if you want agents to stop when they think they’re done.
Todo vs Task System
Configuration:use_task_system (default: false, uses todos)
Todo System (Default)
Tool:TodoWrite
Format: Simple markdown checklist
Task System (Opt-In)
Tools:TaskCreate, TaskUpdate, TaskGet, TaskList
Format: Structured task objects with dependencies
Orchestration Anti-Patterns
Over-Delegation
Problem: Delegating trivial tasks that are faster to do directly Example:Under-Delegation
Problem: Doing complex work yourself when a specialist exists Example:Sync-Only Execution
Problem: Running research tasks sequentially instead of parallel Example:Missing Skills
Problem: Delegating without loading relevant skills Example:Next Steps
Categories
Learn about the 8 task categories and model mapping
Agents
Deep dive into all 11 agents and their capabilities
Configuration
Customize delegation behavior and model assignments
Skills
Browse available skills and create custom ones