-
Notifications
You must be signed in to change notification settings - Fork 0
feat(omo): task-first subagents (batch barrier) + memo anchor + ULW toggle (hide legacy delegate_task) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Previously, the installer always wrote 'oh-my-opencode' without a version, causing users who installed beta versions (e.g., bunx oh-my-opencode@beta) to unexpectedly load the stable version on next OpenCode startup. Now the installer queries npm dist-tags and writes: - @latest when current version matches the latest tag - @beta when current version matches the beta tag - @<version> when no tag matches (pins to specific version) This ensures: - bunx oh-my-opencode install → @latest (tracks stable) - bunx oh-my-opencode@beta install → @beta (tracks beta tag) - bunx [email protected] install → @3.0.0-beta.2 (pinned)
Helps non-Opus models recover from sisyphus_task call failures: - Detects common errors (missing params, mutual exclusion, unknown values) - Injects retry guidance with correct parameter format - Extracts available options from error messages - Disableable via config: disabledHooks: ['sisyphus-task-retry']
Added prerequisite information about Bun installation.
Add prerequisite note for Bun installation in README.
OpenCode now natively supports OpenAI authentication, so we no longer need to: - Add opencode-openai-codex-auth plugin - Configure CODEX_PROVIDER_CONFIG provider settings The --chatgpt flag still controls Oracle agent model selection (GPT-5.2 vs fallback).
…ions, lsp_code_action_resolve - merge lsp_document_symbols + lsp_workspace_symbols into lsp_symbols with scope parameter - update all references in hooks, templates, and documentation
Previously, background task completion notifications passed parentModel when defined, causing OpenCode to use default Sonnet model when parentModel was undefined. Now model field is always omitted, letting OpenCode use the session's existing lastModel (like todo-continuation hook). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <[email protected]>
- Reset startedAt on resume to prevent immediate false completion - Release concurrency immediately on completion with double-release guard - Clean up pendingByParent on session.deleted to prevent stale entries
- Add pendingByParent cleanup to ALL completion paths (session.idle, polling, stability) - Add null guard for task.parentSessionID before Map access - Add consistency guard in prune function (set concurrencyKey = undefined) - Remove redundant setTimeout release (already released at completion)
- Add pendingByParent cleanup in pruneStaleTasksAndNotifications - Add double-release guard in launch error handler (L170) - Add concurrency release in resume error handler (L326)
Extract duplicated 8-line pendingByParent cleanup pattern into a reusable helper method. Reduces code duplication across 5 call sites. Addresses cubic-dev-ai feedback on PR code-yeongyu#736.
- Add prominent notice about Anthropic's third-party OAuth restriction - Include disclaimer about oauth spoofing tools in community - Clarify project has no custom oauth implementations - Update version reference to 3.0.0-beta.6 - Add GitHub Copilot section to table of contents
Instead of using stale parentModel/parentAgent from task state, now dynamically looks up the current message to get fresh model/agent values. Applied across all prompt injection points: - background-agent notifyParentSession - ralph-loop continuation - sisyphus-orchestrator boulder continuation - sisyphus-task resume 🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) assistance
- Add Q&A format TL;DR section for clarity - Restructure existing OAuth notice with '詳細'/'详细说明' headers - Remove unrelated librarian model notice
- Add Q&A format TL;DR section for clarity - Restructure existing OAuth notice with FULL header
- Combine and simplify Q&A about Claude subscription usage - Remove separate OAuth implementation question - Clarify: technically possible but not recommended
- frontend-ui-ux-engineer, document-writer, multimodal-looker, explore now use Copilot models when no native providers available - Category overrides (visual-engineering, artistry, writing) also use Copilot models as fallback - Priority: native providers (Gemini/Claude) > Copilot > free models - Login guide moved to bottom with GitHub Copilot auth option added 🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) assistance
…ndling - Add word boundary to ulw/ultrawork regex to prevent false matches on substrings like 'StatefulWidget' (fixes code-yeongyu#779) - Handle object type in parseArguments to prevent [object Object] JSON parse error (fixes code-yeongyu#747) - Add test cases for word boundary behavior
Add Kotlin LSP server (kotlin-ls) to the built-in servers catalog, syncing with OpenCode's server.ts. Includes: - BUILTIN_SERVERS entry with kotlin-lsp command - LSP_INSTALL_HINTS entry pointing to GitHub repo - Extensions: .kt, .kts (already in EXT_TO_LANG) Co-authored-by: justsisyphus <[email protected]>
…ion-requirement Update README with Bun installation requirement
…y-and-skill-mcp-args fix: ulw keyword word boundary and skill_mcp parseArguments object handling
- Create docs/features.md with full Features documentation - Update README.md with compact summary and link to docs - Update README.ja.md with localized compact summary - Update README.zh-cn.md with localized compact summary - Remove 831 lines of duplicated content across READMEs
- Add GitHub Copilot subscription question to Step 0 - Add --copilot flag to CLI examples - Change 'WE ALL COVER THEM' to 'OPENCODE COVERS THEM ALL' - Add 'For Humans' section with bunx/npx commands to Japanese README
… ultrawork prompt
…till running - Add session.status re-check in stability detection before completing - Reset stablePolls if session is not idle (agent still working) - Fix statusText to show CANCELLED instead of COMPLETED for non-completed tasks
|
Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA). To sign the CLA, please comment on this PR with: This is a one-time requirement. Once signed, all your future contributions will be automatically accepted. I have read the CLA Document and I hereby sign the CLA 12 out of 14 committers have signed the CLA. |
|
I have read the CLA Document and I hereby sign the CLA |
- Fix overview page links: ./guide/overview.md → docs/guide/overview.md (all READMEs) - Remove broken Korean link from Japanese README (README.ko.md doesn't exist)
…coded-model-defaults fix: remove hardcoded model defaults from categories and agents
65b0385 to
c9885f6
Compare
Title
feat(omo): task-first subagents (batch barrier) + memo anchor + ULW toggle (hide legacy delegate_task)
Summary (what this PR does)
This PR reworks OmO’s sub-agent behavior to align with OpenCode’s native Task semantics, while making the experience more stable, more inspectable in the TUI, and cheaper in tokens:
taskfor sub-agents so the TUI can show real, openable child sessions (the “Momus/Metis style” UX).batch(task...)as a barrier for parallel research: spawn N tasks in parallel, then wait for all results before the parent continues.call_omo_agent=false, and spawning tools are denied.delegate_taskimplementation for compatibility, but removes it from prompts and denies it by default, so the model naturally stops using it..sisyphus/memo.md, built to survive repeated compactions.ulwin chat” with a global ULW toggle (/omo ulw on|off|toggle) + cleaner injection.User-facing highlights (why you’ll feel the difference)
These are the same changes as above, phrased for day-to-day use:
.sisyphus/memo.mdto re-anchor the mission).task(session_id=...)), and that sub-agent retains its own context window.ulw: ULW becomes a proper toggle and default, not a keyword ritual.Motivation / problem statement
OmO previously relied heavily on a custom background/delegate pattern to run sub-agents “in the background”.
In complex tasks, this led to:
OpenCode already has a strong native pattern (Momus/Metis) based on
task:blocking semantics + visible sub-sessions. This PR generalizes that pattern for OmO.
In other words: this PR is not just “a different orchestration API”—it’s a stability + UX + cost fix. The parent agent now waits for complete sub-results (especially in parallel research), so it doesn’t thrash, and you can open each child session to see what it did.
Key design changes
1) Task-first orchestration (native UI + blocking semantics)
Main orchestrators (see “Agent responsibilities”) are instructed to use:
taskfor a single sub-agentbatch(tool_calls=[{tool:"task",...}, ...])for parallel researchBecause the tool is OpenCode-native, users get:
This directly addresses the “big tasks get messy” failure mode: the parent no longer advances on incomplete evidence, which also reduces rework and token waste.
2) Batch as a barrier (parallel, deterministic aggregation)
We treat
batchas a concurrency primitive for Task calls:batchis allowed only fortasktool calls (max 10 entries).Practically: you can kick off 3–10 research sub-agents in parallel, and the parent receives one aggregated payload, once, in-order.
3) Flat sub-agents (no nesting)
Child sessions are created with:
call_omo_agent=falsetask/delegate_task), to prevent sub-sub-agent spawningThis is enforced for both:
This is the core “no nuclear fission” guarantee: sub-agents can research and answer, but cannot spawn more agents.
4) Multi-turn sub-agent follow-ups
Native Task sessions are real sessions: a parent can ask follow-ups by re-invoking
task(session_id=...).This turns sub-agents from “one-shot tools” into “inspectable, iteratable mini-sessions,” which is both more powerful and more transparent for users.
Prompt rewrites (3 main agents)
This PR rewrites:
orchestrator-sisyphusPrometheus (Planner)SisyphusGoals:
Measured prompt size reductions vs upstream
origin/dev(beta.11 era), raw bytes:src/agents/orchestrator-sisyphus.ts: 57,732 → 21,683 (~62% smaller)src/agents/prometheus-prompt.ts: 40,932 → 14,145 (~65% smaller)src/agents/sisyphus.ts: 21,866 → 10,196 (~53% smaller)Expected impact:
Memo anchor (durable external memory)
When enabled, OmO uses a single durable anchor file:
.sisyphus/memo.mdDesign intent:
This is explicitly meant to handle the real-world scenario where users do long, multi-phase work: even if the chat compacts repeatedly, the memo persists the core requirements and “why we’re doing this.”
Compaction handling:
During compaction, the continuation prompt is instructed to avoid duplicating memo content.
After compaction:
.sisyphus/memo.mdULW changes (no more keyword trigger)
Previous behavior: users had to type
ulw/ultraworkin chat to trigger injection (and it was noisy).New behavior:
ULW is controlled via a global toggle (
/omo ulw on|off|toggle).Keyword trigger is disabled.
ULW injection is cleaner and aligned to the new sub-agent system.
When ULW is enabled, the assistant’s first line must be:
ULW MODE ENABLEDso users can confirm the mode is active.
This keeps ULW as an intentional “mode,” not something that accidentally triggers or requires repeated manual incantations.
Agent responsibilities (clear separation of concerns)
The three “main” agents have explicit roles:
task/batch/delegate_task)..sisyphus/*.md).task/batchto consult Metis/Momus and gather evidence before planning.task/batch) and implement code changes.This clearer separation is a major contributor to stability: it prevents “everyone can do everything,” which is where tool misuse and uncontrolled spawning tend to originate.
Background tasks / legacy path changes
This PR keeps the background-task system for compatibility, but tightens it:
Concurrency keys now prefer
input.model ?? input.parentModel(providerID/modelID) so:background_task.providerConcurrencyandbackground_task.modelConcurrencyactually apply.Limits are clamped at runtime (max 10).
0disables legacy background tasks for the matching scope.Cancellation keys match acquisition keys (avoid “can’t cancel queued task” edge cases).
The intent is: legacy remains available for advanced setups, but the default experience is firmly “task-first, visible, and controlled.”
How to use (for users)
/omotogglesType these into chat:
/omo status/omo memo on|off|toggle/omo ulw on|off|toggleHelp:
/omo-help(builtin command template)Config defaults (oh-my-opencode.json)
You can set default states globally and restrict injection to specific agents:
{ "memo": { "enabled": true, "agents": ["Sisyphus", "Prometheus (Planner)", "orchestrator-sisyphus"] }, "ulw": { "enabled": true, "agents": ["Prometheus (Planner)", "orchestrator-sisyphus"] }, "background_task": { "defaultConcurrency": 5, "providerConcurrency": { "anthropic": 3, "openai": 5, "google": 10 }, "modelConcurrency": { "anthropic/claude-opus-4-5": 2 } } }Notes:
memo.enabled=trueand.sisyphus/memo.mddoes not exist, OmO auto-creates it.background_task.*Concurrencyvalues are clamped (max 10).0disables the legacy path.Reviewer guide (where to look)
Agent prompts:
src/agents/orchestrator-sisyphus.tssrc/agents/prometheus-prompt.tssrc/agents/sisyphus.tssrc/agents/ulw-contract.tssrc/agents/memo-contract.ts/omotoggle + injection + compaction recovery:src/index.tssrc/features/omo-command/*src/features/memo-anchor/*src/features/ulw/*src/features/omo-onboarding/*Legacy background tasks tightening:
src/features/background-agent/*Tests / verification
bun run typecheckbun testbun run buildCompatibility notes
delegate_taskis preserved but denied by default and removed from main agent prompts.Potential follow-ups (optional)
batchvisibility for subagents (depending on OpenCode tool permission semantics).