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.
Location: Phase 0 of Sisyphus/Hephaestus promptsPurpose: Classify user intent before taking action. Prevents misinterpretation and routes to optimal handler.
Before acting, agents verbalize their intent classification:
> "I detect [research / implementation / investigation / evaluation / fix] intent — [reason]. My approach: [explore → answer / plan → delegate / clarify first / etc.]."
Example:
User: "How does authentication work in this app?"Sisyphus: "I detect research intent — you're asking for understanding, not implementation.My approach: launch explore to find auth files → synthesize findings → explain."[Fires explore agent in background]
Example: Consulting Oracle for architecture advice
call_omo_agent( description="Get architectural advice on state management", subagent_type="oracle", prompt="I need advice on state management architecture. Context: \n- React app with 20+ components\n- Currently using prop drilling\n- Considering Redux vs Context API\n\nWhat do you recommend?")
Background Execution:
// Launch 3 research tasks in parallelcall_omo_agent(description="Explore auth patterns", subagent_type="explore", run_in_background=true, ...)call_omo_agent(description="Research OAuth docs", subagent_type="librarian", run_in_background=true, ...)call_omo_agent(description="Check security best practices", subagent_type="librarian", run_in_background=true, ...)// Poll results laterbackground_output(task_id=1)background_output(task_id=2)background_output(task_id=3)
task( description="Deep refactor of state management", subagent_type="hephaestus", prompt="GOAL: Refactor state management to use Zustand.\n\nExplore current implementation, migrate incrementally, maintain tests.")
This invokes Hephaestus directly (GPT-5.3-codex autonomous mode).
1. Is there a specialized agent that perfectly matches this request? YES → call_omo_agent(subagent_type="...") NO → Continue2. Is there a category that best describes this task? YES → task(category="...", load_skills=[...]) NO → Continue3. Can I do it myself for the best result, FOR SURE? YES → Execute directly NO → Default to task(category="unspecified-low" or "unspecified-high")**Default Bias: DELEGATE. Work yourself only when it's super simple.**
### Task 2: Implement API endpoints**Delegation Recommendation:**- Category: `ultrabrain` - Complex business logic, requires deep reasoning- Skills: [`express-api`, `database-patterns`] - API framework + DB best practices**Skills Evaluation:**- INCLUDED `express-api`: Task uses Express, needs routing/middleware patterns- INCLUDED `database-patterns`: Task involves ORM usage, transaction handling- OMITTED `playwright`: No UI testing in this task
Identify Wave 1: Find all tasks with no dependencies
Parallel Dispatch:
// Fire all Wave 1 tasks in paralleltask(category="ultrabrain", load_skills=["database-patterns"], ...)task(category="visual-engineering", load_skills=["playwright"], ...)
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
// Launch 3 tasks in parallelconst explore_id = call_omo_agent(..., run_in_background=true)const librarian_id = call_omo_agent(..., run_in_background=true)const oracle_id = call_omo_agent(..., run_in_background=true)// Continue other work while they runread("src/auth.ts")grep("OAuth", ".")// Collect resultsconst explore_result = background_output(task_id=explore_id)const librarian_result = background_output(task_id=librarian_id)const oracle_result = background_output(task_id=oracle_id)// Synthesize findings
Sync Example:
// Need immediate architectural guidance before proceedingconst advice = call_omo_agent( subagent_type="oracle", run_in_background=false, // Block until complete prompt="Should I use Redux or Context API?")// Proceed based on adviceif (advice.includes("Redux")) { // Install Redux} else { // Use Context API}
File: src/hooks/ralph-loop/hook.tsPurpose: Prevents agents from stopping mid-task. Yanks them back to work if idle with pending todos.Hook Point: chat.message (continuation detection)Logic:
if (hasPendingTodos && isAgentIdle) { injectContinuationPrompt( "You have pending todos. Continue working until ALL are completed." )}
Named After: Ralph from the novel Infinite Jest - character who never stops working.Disable: Add "ralph-loop" to disabled_hooks if you want agents to stop when they think they’re done.
Pros: Dependency tracking, metadata, parallel wave identificationCons: More verbose, requires explicit task managementRecommendation: Use task system for complex multi-day projects. Stick with todos for simple work.