Compare commits

...

2467 Commits

Author SHA1 Message Date
YeonGyu-Kim
f0b5835459 fix(publish): correct repo guard to oh-my-openagent (GitHub renamed repo) 2026-03-25 09:21:38 +09:00
YeonGyu-Kim
2a495c2e8d Merge pull request #2813 from code-yeongyu/fix/tmux-test-flake-20260325
test(tmux): remove flaky live env wrapper assertion
2026-03-25 02:08:05 +09:00
YeonGyu-Kim
0edb87b1c1 test(tmux): remove flaky live env wrapper assertion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-25 02:05:51 +09:00
YeonGyu-Kim
cca057dc0f Merge pull request #2812 from code-yeongyu/fix/non-interactive-env-win-bash-prefix
fix(non-interactive-env): force unix prefix for bash git commands
2026-03-25 01:24:18 +09:00
YeonGyu-Kim
e000a3bb0d fix(non-interactive-env): force unix prefix for bash git commands
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-25 01:23:02 +09:00
YeonGyu-Kim
c19fc4ba22 Merge pull request #2811 from code-yeongyu/fix/publish-workflow-guard-topology-20260325
fix(publish): align repo guard and test topology
2026-03-25 01:19:29 +09:00
YeonGyu-Kim
e0de06851d fix(publish): align repo guard and test topology
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-25 01:17:42 +09:00
YeonGyu-Kim
26ac413dd9 Merge pull request #2801 from MoerAI/fix/null-byte-sanitization
fix(tool-execute-before): strip null bytes from bash commands to prevent crash (fixes #2220)
2026-03-25 01:12:45 +09:00
YeonGyu-Kim
81c912cf04 Merge pull request #2800 from MoerAI/fix/background-task-fallback-chain
fix(background-task): register fallback chain for background sessions (fixes #2203)
2026-03-25 01:12:41 +09:00
YeonGyu-Kim
9c348db450 Merge pull request #2799 from MoerAI/fix/unstable-agent-config-override
fix(category-resolver): respect is_unstable_agent config override (fixes #2061)
2026-03-25 01:12:36 +09:00
YeonGyu-Kim
2993b3255d Merge pull request #2796 from guazi04/fix/circuit-breaker-false-positive-upstream
fix(circuit-breaker): treat unknown tool input as non-comparable to prevent false positives on flat events
2026-03-25 01:12:31 +09:00
YeonGyu-Kim
0b77e2def0 Merge pull request #2810 from code-yeongyu/fix/webfetch-redirect-loop
fix(webfetch): guard redirect loops in built-in flow
2026-03-25 00:40:54 +09:00
YeonGyu-Kim
bfa8fa2378 Merge pull request #2804 from code-yeongyu/fix/b2-hashline-formatter-cache-per-project
fix(hashline-edit): scope formatter cache by directory
2026-03-25 00:32:41 +09:00
YeonGyu-Kim
6ee680af99 Merge pull request #2809 from code-yeongyu/fix/2330-recursive-subagent-spawn
fix(task): preserve restricted agent tools in sync continuation
2026-03-25 00:32:14 +09:00
YeonGyu-Kim
d327334ded Merge pull request #2808 from code-yeongyu/fix-gemini-3-pro-cleanup
fix(models): remove stale Gemini 3 Pro references
2026-03-25 00:32:10 +09:00
YeonGyu-Kim
07d120a78d Merge pull request #2807 from code-yeongyu/fix/b4-manager-model-override-1774351606
fix(background-task): apply model override omission to manager live path
2026-03-25 00:31:49 +09:00
YeonGyu-Kim
8b7b1c843a Merge pull request #2806 from code-yeongyu/fix/b5-permission-merge-order
fix(plugin): restore permission merge order precedence
2026-03-25 00:31:43 +09:00
YeonGyu-Kim
a1786f469d Merge pull request #2805 from code-yeongyu/fix/b3-config-filename-precedence
fix(config): prefer canonical plugin config filenames
2026-03-25 00:31:18 +09:00
YeonGyu-Kim
da77d8addf Merge pull request #2802 from code-yeongyu/fix/b1-preemptive-compaction-epoch-guard
fix: handle repeated compaction epochs in continuation guard
2026-03-25 00:30:54 +09:00
YeonGyu-Kim
971912e065 fix(webfetch): avoid rewriting successful redirect content 2026-03-24 23:59:57 +09:00
YeonGyu-Kim
af301ab29a fix(webfetch): guard redirect loops in built-in flow 2026-03-24 23:58:53 +09:00
YeonGyu-Kim
984464470c fix(task): preserve restricted agent tools in sync continuation
Restore sync continuation to apply agent tool restrictions after permissive defaults so resumed explore and librarian sessions cannot regain nested delegation. Add regression tests for resumed restricted agents while keeping plan-family continuation behavior intact.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 23:54:29 +09:00
YeonGyu-Kim
535ecee318 fix(models): remove stale Gemini 3 Pro references
Keep repo-owned CLI, docs, and test fixtures aligned with current Gemini 3.1 naming while leaving upstream catalog behavior untouched.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 23:53:56 +09:00
YeonGyu-Kim
32035d153e fix(config): prefer canonical plugin config filenames
Ensure oh-my-opencode filenames always win over legacy oh-my-openagent files so readers match canonical writer behavior.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:38:54 +09:00
YeonGyu-Kim
a0649616bf fix(todo-continuation-enforcer): acknowledge compaction epochs during idle
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:36:22 +09:00
YeonGyu-Kim
cb12b286c8 fix(todo-continuation-enforcer): arm compaction epochs on compaction
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:36:22 +09:00
YeonGyu-Kim
8e239e134c fix(todo-continuation-enforcer): make compaction guard epoch-aware
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:36:22 +09:00
YeonGyu-Kim
733676f1a9 fix(todo-continuation-enforcer): add compaction epoch state
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:36:22 +09:00
YeonGyu-Kim
d2e566ba9d fix(preemptive-compaction): mock session history in degradation test
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:36:22 +09:00
YeonGyu-Kim
6da4d2dae0 fix(hashline-edit): scope formatter cache by directory
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:30:16 +09:00
YeonGyu-Kim
3b41191980 fix(background-agent): honor explicit model override in manager
Keep BackgroundManager launch and resume from sending both agent and model so OpenCode does not override configured subagent models. Add launch and resume regressions for the live production path.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:28:01 +09:00
YeonGyu-Kim
0b614b751c fix(permissions): preserve explicit deny over OmO defaults
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 20:24:14 +09:00
MoerAI
c56a01c15d fix(tool-execute-before): strip null bytes from bash commands to prevent crash (fixes #2220) 2026-03-24 19:17:05 +09:00
MoerAI
d2d48fc9ff fix(background-task): register fallback chain for background sessions (fixes #2203) 2026-03-24 19:11:13 +09:00
MoerAI
41a43c62fc fix(category-resolver): respect is_unstable_agent config override (fixes #2061) 2026-03-24 19:08:21 +09:00
YeonGyu-Kim
cea8769a7f Merge pull request #2798 from code-yeongyu/fix/2353-model-selection-v2
fix(plugin): persist selected model only for main session
2026-03-24 18:57:50 +09:00
YeonGyu-Kim
7fa2417c42 fix(plugin): persist selected model only for main session
Reuse the stored model only for subsequent main-session messages when the UI provides no model, while preserving first-message behavior, explicit overrides, and subagent isolation.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 18:11:27 +09:00
YeonGyu-Kim
4bba924dad Revert "Merge pull request #2797 from code-yeongyu/fix/2353-model-selection-persistence"
This reverts commit e691303919, reversing
changes made to d4aee20743.
2026-03-24 17:59:21 +09:00
YeonGyu-Kim
e691303919 Merge pull request #2797 from code-yeongyu/fix/2353-model-selection-persistence
fix(plugin): preserve selected model across messages
2026-03-24 17:54:34 +09:00
YeonGyu-Kim
d4aee20743 Merge pull request #2794 from code-yeongyu/fix/2775-thinking-block-signatures
fix(thinking-block-validator): reuse signed thinking blocks instead of synthetic placeholders
2026-03-24 17:54:31 +09:00
YeonGyu-Kim
bad70f5e24 fix(plugin): preserve selected model across messages
Reuse the current session's selected model during config-time agent rebuilds when config.model is missing, so desktop sessions do not snap back to the default model after each send.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 17:47:08 +09:00
Mou
b9fa2a3ebc fix(background-agent): prevent circuit breaker false positives on flat-format events 2026-03-24 16:35:54 +08:00
YeonGyu-Kim
0e7bd595f8 fix(session-recovery): reuse signed thinking blocks safely
Reuse signed Anthropic thinking blocks only when they can still sort before the target message's parts, otherwise skip recovery instead of reintroducing invalid loops.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 17:22:07 +09:00
YeonGyu-Kim
0732cb85f9 fix(thinking-block-validator): reuse signed thinking parts
Preserve prior signed Anthropic thinking blocks instead of creating unsigned synthetic placeholders, and skip injection when no signed block exists.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-24 17:22:07 +09:00
YeonGyu-Kim
500784a9b9 Merge pull request #2790 from code-yeongyu/fix/2666-mcp-schema-sanitization
fix(schema): strip contentEncoding from MCP tool schemas for Gemini (fixes #2200)
2026-03-24 16:24:57 +09:00
YeonGyu-Kim
5e856b4fde fix(schema): strip contentEncoding from MCP tool schemas for Gemini compatibility
The existing normalizeToolArgSchemas only applies to omo plugin tools
(via tool-registry.ts), but MCP server tool schemas bypass this
sanitization entirely. MCP schemas with contentEncoding/contentMediaType
cause Gemini 400 errors.

Add sanitizeJsonSchema() to strip unsupported keywords from MCP tool
inputSchema before serialization in formatMcpCapabilities.

Fixes #2200
Supersedes #2666
2026-03-24 16:24:44 +09:00
YeonGyu-Kim
03dc903e8e Merge pull request #2789 from code-yeongyu/fix/2671-clearSessionState
fix(anthropic-recovery): clear session state after successful summarize (fixes #2225)
2026-03-24 16:23:25 +09:00
YeonGyu-Kim
69d0b23ab6 fix(anthropic-recovery): clear session state after successful summarize and fix timing test
- Add missing clearSessionState() call after successful summarize (line 117)
  Without this, retry state persisted even after success, potentially causing
  unnecessary retries on subsequent compaction events.

- Fix timing-sensitive test: adjust attempt=0 and firstAttemptTime to give
  proper remainingTimeMs buffer for capped delay calculation.

Fixes #2225
Supersedes #2671
2026-03-24 16:23:11 +09:00
YeonGyu-Kim
ee8735cd2c Merge pull request #2788 from code-yeongyu/fix/2670-uiSelectedModel-nullification
fix(agents): preserve uiSelectedModel when agent override has no model (fixes #2351)
2026-03-24 16:22:15 +09:00
YeonGyu-Kim
d8fe61131c fix(agents): preserve uiSelectedModel when agent override has no model
Three agent builder files used falsy checks that incorrectly nullified
uiSelectedModel when override objects existed but had no model set:

- sisyphus-agent.ts: `?.model ?` → `?.model !== undefined ?`
- atlas-agent.ts: `?.model ?` → `?.model !== undefined ?`
- general-agents.ts: `!override?.model` → `override?.model === undefined`

This caused user model selection in web mode to revert to defaults.

Fixes #2351
2026-03-24 16:22:03 +09:00
YeonGyu-Kim
935995d270 Merge pull request #2668 from MoerAI/fix/session-degradation-detection
fix(session): detect post-compaction no-text degradation and trigger recovery (fixes #2232)
2026-03-24 16:21:30 +09:00
YeonGyu-Kim
23d8b88c4a Merge pull request #2669 from MoerAI/fix/atlas-worktree-verification
fix(atlas): use worktree path for git verification when available (fixes #2229)
2026-03-24 16:21:27 +09:00
YeonGyu-Kim
b4285ce565 Merge pull request #2787 from code-yeongyu/fix/review-fixes
fix(permissions): ensure omo permission overrides take precedence over opencode defaults
2026-03-24 16:20:27 +09:00
YeonGyu-Kim
f9d354b63e fix(permissions): ensure omo permission overrides take precedence over opencode defaults
The spread order in applyToolConfig was incorrect - omo's external_directory: 'allow'
was placed BEFORE the config.permission spread, allowing opencode's default 'ask' to
overwrite it. This caused write/edit tools to hang on headless opencode serve sessions
(no TUI to approve permission prompts).

Move omo's permission overrides AFTER the base config spread so they always win.

Fixes write/edit tool hangs when running opencode serve headlessly.
2026-03-24 16:19:56 +09:00
YeonGyu-Kim
370eb945ee Merge pull request #2786 from code-yeongyu/docs/rename-opencode-to-openagent
docs: rename oh-my-opencode to oh-my-openagent
2026-03-24 15:39:00 +09:00
YeonGyu-Kim
6387065e6f docs: rename oh-my-opencode to oh-my-openagent 2026-03-24 15:31:54 +09:00
YeonGyu-Kim
bebdb97c21 Merge pull request #2784 from code-yeongyu/fix/remove-openclaw-hyperlink
docs: remove OpenClaw hyperlink
2026-03-24 13:35:12 +09:00
YeonGyu-Kim
b5e2ead4e1 docs: remove OpenClaw hyperlink from Building in Public 2026-03-24 13:34:57 +09:00
YeonGyu-Kim
91922dae36 Merge pull request #2783 from code-yeongyu/fix/building-in-public-image
docs: add screenshot to Building in Public section
2026-03-24 13:34:14 +09:00
YeonGyu-Kim
cb3d8af995 docs: add screenshot to Building in Public section
Added the actual Discord screenshot showing real-time development
with Jobdori in #building-in-public channel.
2026-03-24 13:34:04 +09:00
YeonGyu-Kim
0fb3e2063a Merge pull request #2782 from code-yeongyu/feat/building-in-public-readme
docs: add Building in Public section to all READMEs
2026-03-24 13:23:46 +09:00
YeonGyu-Kim
b37b877c45 docs: add Building in Public section to all READMEs
- Added TIP box linking to #building-in-public Discord channel
- Mentions Jobdori AI assistant (built on heavily customized OpenClaw)
- Added to all 5 language variants (EN, KO, JA, ZH-CN, RU)
- Positioned above waitlist section for visibility
2026-03-24 13:23:21 +09:00
YeonGyu-Kim
f854246d7f Merge pull request #2772 from MoerAI/fix/custom-model-resolution
fix(delegate-task): trust user-configured category models without fuzzy validation (fixes #2740)
2026-03-24 12:38:22 +09:00
YeonGyu-Kim
f1eaa7bf9b fix(shell): detect csh/tcsh and use setenv syntax (#2769)
fix(non-interactive-env): detect shell type for csh/tcsh env var syntax (fixes #2089)
2026-03-24 12:30:49 +09:00
YeonGyu-Kim
ed9b4a6329 Merge pull request #2780 from code-yeongyu/fix/issues-2741-2648-2779
fix: resolve subagent model override, empty plan completion, deep task refusal (#2741, #2648, #2779)
2026-03-24 10:28:24 +09:00
YeonGyu-Kim
a00a22ac4c fix: remove copy-paste artifacts in hephaestus gpt-5-3-codex prompt
Same issue as gpt.ts and gpt-5-4.ts: duplicated CORRECT block with pipe
characters and duplicated Hard Constraints/Task Scope Clarification sections.
2026-03-24 10:14:53 +09:00
YeonGyu-Kim
8879581fc1 fix: remove copy-paste artifacts in hephaestus GPT prompts
- Remove leading pipe characters (|) from duplicated CORRECT block
- Remove duplicated ## Hard Constraints and ### Task Scope Clarification sections
- Properly place Task Scope Clarification section between CORRECT list and Hard Constraints

Addresses review comments by cubic-dev-ai[bot] on PR #2780
2026-03-24 09:57:30 +09:00
YeonGyu-Kim
230ce835e5 fix: resolve 3 bugs - subagent model override, empty plan completion, deep task refusal
- #2741: Pass inheritedModel as fallback in subagent-resolver when user hasn't
  configured an override, ensuring custom provider models take priority
- #2648: Fix getPlanProgress to treat plans with 0 checkboxes as incomplete
  instead of complete (total > 0 && completed === total)
- #2779: Relax Hephaestus single-task guard to accept multi-step sub-tasks
  from Atlas delegation, only rejecting genuinely independent tasks

Fixes #2741, fixes #2648, fixes #2779
2026-03-24 09:45:11 +09:00
YeonGyu-Kim
10e56badb3 Merge pull request #2776 from code-yeongyu/fix/background-agent-timeout-defaults
fix: stabilize background-agent stale timeout tests (Date.now race condition)
2026-03-24 03:29:35 +09:00
YeonGyu-Kim
cddf78434c Merge pull request #2770 from code-yeongyu/fix/ci-test-timeout
fix: add fetch mock to install test to prevent CI timeout
2026-03-24 03:29:23 +09:00
YeonGyu-Kim
0078b736b9 fix: stabilize stale timeout tests with fixed Date.now()
Tests 'should use default timeout when config not provided' (manager.test.ts)
and 'should use DEFAULT_MESSAGE_STALENESS_TIMEOUT_MS when not configured'
(task-poller.test.ts) failed in CI because Date.now() drifted between
test setup (when creating timestamps like Date.now() - 46*60*1000) and
actual execution inside checkAndInterruptStaleTasks().

On slower CI machines, this drift pushed borderline values across
the threshold, causing tasks that should be stale to remain 'running'.

Fix: Mock Date.now with spyOn to return a fixed time, ensuring
consistent timeout calculations regardless of execution speed.
2026-03-23 22:17:03 +09:00
MoerAI
6d7f69625b fix: update stale timeout test fixtures for new 45/60 min defaults 2026-03-23 21:00:59 +09:00
MoerAI
fda17dd161 fix(background-agent): increase default stale timeouts and improve cancellation messages (fixes #2684) 2026-03-23 20:49:43 +09:00
MoerAI
c41d6fd912 fix(delegate-task): trust user-configured category models without fuzzy validation (fixes #2740) 2026-03-23 20:39:47 +09:00
YeonGyu-Kim
6e9128e060 fix: add fetch mock to install test to prevent CI timeout
The first test case 'non-TUI mode: should show warning but continue when
OpenCode binary not found' was missing a globalThis.fetch mock, causing it
to make a real HTTP request to npm registry via fetchNpmDistTags().
The npm fetch timeout (5s) collided with the test timeout (5s), causing
flaky CI failures.

Added the same fetch mock pattern already used by the other two test cases.
Test runtime dropped from 5000ms+ to ~2ms.
2026-03-23 20:03:45 +09:00
MoerAI
92509d8cfb fix(non-interactive-env): detect shell type for csh/tcsh env var syntax (fixes #2089) 2026-03-23 19:33:54 +09:00
YeonGyu-Kim
331f7ec52b Merge pull request #2768 from code-yeongyu/fix/issue-2117
fix: emit formatter events from hashline-edit tool (fixes #2117)
2026-03-23 18:49:10 +09:00
YeonGyu-Kim
4ba2da7ebb fix: add tests and fix typing for formatter trigger (#2768) 2026-03-23 18:46:44 +09:00
YeonGyu-Kim
f95d3b1ef5 fix: emit formatter events from hashline-edit tool (fixes #2117) 2026-03-23 18:40:27 +09:00
YeonGyu-Kim
d5d7c7dd26 Merge pull request #2767 from code-yeongyu/fix/issue-2742
fix: respect disabled_tools config in agent prompts (fixes #2742)
2026-03-23 18:39:51 +09:00
YeonGyu-Kim
6a56c0e241 Merge pull request #2766 from code-yeongyu/fix/issue-390
fix: trigger compaction before continue after session error recovery (fixes #390)
2026-03-23 18:39:50 +09:00
YeonGyu-Kim
94c234c88c Merge pull request #2765 from code-yeongyu/fix/issue-2024
fix: skip keyword injection for non-OMO agents (fixes #2024)
2026-03-23 18:39:48 +09:00
YeonGyu-Kim
2ab976c511 Merge pull request #2764 from code-yeongyu/fix/issue-2624
fix: add oh-my-openagent.jsonc config file detection (fixes #2624)
2026-03-23 18:39:46 +09:00
YeonGyu-Kim
dc66088483 Merge pull request #2763 from code-yeongyu/fix/issue-2037
fix: respect OPENCODE_DISABLE_CLAUDE_CODE env vars (fixes #2037)
2026-03-23 18:39:45 +09:00
YeonGyu-Kim
67b5f46a7c Merge pull request #2762 from code-yeongyu/fix/issue-2150
fix: clarify Prometheus file permission error message (fixes #2150)
2026-03-23 18:39:43 +09:00
YeonGyu-Kim
0e483d27ac Merge pull request #2761 from code-yeongyu/fix/issue-2729
fix: validate serverUrl port before tmux pane spawn (fixes #2729)
2026-03-23 18:39:41 +09:00
YeonGyu-Kim
f5eaa648e9 fix: respect disabled_tools config in agent prompts (fixes #2742)
- Check disabled_tools for 'question' in tool-config-handler permission logic
- Strip Question tool code examples from Prometheus prompts when disabled
- Pass disabled_tools through prometheus agent config builder pipeline
- Add tests for disabled_tools question permission handling
2026-03-23 18:13:38 +09:00
YeonGyu-Kim
4c4760a4ee fix: trigger compaction before continue after session error recovery (fixes #390) 2026-03-23 18:12:51 +09:00
YeonGyu-Kim
7f20dd6ff5 fix: add oh-my-openagent.jsonc config file detection (fixes #2624) 2026-03-23 18:11:01 +09:00
YeonGyu-Kim
de371be236 fix: skip keyword injection for non-OMO agents (fixes #2024) 2026-03-23 18:10:44 +09:00
YeonGyu-Kim
f3c2138ef4 fix: respect OPENCODE_DISABLE_CLAUDE_CODE env vars (fixes #2037) 2026-03-23 18:10:08 +09:00
YeonGyu-Kim
0810e37240 fix: validate serverUrl port before tmux pane spawn (fixes #2729) 2026-03-23 18:09:31 +09:00
YeonGyu-Kim
a64e364fa6 fix: clarify Prometheus file permission error message (fixes #2150) 2026-03-23 18:07:59 +09:00
github-actions[bot]
d886ac701f @hunghoang3011 has signed the CLA in code-yeongyu/oh-my-openagent#2758 2026-03-23 04:28:31 +00:00
github-actions[bot]
30dc50d880 @0xYiliu has signed the CLA in code-yeongyu/oh-my-openagent#2738 2026-03-21 23:05:07 +00:00
github-actions[bot]
b17e633464 @ndaemy has signed the CLA in code-yeongyu/oh-my-openagent#2734 2026-03-21 10:18:31 +00:00
YeonGyu-Kim
eec268ee42 fix: use find() instead of calls[0] in wakeGateway test to handle background fetch calls 2026-03-21 18:01:39 +09:00
github-actions[bot]
363661c0d6 @whackur has signed the CLA in code-yeongyu/oh-my-openagent#2733 2026-03-21 05:27:27 +00:00
github-actions[bot]
261bbdf4dc @nguyentamdat has signed the CLA in code-yeongyu/oh-my-openagent#2718 2026-03-20 07:34:31 +00:00
YeonGyu-Kim
8aec4c5cb3 feat(hooks/todo-continuation-enforcer): enhance continuation message with skeptical verification guidance 2026-03-20 16:13:02 +09:00
YeonGyu-Kim
16cbc847ac fix(cli/run): set OPENCODE_CLIENT to 'run' to exclude question tool from registry 2026-03-20 16:12:58 +09:00
YeonGyu-Kim
436ce71dc8 docs(skills/github-triage): fix Phase 1 JSON parsing and large repo handling 2026-03-20 16:12:54 +09:00
github-actions[bot]
d2a49428b9 @tonymfer has signed the CLA in code-yeongyu/oh-my-openagent#2701 2026-03-19 17:14:04 +00:00
github-actions[bot]
c3b23bf603 @trafgals has signed the CLA in code-yeongyu/oh-my-openagent#2690 2026-03-19 04:22:43 +00:00
YeonGyu-Kim
50094de73e docs: fix remaining AGENTS hook composition text
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 12:02:52 +09:00
YeonGyu-Kim
3aa2748c04 docs: sync hook counts after continuation hook removal
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 12:02:52 +09:00
YeonGyu-Kim
ccaf759b6b fix(hooks): remove gpt permission continuation hook
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 12:02:52 +09:00
YeonGyu-Kim
521a1f76a9 fix(atlas): stop only after 10 consecutive prompt failures
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 12:02:52 +09:00
github-actions[bot]
490f0f2090 @walioo has signed the CLA in code-yeongyu/oh-my-openagent#2688 2026-03-19 02:35:04 +00:00
YeonGyu-Kim
caf595e727 fix(build-binaries): prevent test imports from triggering binary builds
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 10:47:33 +09:00
YeonGyu-Kim
1f64a45113 Merge pull request #2620 from code-yeongyu/feat/openclaw-bidirectional
feat: port OpenClaw bidirectional integration from omx
2026-03-19 10:47:07 +09:00
YeonGyu-Kim
9b2dc2189c fix(ralph-loop): detect promise tags in tool_result parts for ulw verification
Oracle's <promise>VERIFIED</promise> arrives as a tool_result part from the
task() tool call, not as a text part. Both detectCompletionInSessionMessages
and collectAssistantText only scanned type=text parts, missing the
verification signal entirely. This caused ulw loops to fail verification
even when Oracle successfully emitted VERIFIED.

Include tool_result parts in promise detection alongside text parts.
Exclude tool_use parts to avoid false positives from instructional text.
2026-03-18 19:09:59 +09:00
MoerAI
071fab1618 fix: match existing codebase session.messages() parameter shape 2026-03-18 19:08:05 +09:00
YeonGyu-Kim
f6c24e42af fix(ralph-loop): detect promise tags in tool_result parts for ulw verification
Oracle's <promise>VERIFIED</promise> arrives as a tool_result part from the
task() tool call, not as a text part. Both detectCompletionInSessionMessages
and collectAssistantText only scanned type=text parts, missing the
verification signal entirely. This caused ulw loops to fail verification
even when Oracle successfully emitted VERIFIED.

Include tool_result parts in promise detection alongside text parts.
Exclude tool_use parts to avoid false positives from instructional text.
2026-03-18 19:03:30 +09:00
YeonGyu-Kim
22fd976eb9 feat(categories): change quick category default model from claude-haiku-4-5 to gpt-5.4-mini
GPT-5.4-mini provides stronger reasoning at comparable speed and cost.
Haiku remains as the next fallback priority in the chain.

Changes:
- DEFAULT_CATEGORIES quick model: anthropic/claude-haiku-4-5 → openai/gpt-5.4-mini
- Fallback chain: gpt-5.4-mini → haiku → gemini-3-flash → minimax-m2.5 → gpt-5-nano
- OpenAI-only catalog: quick uses gpt-5.4-mini directly
- Think-mode: add gpt-5-4-mini and gpt-5-4-nano high variants
- Update all documentation references
2026-03-18 19:03:30 +09:00
YeonGyu-Kim
826284f3d9 Merge pull request #2676 from code-yeongyu/fix/atlas-task-session-review-followup
fix(atlas): address review findings for task session reuse
2026-03-18 18:50:45 +09:00
YeonGyu-Kim
3c7e6a3940 fix(atlas): address review findings for task session reuse 2026-03-18 18:44:42 +09:00
YeonGyu-Kim
33ef4db502 Merge pull request #2640 from HaD0Yun/had0yun/atlas-task-session-reuse
feat(atlas): persist preferred task session reuse
2026-03-18 18:37:16 +09:00
YeonGyu-Kim
458ec06b0e fix: extract question text from questions array per opencode tool schema 2026-03-18 18:27:09 +09:00
YeonGyu-Kim
6b66f69433 feat(gpt-permission-continuation): add context-aware continuation prompts
- Add buildContextualContinuationPrompt to include assistant message context
- Move extractPermissionPhrase to detector module for better separation
- Block continuation injection in subagent sessions
- Update handler to use contextual prompts with last response context
- Add tests for subagent session blocking and contextual prompts
- Update todo coordination test to verify new prompt format

🤖 Generated with assistance of OhMyOpenCode
2026-03-18 17:52:32 +09:00
YeonGyu-Kim
ce8957e1e1 fix(ralph-loop): harden oracle verification flow
Capture oracle verification sessions more reliably and accept parent-session VERIFIED evidence so ULW loops do not retry after successful review.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-18 17:45:59 +09:00
MoerAI
a3db64b931 fix: address cubic review — SDK compatibility and race condition fixes 2026-03-18 17:42:17 +09:00
HaD0Yun
8859da5fef fix(atlas): harden task session reuse 2026-03-18 17:31:27 +09:00
YeonGyu-Kim
23c0ff60f2 feat(background-agent): increase default max tool calls to 4000
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-18 16:36:55 +09:00
MoerAI
4723319eef fix(atlas): use worktree path for git verification when available (fixes #2229) 2026-03-18 16:23:37 +09:00
MoerAI
b8f3186d65 fix(session): detect post-compaction no-text degradation and trigger recovery (fixes #2232) 2026-03-18 16:13:23 +09:00
YeonGyu-Kim
01e18f8773 chore: remove console.* debug logging from non-CLI source files 2026-03-18 15:29:50 +09:00
YeonGyu-Kim
1669c83782 revert(todo-continuation): remove [TODO-DIAG] console.error debug logging 2026-03-18 15:10:51 +09:00
YeonGyu-Kim
09cfd0b408 diag(todo-continuation): add comprehensive debug logging for session idle handling
Add [TODO-DIAG] console.error statements throughout the todo continuation
enforcer to help diagnose why continuation prompts aren't being injected.

Changes:
- Add session.idle event handler diagnostic in handler.ts
- Add detailed blocking reason logging in idle-event.ts for all gate checks
- Update JSON schema to reflect circuit breaker config changes

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-18 14:45:14 +09:00
YeonGyu-Kim
d48ea025f0 refactor(circuit-breaker): replace sliding window with consecutive call detection
Switch background task loop detection from percentage-based sliding window
(80% of 20-call window) to consecutive same-tool counting. Triggers when
same tool signature is called 20+ times in a row; a different tool resets
the counter.
2026-03-18 14:32:27 +09:00
YeonGyu-Kim
c5c7ba4eed perf: pre-compile regex patterns and optimize hot-path string operations
- error-classifier: pre-compile default retry pattern regex
- think-mode/detector: combine multilingual patterns into single regex
- parser: skip redundant toLowerCase on pre-lowered keywords
- edit-operations: use fast arraysEqual instead of JSON comparison
- hash-computation: optimize streaming line extraction with index tracking
2026-03-18 14:19:23 +09:00
YeonGyu-Kim
90aa3a306c perf(hooks,tools): optimize string operations and reduce redundant iterations
- output-renderer, hashline-edit-diff: replace str += with array join (H2)
- auto-slash-command: single-pass Map grouping instead of 6x filter (M1)
- comment-checker: hoist Zod schema to module scope (M2)
- session-last-agent: reverse iterate sorted array instead of sort+reverse (L2)
2026-03-18 14:19:12 +09:00
YeonGyu-Kim
c2f7d059d2 perf(shared): optimize hot-path utilities across plugin
- task-list: replace O(n³) blocker resolution with Map lookup (C4)
- logger: buffer log entries and flush periodically to reduce sync I/O (C5)
- plugin-interface: create chatParamsHandler once at init (H3)
- pattern-matcher: cache compiled RegExp for wildcard matchers (H6)
- file-reference-resolver: use replaceAll instead of split/join (M9)
- connected-providers-cache: add in-memory cache for read operations (L4)
2026-03-18 14:19:00 +09:00
YeonGyu-Kim
7a96a167e6 perf(claude-code-hooks): defer config loading until after disabled check
Move loadClaudeHooksConfig and loadPluginExtendedConfig after isHookDisabled check
in both tool-execute-before and tool-execute-after handlers to skip 5 file reads
per tool call when hooks are disabled (C1)
2026-03-18 14:18:49 +09:00
YeonGyu-Kim
2da19fe608 perf(background-agent): use Set for countedToolPartIDs, cache circuit breaker settings, optimize loop detector
- Replace countedToolPartIDs string[] with Set<string> for O(1) has/add vs O(n) includes/spread (C2)
- Cache resolveCircuitBreakerSettings at manager level to avoid repeated object creation (C3)
- Optimize recordToolCall to avoid full array copy with slice (L1)
2026-03-18 14:18:38 +09:00
YeonGyu-Kim
952bd5338d fix(background-agent): treat non-active session statuses as terminal to prevent parent session hang
Previously, pollRunningTasks() and checkAndInterruptStaleTasks() treated
any non-"idle" session status as "still running", which caused tasks with
terminal statuses like "interrupted" to be skipped indefinitely — both
for completion detection AND stale timeout. This made the parent session
hang forever waiting for an ALL COMPLETE notification that never came.

Extract isActiveSessionStatus() and isTerminalSessionStatus() that
classify session statuses explicitly. Only known active statuses
("busy", "retry", "running") protect tasks from completion/stale checks.
Known terminal statuses ("interrupted") trigger immediate completion.
Unknown statuses fall through to the standard idle/gone path with output
validation as a conservative default.

Introduced by: a0c93816 (2026-02-14), dc370f7f (2026-03-08)
2026-03-18 14:06:23 +09:00
YeonGyu-Kim
57757a345d refactor: improve test isolation and DI for cache/port-utils/resolve-file-uri
- connected-providers-cache: extract factory pattern (createConnectedProvidersCacheStore) for testable cache dir injection
- port-utils.test: environment-independent tests with real socket probing and contiguous port detection
- resolve-file-uri.test: mock homedir instead of touching real home directory
- github-triage: update SKILL.md
2026-03-18 13:17:01 +09:00
YeonGyu-Kim
3caae14192 fix(ralph-loop): abort stale Oracle sessions before ulw verification restart
When Oracle verification fails in ulw-loop mode, the previous Oracle
session was never aborted before restarting. Each retry created a new
descendant session, causing unbounded session accumulation and 500
errors from server overload.

Now abort the old verification session before:
- restarting the loop after failed verification
- re-entering verification phase on subsequent DONE detection
2026-03-18 12:49:27 +09:00
YeonGyu-Kim
55ac653eaa feat(hooks): add todo-description-override hook to enforce atomic todo format
Override TodoWrite description via tool.definition hook to require
WHERE/WHY/HOW/RESULT in each todo title and enforce 1-3 tool call
granularity.
2026-03-18 11:49:13 +09:00
YeonGyu-Kim
1d5652dfa9 Merge pull request #2655 from tad-hq/infinite-circuit-target-fix
fix(circuit-breaker): make repetitive detection target-aware and add enabled escape hatch
2026-03-18 11:46:06 +09:00
YeonGyu-Kim
76c460536d docs(start-work): update worktree and task breakdown guidance
- Change worktree behavior: default to current directory, worktree only with --worktree flag
- Add mandatory TASK BREAKDOWN section with granular sub-task requirements
- Add WORKTREE COMPLETION section for merging worktree branches back

🤖 Generated with assistance of OhMyOpenCode
2026-03-18 11:16:43 +09:00
github-actions[bot]
b067d4a284 @ogormans-deptstack has signed the CLA in code-yeongyu/oh-my-openagent#2656 2026-03-17 20:42:53 +00:00
github-actions[bot]
94838ec039 @tad-hq has signed the CLA in code-yeongyu/oh-my-openagent#2655 2026-03-17 20:07:20 +00:00
tad-hq
224ecea8c7 chore: regenerate JSON schema with circuitBreaker.enabled field 2026-03-17 13:43:56 -06:00
tad-hq
5d5755f29d fix(circuit-breaker): wire target-aware detection into background manager 2026-03-17 13:40:46 -06:00
tad-hq
1fdce01fd2 fix(circuit-breaker): target-aware loop detection via tool signatures 2026-03-17 13:36:09 -06:00
tad-hq
c8213c970e fix(circuit-breaker): add enabled config flag as escape hatch 2026-03-17 13:29:06 -06:00
YeonGyu-Kim
576ff453e5 Merge pull request #2651 from code-yeongyu/fix/openagent-version-in-publish
fix(release): set version when publishing oh-my-openagent
2026-03-18 02:15:36 +09:00
YeonGyu-Kim
9b8aca45f9 fix(release): set version when publishing oh-my-openagent
The publish step was updating name and optionalDependencies but not
version, causing npm to try publishing the base package.json version
(3.11.0) instead of the release version (3.12.0).

Error was: 'You cannot publish over the previously published versions: 3.11.0'
2026-03-18 02:15:15 +09:00
YeonGyu-Kim
f1f20f5a79 Merge pull request #2650 from code-yeongyu/fix/openagent-platform-publish
fix(release): add oh-my-openagent dual-publish to platform and main workflows
2026-03-18 01:55:31 +09:00
YeonGyu-Kim
de40caf76d fix(release): add oh-my-openagent dual-publish to platform and main workflows
- publish-platform.yml: Build job now checks BOTH oh-my-opencode and
  oh-my-openagent before skipping. Build only skips when both are published.
  Added 'Publish oh-my-openagent-{platform}' step that renames package.json
  and publishes under the openagent name.

- publish.yml: Added 'Publish oh-my-openagent' step after opencode publish.
  Rewrites package name and optionalDependencies to oh-my-openagent variants,
  then publishes. Restores package.json after.

Previously, oh-my-openagent platform packages were never published because
the build skip check only looked at oh-my-opencode (which was already published),
causing the entire build to be skipped.
2026-03-18 01:45:02 +09:00
HaD0Yun
8adf6a2c47 fix(atlas): tighten session reuse metadata parsing 2026-03-17 18:14:17 +09:00
github-actions[bot]
d80833896c @HaD0Yun has signed the CLA in code-yeongyu/oh-my-openagent#2640 2026-03-17 08:27:56 +00:00
HaD0Yun
5c6194372e feat(atlas): persist preferred task session reuse 2026-03-17 17:25:46 +09:00
YeonGyu-Kim
399796cbe4 fix(openclaw): add comment clarifying proc.exited race condition avoidance
cubic identified potential race condition where Bun's proc.exitCode
may be null immediately after stdout closes. Added clarifying
comment that await proc.exited ensures exitCode is set before
checking.

fixes: cubic review on PR #2620
2026-03-17 17:14:52 +09:00
YeonGyu-Kim
77c3ed1a1f chore: remove omx state files and add .omx/ to gitignore 2026-03-17 17:00:29 +09:00
YeonGyu-Kim
82e25c845b fix: address cubic re-review — remove non-existent session.stop event, fix env var fallback test 2026-03-17 17:00:18 +09:00
YeonGyu-Kim
d50c38f037 refactor(tests): rename benchmarks/ to tests/hashline/, remove FriendliAI dependency
- Move benchmarks/ → tests/hashline/
- Replace @friendliai/ai-provider with @ai-sdk/openai-compatible
- Remove all 'benchmark' naming (package name, scripts, env vars, session IDs)
- Fix import paths for new directory depth (../src → ../../src)
- Fix pre-existing syntax error in headless.ts (unclosed case block)
- Inject HASHLINE_EDIT_DESCRIPTION into test system prompt
- Scripts renamed: bench:* → test:*
2026-03-17 16:47:13 +09:00
YeonGyu-Kim
f2d5f4ca92 improve(hashline-edit): rewrite tool description with examples and fix lines schema
- Add XML-structured description (<must>, <operations>, <examples>, <auto>)
- Add 5 concrete examples including BAD pattern showing duplication
- Add explicit anti-duplication warning for range replace
- Move snapshot rule to top-level <must> section
- Clarify batch semantics (multiple ops, not one big replace)
- Fix lines schema: add string[] to union (was string|null, now string[]|string|null)
- Matches runtime RawHashlineEdit type and description text
2026-03-17 16:47:13 +09:00
YeonGyu-Kim
b788586caf relax task timeouts: stale timeout 3min→20min, session wait 30s→1min 2026-03-17 16:47:13 +09:00
YeonGyu-Kim
90351e442e update look_at tool description to discourage visual precision use cases 2026-03-17 16:47:13 +09:00
YeonGyu-Kim
4ad88b2576 feat(task-toast): show model name before category in toast notification
Display resolved model ID (e.g., gpt-5.3-codex: deep) instead of
agent/category format when modelInfo is available. Falls back to
old format when no model info exists.
2026-03-17 16:47:13 +09:00
YeonGyu-Kim
2ce69710e3 docs: sync agent-model-matching guide with actual fallback chains
- Metis: add missing GPT-5.4 high as 2nd fallback
- Hephaestus: add GPT-5.4 (Copilot) fallback, was incorrectly listed as Codex-only
- Oracle: add opencode-go/glm-5 as last fallback
- Momus: add opencode-go/glm-5 fallback, note xhigh variant
- Atlas: add GPT-5.4 medium as 3rd fallback
- Sisyphus: add Kimi K2.5 (moonshot providers) in chain
- Sisyphus-Junior: add missing agent to Utility Runners section
- GPT Family table: merge duplicate GPT-5.4 rows
- Categories: add missing opencode-go intermediate fallbacks for
  visual-engineering, ultrabrain, quick, unspecified-low/high, writing
2026-03-17 16:47:13 +09:00
YeonGyu-Kim
0b4d092cf6 Merge pull request #2639 from code-yeongyu/feature/2635-smart-circuit-breaker
feat(background-agent): add smart circuit breaker for repeated tool calls
2026-03-17 16:43:08 +09:00
YeonGyu-Kim
53285617d3 Merge pull request #2636 from code-yeongyu/fix/pre-publish-blockers
fix: resolve 12 pre-publish blockers (security, correctness, migration)
2026-03-17 16:36:04 +09:00
YeonGyu-Kim
ae3befbfbe fix(background-agent): apply smart circuit breaker to manager events
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-17 16:31:55 +09:00
YeonGyu-Kim
dc1a05ac3e feat(background-agent): add loop detector helpers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-17 16:31:55 +09:00
YeonGyu-Kim
e271b4a1b0 feat(config): add background task circuit breaker settings
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-17 16:31:55 +09:00
YeonGyu-Kim
fee938d63a fix(cli): cherry-pick glm-4.7-free → gpt-5-nano fallback fix from dev 2026-03-17 16:30:12 +09:00
YeonGyu-Kim
4d74d888e4 Merge pull request #2637 from code-yeongyu/fix/ulw-verification-session-tracking
fix(ulw-loop): add fallback for Oracle verification session tracking
2026-03-17 16:25:28 +09:00
YeonGyu-Kim
4bc7b1d27c fix(ulw-loop): add fallback for Oracle verification session tracking
The verification_session_id was never reliably set because the
prompt-based attempt_id matching in tool-execute-after depends on
metadata.prompt surviving the delegate-task execution chain. When
this fails silently, the loop never detects Oracle's VERIFIED
emission.

Add a fallback: when exact attempt_id matching fails but oracle
agent + verification_pending state match, still set the session ID.
Add diagnostic logging to trace verification flow failures.
Add integration test covering the full verification chain.
2026-03-17 16:21:40 +09:00
YeonGyu-Kim
78dac0642e Merge pull request #2590 from MoerAI/fix/subagent-circuit-breaker
fix(background-agent): add circuit breaker to prevent subagent infinite loops (fixes #2571)
2026-03-17 16:09:29 +09:00
YeonGyu-Kim
92bc72a90b fix(bun-install): use workspaceDir option instead of hardcoded cache-dir 2026-03-17 16:05:51 +09:00
YeonGyu-Kim
a7301ba8a9 fix(delegate-task): guard skipped sentinel in subagent-resolver 2026-03-17 15:57:23 +09:00
YeonGyu-Kim
e9887dd82f fix(doctor): align auto-update and doctor config paths 2026-03-17 15:56:02 +09:00
YeonGyu-Kim
c0082d8a09 Merge pull request #2634 from code-yeongyu/fix/run-in-background-required
fix(delegate-task): remove auto-default for run_in_background, require explicit parameter
2026-03-17 15:55:17 +09:00
YeonGyu-Kim
fbc3b4e230 Merge pull request #2612 from MoerAI/fix/dead-fallback-model
fix(cli): replace dead glm-4.7-free with gpt-5-nano as ultimate fallback (fixes #2101)
2026-03-17 15:53:29 +09:00
YeonGyu-Kim
1f7fdb43ba Merge pull request #2539 from cpkt9762/fix/category-variant-no-requirement
fix(delegate-task): build categoryModel with variant for categories without fallback chain
2026-03-17 15:53:11 +09:00
YeonGyu-Kim
566031f4fa fix(delegate-task): remove auto-default for run_in_background, require explicit parameter
Remove the auto-defaulting logic from PR #2420 that silently set
run_in_background=false when category/subagent_type/session_id was present.

The tool description falsely claimed 'Default: false' which misled agents
into omitting the parameter. Now the description says REQUIRED and the
validation always throws when the parameter is missing, with a clear
error message guiding the agent to retry with the correct value.

Reverts the behavioral change from #2420 while keeping the issue's
root cause (misleading description) fixed.
2026-03-17 15:49:47 +09:00
YeonGyu-Kim
0cf386ec52 fix(skill-tool): invalidate cached skill description on execute 2026-03-17 15:49:26 +09:00
YeonGyu-Kim
d493f9ec3a fix(cli-run): move resolveRunModel inside try block 2026-03-17 15:49:26 +09:00
YeonGyu-Kim
2c7ded2433 fix(background-agent): defer task cleanup while siblings running 2026-03-17 15:17:34 +09:00
YeonGyu-Kim
82c7807a4f fix(event): clear retry dedupe key on non-retry status 2026-03-17 15:17:34 +09:00
YeonGyu-Kim
df7e1ae16d fix(todo-continuation): remove activity-based stagnation bypass 2026-03-17 15:17:34 +09:00
YeonGyu-Kim
0471078006 fix(tmux): escape serverUrl in pane shell commands 2026-03-17 15:16:54 +09:00
YeonGyu-Kim
1070b9170f docs: remove temporary injury notice from README 2026-03-17 10:41:56 +09:00
acamq
bb312711cf Merge pull request #2618 from RaviTharuma/fix/extract-status-code-nested-errors
fix(runtime-fallback): extract status code from nested AI SDK errors
2026-03-16 16:28:31 -06:00
github-actions[bot]
c31facf41e @gxlife has signed the CLA in code-yeongyu/oh-my-openagent#2625 2026-03-16 15:17:21 +00:00
YeonGyu-Kim
c644930753 Fix OpenClaw review issues 2026-03-16 22:28:54 +09:00
YeonGyu-Kim
b79df5e018 feat: port OpenClaw bidirectional integration from omx
Ports the complete OpenClaw integration system from oh-my-codex:

Outbound (opencode→OpenClaw):
- wakeOpenClaw() fire-and-forget gateway notifications
- HTTP and command gateway dispatchers
- Template variable interpolation
- Config from oh-my-opencode.jsonc (no env gate needed)

Inbound (OpenClaw→opencode):
- Reply listener daemon (Discord/Telegram polling)
- Session registry for message↔tmux pane correlation
- Tmux pane detection, content capture, and text injection
- Input sanitization and rate limiting
- Pane verification before injection

Files:
- src/openclaw/ (types, config, dispatcher, index, reply-listener, session-registry, tmux, daemon)
- src/config/schema/openclaw.ts (Zod v4 schema)
- src/hooks/openclaw.ts (session hook)
- Tests: 12 pass (config + dispatcher)
2026-03-16 21:55:10 +09:00
Ravi Tharuma
de66f1f397 fix(runtime-fallback): prefer numeric status codes over non-numeric in extraction chain
The nullish-coalescing chain could stop at a non-numeric value (e.g.
status: "error"), preventing deeper nested numeric statusCode values
from being reached. Switch to Array.find() with a type guard to always
select the first numeric value.

Adds 11 tests for extractStatusCode covering: top-level, nested
(data/error/cause), non-numeric skip, fallback to regex, and
precedence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 13:51:23 +01:00
YeonGyu-Kim
427fa6d7a2 Merge pull request #2619 from code-yeongyu/revert/openclaw-one-way
revert: remove one-way OpenClaw integration
2026-03-16 21:09:30 +09:00
YeonGyu-Kim
239da8b02a Revert "Merge pull request #2607 from code-yeongyu/feat/openclaw-integration"
This reverts commit 8213534e87, reversing
changes made to 84fb1113f1.
2026-03-16 21:09:08 +09:00
YeonGyu-Kim
17244e2c84 Revert "Merge pull request #2609 from code-yeongyu/fix/rename-omx-to-omo-env"
This reverts commit 4759dfb654, reversing
changes made to 8213534e87.
2026-03-16 21:09:08 +09:00
Ravi Tharuma
24a0f7b032 fix(runtime-fallback): extract status code from nested AI SDK errors
AI SDK wraps HTTP status codes inside error.error.statusCode (e.g., AI_APICallError). The current extractStatusCode only checks the top level, missing these nested codes.

This caused runtime-fallback to skip retryable errors like 400, 500, 504 because it couldn't find the status code.

Fixes #2617
2026-03-16 13:04:14 +01:00
MoerAI
fc48df1d53 fix(cli): replace dead glm-4.7-free with gpt-5-nano as ultimate fallback
The opencode/glm-4.7-free model was removed from the OpenCode platform,
causing the ULTIMATE_FALLBACK in the CLI installer to point to a dead
model. Users installing OMO without any major provider configured would
get a non-functional model assignment.

Replaced with opencode/gpt-5-nano which is confirmed available per
user reports and existing fallback chains in model-requirements.ts.

Fixes #2101
2026-03-16 19:21:10 +09:00
YeonGyu-Kim
4759dfb654 Merge pull request #2609 from code-yeongyu/fix/rename-omx-to-omo-env
fix: rename OMX_OPENCLAW env vars to OMO_OPENCLAW
2026-03-16 18:47:50 +09:00
YeonGyu-Kim
2c8813e95d fix: rename OMX_OPENCLAW env vars to OMO_OPENCLAW
Renames all environment variable gates from the old oh-my-codex (OMX) prefix
to the correct oh-my-openagent (OMO) prefix:

- OMX_OPENCLAW -> OMO_OPENCLAW
- OMX_OPENCLAW_COMMAND -> OMO_OPENCLAW_COMMAND
- OMX_OPENCLAW_DEBUG -> OMO_OPENCLAW_DEBUG
- OMX_OPENCLAW_COMMAND_TIMEOUT_MS -> OMO_OPENCLAW_COMMAND_TIMEOUT_MS

Adds TDD tests verifying:
- OMO_OPENCLAW=1 is required for activation
- Old OMX_OPENCLAW env var is not accepted
2026-03-16 18:45:34 +09:00
YeonGyu-Kim
8213534e87 Merge pull request #2607 from code-yeongyu/feat/openclaw-integration
feat: implement OpenClaw integration
2026-03-16 17:48:11 +09:00
YeonGyu-Kim
450685f5ea fix: extract session ID from properties.info.id for session.created/deleted events 2026-03-16 17:38:47 +09:00
YeonGyu-Kim
03b346ba51 feat: implement OpenClaw integration
Ports the OMX OpenClaw module into oh-my-openagent as a first-class integration.
This integration allows forwarding internal events (session lifecycle, tool execution) to external gateways (HTTP or command-based).

- Added `src/openclaw` directory with implementation:
  - `dispatcher.ts`: Handles HTTP/Command dispatching with interpolation
  - `types.ts`: TypeScript definitions
  - `client.ts`: Main entry point `wakeOpenClaw`
  - `index.ts`: Public API
- Added `src/config/schema/openclaw.ts` for Zod schema validation
- Updated `src/config/schema/oh-my-opencode-config.ts` to include `openclaw` config
- Added `src/hooks/openclaw-sender/index.ts` to listen for events
- Registered the hook in `src/plugin/hooks/create-session-hooks.ts`
- Added unit tests in `src/openclaw/__tests__`

Events handled:
- `session-start` (via `session.created`)
- `session-end` (via `session.deleted`)
- `session-idle` (via `session.idle`)
- `ask-user-question` (via `tool.execute.before` for `ask_user_question`)
- `stop` (via `tool.execute.before` for `stop-continuation` command)
2026-03-16 17:21:56 +09:00
YeonGyu-Kim
84fb1113f1 chore: add pre-publish blocker tracking document
Add FIX-BLOCKS.md to track critical and high-priority issues

identified in pre-publish reviews.

🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode
2026-03-16 14:15:36 +09:00
YeonGyu-Kim
90decd1fd4 chore(schema): regenerate schema after hook enum forward-compat change
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-openagent)
2026-03-16 14:15:36 +09:00
YeonGyu-Kim
47d1ad7bb9 fix(plugin): persist ultrawork variant on same-model override and normalize Claude model IDs
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-openagent)
2026-03-16 14:15:36 +09:00
YeonGyu-Kim
32a296bf1e fix(auto-slash-command): use event-ID dedup, align precedence, enforce skill agent gate
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-openagent)
2026-03-16 14:15:36 +09:00
YeonGyu-Kim
67bb9ec1e2 fix(delegate-task): resolve variant-bearing fallback models during immediate selection
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-openagent)
2026-03-16 14:15:36 +09:00
YeonGyu-Kim
d57c27feee fix(tmux): replace hardcoded zsh with portable shell detection
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-openagent)
2026-03-16 14:15:36 +09:00
YeonGyu-Kim
1339ecdd13 fix(hashline): restore v3.11.2 legacy hash computation for backward compatibility
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-openagent)
2026-03-16 14:15:36 +09:00
github-actions[bot]
8c4fa47e5e @sanoyphilippe has signed the CLA in code-yeongyu/oh-my-openagent#2604 2026-03-16 04:55:22 +00:00
github-actions[bot]
10e0c7f997 @Jrakru has signed the CLA in code-yeongyu/oh-my-openagent#2602 2026-03-16 03:40:45 +00:00
YeonGyu-Kim
48707a6901 test(tmux): isolate tmux environment checks from process env
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 11:37:56 +09:00
YeonGyu-Kim
fe3f0584ed test(skill-loader): avoid node:fs mock leakage in project skill references
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 11:37:56 +09:00
acamq
1cfc1c8a8b Merge pull request #2596 from cyberprophet/fix/doctor-plugin-version-fallback
fix(doctor): fall back to loadedVersion when pluginVersion is null
2026-03-15 20:22:10 -06:00
acamq
8401e61260 Merge pull request #2597 from code-yeongyu/fix/todo-compaction-only-guard
fix(todo-continuation-enforcer): skip continuation when only compaction messages exist
2026-03-15 20:20:20 -06:00
acamq
085ca0abcb Merge pull request #2598 from code-yeongyu/revert-2582-fix/fix-install-test
Revert "fix(test): update package name to oh-my-openagent in install test"
2026-03-15 20:09:25 -06:00
MoerAI
3055454ecc fix(background-agent): add circuit breaker to prevent subagent infinite loops
Adds a configurable maxToolCalls limit (default: 200) that automatically
cancels background tasks when they exceed the threshold. This prevents
runaway subagent loops from burning unlimited tokens, as reported in #2571
where a Gemini subagent ran 809 consecutive tool calls over 3.5 hours
costing ~$350.

The circuit breaker triggers in the existing tool call tracking path
(message.part.updated/delta events) and cancels the task with a clear
error message explaining what happened. The limit is configurable via
background_task.maxToolCalls in oh-my-opencode.jsonc.

Fixes #2571
2026-03-16 11:07:33 +09:00
acamq
a7800a8bf6 Revert "fix(test): update package name to oh-my-openagent in install test" 2026-03-15 20:06:55 -06:00
acamq
9e7abe2dea fix(todo-continuation-enforcer): skip continuation for compaction-only message history 2026-03-15 20:02:56 -06:00
cyberprophet
5b7ca99b96 fix(doctor): fall back to loadedVersion when pluginVersion is null 2026-03-16 11:00:05 +09:00
YeonGyu-Kim
f31f50abec fix(release): revert package identity to oh-my-opencode
Keep installer, config detection, schema generation, and publish workflows aligned with the long-lived oh-my-opencode package so this release does not split across two npm names.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
612b9c163d fix(config): clear stale context limit cache on provider updates
Rebuilding provider model limits prevents removed entries from leaking into later compaction decisions after config changes.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
16b0d9eb77 fix(atlas): gate final-wave approval on real plan state
Ignore nested plan checkboxes and track parallel final-wave approvals so Atlas only pauses for user approval when the real top-level review wave is complete.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
1ad5db4e8b fix(runtime-fallback): advance session.status fallback chain
Allow provider cooldown events to override a pending fallback retry so runtime fallback can keep progressing instead of stalling on the same model.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
988478a0fa fix(config): allow forward-compatible disabled hooks
Keep disabled_hooks aligned with runtime behavior by accepting unknown hook names instead of treating future entries as schema errors.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
e87075b9a4 fix(background-task): restore opt-in full session output
Bring background_output back to the legacy contract so callers only get full session transcripts when they explicitly ask for them.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
fe4493c6a6 fix(model-fallback): keep model fallback opt-in by default
Restore the runtime default that was introduced for model fallback so unset config no longer enables automatic retries unexpectedly.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
7f7527047e fix(cli): validate and detect OpenCode Go install settings
Reject invalid --opencode-go values during non-TUI installs and detect existing OpenCode Go usage from the generated oh-my-opencode config so updates preserve the right defaults.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
532995bb51 fix(model-fallback): align OpenAI fallback resolution across CLI and runtime
Keep install-time and runtime model tables in sync, stop OpenAI-only misrouting when OpenCode Go is present, and add valid OpenAI fallbacks for atlas, metis, and sisyphus-junior.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:55 +09:00
YeonGyu-Kim
b63082a3bb fix(skills): correct invalid task tool references 2026-03-16 10:38:54 +09:00
YeonGyu-Kim
674df1b1b8 fix(hooks): remove dead delegate-task-english-directive hook 2026-03-16 10:38:54 +09:00
YeonGyu-Kim
2b8ae214b6 fix(auto-slash-command): expire duplicate suppression after 30s
Allow legitimate repeated slash commands in long sessions by replacing session-lifetime dedup with a short-lived TTL cache.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:54 +09:00
YeonGyu-Kim
bbd2e86499 fix(hashline): accept legacy hashes for indented anchors
Keep persisted LINE#ID anchors working after strict whitespace hashing by falling back to the legacy hash for validation-only lookups.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-16 10:38:54 +09:00
acamq
f03de4f8a8 Merge pull request #2535 from conversun/fix/prometheus-compaction-agent-fallback
fix(todo-continuation-enforcer): prevent post-compaction agent fallback to General
2026-03-15 19:29:34 -06:00
acamq
65ccc9b854 Merge pull request #2588 from acamq/refactor/doctor-lsp-extensions
refactor(doctor): show detected LSP extensions instead of hardcoded server counts
2026-03-15 19:12:48 -06:00
acamq
85d812964b chore: remove unused LspServerInfo type 2026-03-15 19:09:47 -06:00
acamq
da788d3906 fix(doctor): remove redundant extensions from verbose LSP header
The header line was showing all extensions unioned together which was
redundant with the per-server detail lines below and caused line overflow.
Status mode also simplified to just show server count.
2026-03-15 19:02:21 -06:00
acamq
03da2e94a2 refactor(doctor): show detected LSP servers and extensions instead of hardcoded counts
Replace the hardcoded 4-server list in doctor LSP check with getAllServers()
from server-resolution.ts, which covers all 40+ builtin servers plus user
config. Output now shows server count with supported extensions, and verbose
mode expands to per-server detail lines.

Status:  LSP 3 servers (.go, .py, .pyi, .ts, .tsx)
Verbose: LSP 3 servers (.go, .py, .pyi, .ts, .tsx)
           typescript (.ts, .tsx, .js, .jsx)
           pyright (.py, .pyi)
           gopls (.go)

Closes #2587
2026-03-15 19:00:17 -06:00
acamq
73685da275 Merge pull request #2563 from robinmordasiewicz/fix/claude-code-plugin-v3-array-format
fix(plugin-loader): support Claude Code v3 flat array format for installed_plugins.json
2026-03-15 18:02:29 -06:00
acamq
8f9bdf0893 Merge pull request #2559 from MoerAI/fix/issue-2555-disabled-tools-merge
fix: union disabled_tools in mergeConfigs() like other disabled_* arrays
2026-03-15 17:57:18 -06:00
acamq
2cf329a302 revert: remove accidentally committed built files from bce8ff3
Reverts the dist/ directory added in bce8ff3a7 ("chore: include pre-built
dist for github install"). Built artifacts should not be tracked in git.
2026-03-15 17:51:08 -06:00
acamq
e03d0e0485 Merge pull request #2585 from acamq/fix/custom-agent-summaries-completeness
fix(agents): include config agents and migrated plugin agents in customAgentSummaries
2026-03-15 17:48:50 -06:00
acamq
14d7043263 Merge pull request #2546 from acamq/fix/installer-paths
fix(installer): always use .config/opencode for CLI on Windows (#2502)
2026-03-15 17:44:39 -06:00
acamq
e8a3e549bb fix(agents): include config agents and migrated plugin agents in customAgentSummaries
PR #2424 fixed the critical bug (passing client object instead of agent
summaries array), but only included user, project, and raw plugin agents.

This adds the two missing sources:
- OpenCode native config agents (params.config.agent)
- Plugin agents with migrateAgentConfig applied before summary extraction

Ensures Sisyphus has complete awareness of all registered agent sources.

Closes #2386

Co-authored-by: NS Cola <123285105+davincilll@users.noreply.github.com>
2026-03-15 17:30:57 -06:00
acamq
2fd6f4bf57 Merge pull request #2582 from acamq/fix/fix-install-test
fix(test): update package name to oh-my-openagent in install test
2026-03-15 16:31:56 -06:00
acamq
0f0e4c649b fix(test): update package name to oh-my-openagent in install test
The test was checking for the old package name 'oh-my-opencode'
but the plugin registration now uses 'oh-my-openagent'.
2026-03-15 16:26:35 -06:00
acamq
b7c68080b4 Merge pull request #2532 from ricatix/fix/doctor-verbose-models
fix(cli): render verbose doctor check details
2026-03-15 16:19:08 -06:00
acamq
f248c73478 Merge pull request #2507 from MoerAI/fix/issue-2287-unstable-agent-check
fix(delegate-task): only check resolved model for isUnstableAgent, not category default
2026-03-15 15:34:57 -06:00
acamq
8470a6bf1f fix(test): isolate XDG_CONFIG_HOME in Windows CLI tests
Windows CLI tests were not deleting XDG_CONFIG_HOME, making them
fragile in environments where this variable is set. getCliConfigDir()
reads XDG_CONFIG_HOME on all platforms, not just Linux.
2026-03-15 15:30:52 -06:00
acamq
f92c0931a3 fix(installer): respect XDG_CONFIG_HOME on Windows for CLI config dir 2026-03-15 08:26:41 -06:00
github-actions[bot]
aa27c75ead @idrekdon has signed the CLA in code-yeongyu/oh-my-openagent#2572 2026-03-14 17:57:23 +00:00
Robin Mordasiewicz
0d1d405a72 fix(discovery): add null-safe validation for v3 array entries
Filter out null, undefined, or malformed entries in installed_plugins.json
before accessing properties. Prevents fatal crash on corrupted data.

Addresses cubic-dev-ai review feedback.
2026-03-14 05:35:12 +00:00
Robin Mordasiewicz
bc0ba843ac fix(agent-loader): convert model object to string for opencode compatibility
mapClaudeModelToOpenCode() returns {providerID, modelID} but opencode
expects model as a string. Both agent loaders now convert to
'providerID/modelID' string format before assigning to config.
2026-03-14 05:16:50 +00:00
Robin Mordasiewicz
bce8ff3a75 chore: include pre-built dist for github install 2026-03-14 04:56:50 +00:00
github-actions[bot]
5073efef48 @robinmordasiewicz has signed the CLA in code-yeongyu/oh-my-openagent#2563 2026-03-14 04:47:19 +00:00
Robin Mordasiewicz
a7f0a4cf46 fix(plugin-loader): support Claude Code v3 flat array format for installed_plugins.json 2026-03-14 04:40:27 +00:00
YeonGyu-Kim
913fcf270d remove ai slops 2026-03-14 12:48:05 +09:00
YeonGyu-Kim
c7518eae2d add skills 2026-03-14 12:45:58 +09:00
YeonGyu-Kim
0dcfcd372b feat(cli): support both oh-my-opencode and oh-my-openagent package names
Update CLI config manager to detect and handle both legacy (oh-my-opencode)
and new (oh-my-openagent) package names during installation. Migration
will automatically replace old plugin entries with the new name.

🤖 Generated with assistance of OhMyOpenCode
2026-03-14 12:45:58 +09:00
YeonGyu-Kim
6aeda598b9 feat(schema): generate oh-my-openagent schema alongside legacy schema
Update build script to generate both oh-my-opencode.schema.json (backward
compatibility) and oh-my-openagent.schema.json (new package name).
Also adds delegate-task-english-directive hook to schema.

🤖 Generated with assistance of OhMyOpenCode
2026-03-14 12:45:58 +09:00
YeonGyu-Kim
b0ab34b568 feat(shared): add plugin identity constants for package name migration
Add centralized plugin identity constants to support migration from
oh-my-opencode to oh-my-openagent. Includes both current and legacy
names for backward compatibility.

🤖 Generated with assistance of OhMyOpenCode
2026-03-14 12:45:58 +09:00
YeonGyu-Kim
a00bb8b6a7 feat(skill): integrate /get-unpublished-changes and /review-work into pre-publish-review
Phase 0 now runs /get-unpublished-changes as single source of truth
instead of manual bash commands. Phase 1 uses its output for grouping.
Layer 2 explicitly references /review-work skill flow.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-14 12:45:58 +09:00
github-actions[bot]
b5789bf449 @vidwade has signed the CLA in code-yeongyu/oh-my-openagent#2561 2026-03-14 02:32:16 +00:00
MoerAI
9a774f1db2 fix: union disabled_tools in mergeConfigs() like other disabled_* arrays
disabled_tools was defined in the Zod schema but omitted from
mergeConfigs(), causing project-level config to shadow user-level
disabled_tools instead of merging both sets. Add Set union and
regression test.

Closes #2555
2026-03-13 21:35:46 +09:00
github-actions[bot]
6625670079 @Yeachan-Heo has signed the CLA in code-yeongyu/oh-my-openagent#2554 2026-03-13 06:41:04 +00:00
YeonGyu-Kim
f3de122147 feat(hooks): add delegate-task-english-directive hook to enforce English for subagents
Appends bold uppercase English-only directive to explore, librarian,
oracle, and plan subagent prompts via tool.execute.before on the task tool.
2026-03-13 14:22:13 +09:00
YeonGyu-Kim
0303488906 Merge pull request #2550 from code-yeongyu/fix/deploy-blockers
fix: resolve all deployment blockers from v3.11.2→HEAD release review
2026-03-13 14:21:45 +09:00
YeonGyu-Kim
3e746c9a56 fix(review): resolve 3 review-work blocking issues 2026-03-13 14:09:36 +09:00
YeonGyu-Kim
786c7a84d0 fix(background-agent): prevent queue item loss on concurrent cancel and guard against cancelled task resurrection 2026-03-13 13:12:59 +09:00
YeonGyu-Kim
380889caa3 fix(delegate-task): add exception fallback for cleanup reason and correct test mock status type 2026-03-13 13:08:50 +09:00
YeonGyu-Kim
04b0c6f33c fix(atlas): pause after final verification wave for explicit user approval 2026-03-13 12:43:33 +09:00
YeonGyu-Kim
fd71c89b95 fix(background-agent): release descendant quota on pre-start task cancellation and creation failure 2026-03-13 12:37:33 +09:00
YeonGyu-Kim
11df83713e refactor(preemptive-compaction): use shared context-limit resolver to eliminate duplicated logic 2026-03-13 12:36:07 +09:00
YeonGyu-Kim
457f303adf fix(background-agent): clean global subagentSessions and SessionCategoryRegistry on dispose 2026-03-13 10:56:44 +09:00
YeonGyu-Kim
0015dd88af fix(agent-config): normalize agent names before builtin override filtering to prevent alias bypass 2026-03-13 10:55:51 +09:00
YeonGyu-Kim
9bce6314b1 fix(runtime-fallback): scope visible-assistant check to current turn and cleanup retry dedupe keys 2026-03-13 10:54:47 +09:00
YeonGyu-Kim
cbe113ebab fix(slashcommand): support parent config dirs in command execution path to match discovery 2026-03-13 10:54:15 +09:00
YeonGyu-Kim
e3f6c12347 fix(atlas): restrict idle-event session append to boulder-owned subagent sessions only 2026-03-13 10:53:45 +09:00
YeonGyu-Kim
b356c50285 fix(delegate-task): cancel child background tasks on parent abort and timeout in unstable agent flow 2026-03-13 10:49:44 +09:00
YeonGyu-Kim
38938508fa test(model-fallback): update snapshots and kimi model expectations for opencode-go integration 2026-03-13 10:48:05 +09:00
YeonGyu-Kim
2c8a8eb4f1 fix(gpt-permission-continuation): add per-session consecutive auto-continue cap to prevent infinite loops 2026-03-13 10:48:00 +09:00
acamq
6b2da3c59b fix(installer): always use .config/opencode for CLI on Windows (#2502) 2026-03-12 17:46:52 -06:00
github-actions[bot]
825e854cff @cpkt9762 has signed the CLA in code-yeongyu/oh-my-openagent#2539 2026-03-12 20:17:38 +00:00
cpkt9762
11e9276498 fix(delegate-task): build categoryModel with variant for categories without fallback chain
When a category has no CATEGORY_MODEL_REQUIREMENTS entry (e.g.
user-defined categories like solana-re), the !requirement branch
set actualModel but never built categoryModel with variant from
the user config. The bottom fallback then created categoryModel
via parseModelString alone, silently dropping the variant.

Mirror the requirement branch logic: read variant from
userCategories and resolved.config, and build categoryModel
with it.

Fixes #2538
2026-03-13 04:15:17 +08:00
conversun
088844474a fix(todo-continuation-enforcer): tighten post-compaction guard with session-agent fallback
Refine continuation agent resolution to prefer session-state agent fallback while keeping compaction-specific protection. Replace sticky boolean compaction flag with a short-lived timestamp guard so unresolved agents are blocked only during the immediate post-compaction window, avoiding long-lived suppression and preserving existing continuation behavior.
2026-03-13 00:55:37 +08:00
github-actions[bot]
4226808432 @Gujiassh has signed the CLA in code-yeongyu/oh-my-openagent#2524 2026-03-12 16:36:59 +00:00
conversun
22b4b30dd7 fix(todo-continuation-enforcer): prevent post-compaction agent fallback to General
After compaction, message history is truncated and the original agent
(e.g. Prometheus) can no longer be resolved from messages. The todo
continuation enforcer would then inject a continuation prompt with
agent=undefined, causing the host to default to General -- which has
write permissions Prometheus should never have.

Root cause chain:
1. handler.ts had no session.compacted handler (unlike Atlas)
2. idle-event.ts relied on finding a compaction marker in truncated
   message history -- the marker disappears after real compaction
3. continuation-injection.ts proceeded when agentName was undefined
   because the skipAgents check only matched truthy agent names
4. prometheus-md-only/agent-resolution.ts did not filter compaction
   agent from message history fallback results

Fixes:
- Add session.compacted handler that sets hasRecentCompaction state flag
- Replace fragile history-based compaction detection with state flag
- Block continuation injection when agent is unknown post-compaction
- Filter compaction agent in Prometheus agent resolution fallback
2026-03-13 00:36:03 +08:00
github-actions[bot]
0412e40780 @ricatix has signed the CLA in code-yeongyu/oh-my-openagent#2532 2026-03-12 15:23:10 +00:00
ricatix
63ac37cd29 fix(cli): render verbose doctor check details
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 22:20:48 +07:00
github-actions[bot]
18cbaadb52 @xodn348 has signed the CLA in code-yeongyu/oh-my-openagent#2531 2026-03-12 15:14:20 +00:00
github-actions[bot]
27538dcfe6 @apple-ouyang has signed the CLA in code-yeongyu/oh-my-openagent#2528 2026-03-12 14:39:21 +00:00
YeonGyu-Kim
e4e5f159f9 fix(tmux): wrap opencode attach commands in zsh -c shell
🤖 Generated with assistance of OhMyOpenCode
2026-03-12 20:12:38 +09:00
YeonGyu-Kim
4f4e53b436 feat(skill): re-read skills and commands from disk on every invocation
Removes in-memory caching so newly created skills mid-session are
immediately available via skill(). Clears the module-level skill cache
before each getAllSkills() call. Pre-provided skills from options are
merged as fallbacks for test compatibility.
2026-03-12 20:03:58 +09:00
YeonGyu-Kim
55b80fb7cd fix(skill-loader): discover skills from parent config dir when using profiles
OPENCODE_CONFIG_DIR pointing to profiles/ subdirectory caused skills at
~/.config/opencode/skills/ to be invisible. Added getOpenCodeSkillDirs()
with the same parent-dir fallback that getOpenCodeCommandDirs() uses.
2026-03-12 19:53:30 +09:00
YeonGyu-Kim
c85b6adb7d chore: gitignore platform binary sourcemaps and untrack existing ones 2026-03-12 19:53:20 +09:00
YeonGyu-Kim
a400adae97 feat(skill): render skills as slash commands in available items list
Skills now appear as <command> items with / prefix (e.g., /review-work)
instead of <skill> items, making them discoverable alongside regular
slash commands in the skill tool description.
2026-03-12 18:53:44 +09:00
YeonGyu-Kim
50638cf783 test(hooks): fix test isolation in session-notification-sender tests
Use namespace import pattern (import * as sender) to prevent cross-file
spy leakage in Bun's shared module state. Move restoreAllMocks to
beforeEach for proper cleanup ordering.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) assistance
2026-03-12 18:37:10 +09:00
YeonGyu-Kim
8e3829f63a test(auto-slash-command): add tests for skills as slash commands 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
b4e01e9987 feat(slashcommand): support parent opencode config dirs for command discovery 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
8c2385fe31 feat(hooks): add quiet and nothrow to notification shell executions 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
c3ab066335 feat(shared): export opencode-command-dirs module 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
7937f9d777 feat(shared): add opencode-command-dirs utility for multi-level command discovery 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
53c65a7e63 feat(cli): add sisyphus-junior model fallback requirements
Add CLI_AGENT_MODEL_REQUIREMENTS entry for sisyphus-junior with
fallback chain: claude-sonnet-4-6 -> kimi-k2.5 -> big-pickle.

🤖 Generated with assistance of OhMyOpenCode
2026-03-12 18:19:06 +09:00
YeonGyu-Kim
8f6b952dc0 feat(prometheus): require explicit user approval in Final Verification Wave
Add mandatory explicit user okay before completing work in Final
Verification Wave. Present consolidated results and wait for user
confirmation before marking tasks complete.

🤖 Generated with assistance of OhMyOpenCode
2026-03-12 18:19:06 +09:00
YeonGyu-Kim
e0bf0eb7cf docs: add opencode-go provider tier documentation 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
a9fde452ac feat(opencode-go): update on-complete hook for provider display 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
338379941d feat(opencode-go): integrate into model fallback chain resolution 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
44d602b7e5 feat(opencode-go): integrate installer with config detection 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
66ec9f58ee feat(opencode-go): add CLI install flag and TUI prompts 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
89d1e105a8 feat(opencode-go): add model requirements for go-tier models 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
504b68f2ac feat(opencode-go): add provider type and availability detection 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
2bbbdc4ca9 refactor(github-triage): rewrite as read-only report-based analyzer 2026-03-12 18:19:06 +09:00
YeonGyu-Kim
ca7c0e391e fix(bun-install): default outputMode to "pipe" to prevent TUI stdout leak
runBunInstallWithDetails() defaulted to outputMode:"inherit", causing
bun install stdout/stderr to leak into the TUI when callers omitted the
option. Changed default to "pipe" so output is captured silently.

Also fixed stale mock in background-update-check.test.ts: the test was
mocking runBunInstall (unused) instead of runBunInstallWithDetails, and
returning boolean instead of BunInstallResult.
2026-03-12 18:19:06 +09:00
YeonGyu-Kim
81301a6071 feat: skip model resolution for delegated tasks when provider cache not yet created
Before provider cache exists (first run), resolveModelForDelegateTask now
returns undefined instead of guessing a model. This lets OpenCode use its
system default model when no model is specified in the prompt body.

User-specified model overrides still take priority regardless of cache state.
2026-03-12 18:19:06 +09:00
YeonGyu-Kim
62883d753f Merge pull request #2519 from code-yeongyu/fix/ultrawork-variant-no-max-override
fix: skip ultrawork variant override without SDK validation + add porcelain worktree parser
2026-03-12 17:27:57 +09:00
YeonGyu-Kim
c9d30f8be3 feat: add porcelain worktree parser with listWorktrees and parseWorktreeListPorcelain
Introduce git worktree list --porcelain parsing following upstream opencode patterns. Exports listWorktrees() for full worktree enumeration with branch info alongside existing detectWorktreePath().

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 17:25:10 +09:00
YeonGyu-Kim
2210997c89 fix: skip ultrawork variant override when SDK validation unavailable
When provider.list is not available for SDK validation, do not apply the configured ultrawork variant. This prevents models without a max variant from being incorrectly forced to max when ultrawork mode activates.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 17:24:54 +09:00
YeonGyu-Kim
feb2160a7a Merge pull request #2518 from code-yeongyu/fix-2499-ulw-oracle-verified-loop
Keep ulw-loop running until Oracle verifies completion
2026-03-12 17:15:49 +09:00
YeonGyu-Kim
37c7231a50 test: isolate connected providers cache test setup
Prevent the cache test from deleting the user cache directory and add a regression test for that setup path.

Co-authored-by: Codex <noreply@openai.com>
2026-03-12 17:08:06 +09:00
YeonGyu-Kim
1812c9f054 test(ralph-loop): cover overlapping ultrawork loops
Lock down stale-session and overwrite cases so a previous ULW verification flow cannot complete or mutate a newer loop.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 17:05:02 +09:00
YeonGyu-Kim
f31537f14c fix(ralph-loop): continue ultrawork until oracle verifies
Keep /ulw-loop iterating after the main session emits DONE so completion still depends on an actual Oracle VERIFIED result.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 17:00:25 +09:00
YeonGyu-Kim
e763885df1 Merge pull request #2516 from code-yeongyu/fix/hashline-strict-whitespace-hash
fix(hashline): use strict whitespace hashing (trimEnd only, preserve leading indentation)
2026-03-12 16:52:30 +09:00
YeonGyu-Kim
0cbc15da96 fix(hashline): use strict whitespace hashing (trimEnd only, preserve leading indentation)
Previously computeLineHash stripped ALL whitespace before hashing, making
indentation changes invisible to hash validation. This weakened the stale-line
detection guarantee, especially for indentation-sensitive files (Python, YAML).

Now only trailing whitespace and carriage returns are stripped, matching
oh-my-pi upstream behavior. Leading indentation is preserved in the hash,
so indentation-only changes correctly trigger hash mismatches.
2026-03-12 16:42:41 +09:00
YeonGyu-Kim
04b0d62a55 feat(session-notification): include session context in ready notifications
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 15:29:21 +09:00
YeonGyu-Kim
943f31f460 feat(session-notification): add ready notification content builder
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 15:29:21 +09:00
YeonGyu-Kim
8e1a4dffa9 Merge pull request #2486 from code-yeongyu/fix/issue-2357-child-session-fallback
fix: enable runtime fallback for delegated child sessions (#2357)
2026-03-12 13:53:24 +09:00
YeonGyu-Kim
abc4b2a6a4 fix(runtime-fallback): remove committed rebase conflict markers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 13:49:46 +09:00
YeonGyu-Kim
d8da2f1ad6 fix(runtime-fallback): clear retry keys on failed session bootstrap
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 13:39:30 +09:00
YeonGyu-Kim
62a905b690 fix(runtime-fallback): reuse normalized messages for visible assistant checks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 13:39:30 +09:00
YeonGyu-Kim
79fb746a1c fix(runtime-fallback): resolve agents from normalized session messages
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 13:39:30 +09:00
YeonGyu-Kim
fcd4fa5164 fix(runtime-fallback): normalize retry part message extraction
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 13:39:30 +09:00
YeonGyu-Kim
6a4a3322c1 fix(runtime-fallback): add session messages extractor
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 13:39:30 +09:00
YeonGyu-Kim
3caa3fcc3d fix: address Cubic findings for runtime fallback child sessions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 13:39:30 +09:00
YeonGyu-Kim
ba86ef0eea fix: enable runtime fallback for delegated child sessions (#2357) 2026-03-12 13:39:04 +09:00
MoerAI
eb79d29696 fix(delegate-task): only check resolved model for isUnstableAgent, not default (#2287) 2026-03-12 12:48:29 +09:00
acamq
4ded45d14c Merge pull request #2446 from win0na/fix/momus-key-trigger-specificity
fix(momus): make keyTrigger specify file-path-only invocation requirement
2026-03-11 20:34:08 -06:00
acamq
9032eeaa68 Merge pull request #2419 from guazi04/fix/serverurl-throw-getter
fix(tmux): handle serverUrl throw getter from upstream opencode refactor
2026-03-11 20:32:38 -06:00
YeonGyu-Kim
3ea23561f2 Merge pull request #2488 from code-yeongyu/fix/issue-2295-fallback-provider-preserve
fix: preserve session provider context in fallback chain
2026-03-12 11:24:43 +09:00
YeonGyu-Kim
0cdbd15f74 Merge pull request #2487 from code-yeongyu/fix/issue-2431-lsp-path-resolution
fix: unify LSP server PATH resolution between detection and spawn
2026-03-12 11:24:41 +09:00
YeonGyu-Kim
60e6f6d4f3 Merge pull request #2484 from code-yeongyu/fix/issue-2393-cubic-error-name
fix: add FreeUsageLimitError to RETRYABLE_ERROR_NAMES set
2026-03-12 11:24:37 +09:00
YeonGyu-Kim
b00fc89dfa Merge pull request #2458 from code-yeongyu/fix/memory-leaks
fix: resolve 12 memory leaks (3 critical + 9 high)
2026-03-12 11:21:13 +09:00
YeonGyu-Kim
2912b6598c fix: address Cubic findings for provider preserve fallback
- Reorder resolveFallbackProviderID: providerHint now checked before global connected-provider cache
- Revert require('bun:test') hack to standard ESM import in fallback-chain-from-models.test.ts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 11:05:31 +09:00
YeonGyu-Kim
755efe226e fix: address Cubic findings for FreeUsageLimitError classification
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 11:05:26 +09:00
YeonGyu-Kim
6014f03ed2 fix: address Cubic finding for LSP server npm bin path
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 11:04:43 +09:00
YeonGyu-Kim
2b4a5ca5da test(agent-variant): restore hephaestus openai case
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 11:04:43 +09:00
YeonGyu-Kim
4157c2224f fix(background-agent): clear pending parent on silent cancel
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 11:04:35 +09:00
YeonGyu-Kim
d253f267c3 fix(skill-mcp-manager): guard stale client cleanup
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 11:04:28 +09:00
YeonGyu-Kim
d83f875740 fix(call-omo-agent): track reused sync sessions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 11:04:20 +09:00
github-actions[bot]
5da347c3ec @ChicK00o has signed the CLA in code-yeongyu/oh-my-openagent#2499 2026-03-12 01:26:01 +00:00
github-actions[bot]
e5706bba48 @djdembeck has signed the CLA in code-yeongyu/oh-my-openagent#2497 2026-03-12 00:48:45 +00:00
acamq
f6ae3a4c64 Merge pull request #2493 from acamq/fix/fallback-test-regression
fix(test): update agent-variant test model to gpt-5.4
2026-03-11 15:47:23 -06:00
acamq
9832f7b52e fix(test): update agent-variant test model to gpt-5.4 2026-03-11 15:43:03 -06:00
acamq
5f3f8bb1d3 Merge pull request #2492 from acamq/fix/prometheus-test-regressions
test: update ultrabrain model expectations to gpt-5.4
2026-03-11 15:25:13 -06:00
acamq
2d6be11fa0 test: update ultrabrain model expectations to gpt-5.4
The DEFAULT_CATEGORIES ultrabrain model was updated from openai/gpt-5.3-codex
to openai/gpt-5.4 in a previous commit, but test expectations were not updated.

Updated test expectations in:
- src/plugin-handlers/config-handler.test.ts (lines 560, 620)
- src/agents/utils.test.ts (lines 1119, 1232, 1234, 1301, 1303, 1316, 1318)
2026-03-11 15:18:29 -06:00
acamq
5f419b7d9d Merge pull request #2473 from code-yeongyu/fix/sync-package-json-to-opencode-intent
fix(auto-update): sync cache package.json to opencode.json intent
2026-03-11 14:51:49 -06:00
acamq
d08754d1b4 fix(auto-update): pipe bun install output and restore other-deps preservation test
background-update-check.ts was using runBunInstall() which defaults to outputMode:"inherit", leaking bun install stdout/stderr into the background session. Reverted to runBunInstallWithDetails({ outputMode: "pipe" }) and explicitly logs result.error on failure.

Restores the accidentally deleted test case asserting that sibling dependencies (e.g. other:"1.0.0") are preserved in package.json after a plugin version sync.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 13:28:12 -06:00
acamq
e6e32d345e fix(auto-update): expand semver regex to support hyphenated prerelease tags
The previous pattern `(-[\w.]+)?` used `\w` which excludes hyphens, causing versions like `1.2.3-alpha-1` and `1.2.3-rc-test` to be misclassified as unpinned tags. Updated both plugin-entry.ts and sync-package-json.ts (which share the definition) to the spec-compliant pattern that allows dot-separated identifiers using [0-9A-Za-z-] and optional build metadata.

Also adds String() coercion before .trim() in sync-package-json.ts to guard against a TypeError if the parsed JSON value for currentVersion is non-string at runtime.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 13:28:04 -06:00
YeonGyu-Kim
7c89a2acf6 test: update gpt-5.4 fallback expectations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 02:24:47 +09:00
YeonGyu-Kim
57b4985424 fix(background-agent): delay session error task cleanup
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 02:24:42 +09:00
YeonGyu-Kim
f9c8392179 fix(tmux-subagent): cap stale close retries
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 02:24:35 +09:00
YeonGyu-Kim
cbb378265e fix(skill-mcp-manager): drop superseded stale clients
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 02:24:29 +09:00
YeonGyu-Kim
7997606892 fix(call-omo-agent): preserve reused session tracking
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 02:24:22 +09:00
YeonGyu-Kim
99730088ef fix: remove contaminated await change from FreeUsageLimitError PR
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:51:25 +09:00
YeonGyu-Kim
7870e43578 fix: preserve session provider context in fallback chain (#2295) 2026-03-12 01:49:16 +09:00
YeonGyu-Kim
9b792c3224 Merge pull request #2485 from code-yeongyu/fix/issue-2316-tool-after-error-boundary
fix: add error boundary around extract/discard hooks in tool-execute-after
2026-03-12 01:46:51 +09:00
YeonGyu-Kim
9d0b56d375 fix: unify LSP server PATH resolution between detection and spawn (#2431) 2026-03-12 01:44:06 +09:00
YeonGyu-Kim
305389bd7f fix: add error boundary around extract/discard hooks in tool-execute-after (#2316) 2026-03-12 01:41:07 +09:00
YeonGyu-Kim
e249333898 test(skill-mcp-manager): cover pending cleanup registration retention
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:40:34 +09:00
YeonGyu-Kim
810dd5848f test(skill-mcp-manager): cover disposed guard after disconnectAll
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:40:34 +09:00
YeonGyu-Kim
079c6b17b0 fix: add FreeUsageLimitError to RETRYABLE_ERROR_NAMES set (#2393) 2026-03-12 01:40:24 +09:00
YeonGyu-Kim
aa1aad3bb1 fix: add disposed guard to MCP manager and guard unregister on pending connections 2026-03-12 01:37:03 +09:00
YeonGyu-Kim
f564404015 fix: address review-work round 6 findings (dispose isolation, event dispatch, disconnectedSessions ref-counting) 2026-03-12 01:37:03 +09:00
YeonGyu-Kim
cf276322a3 fix(background-agent): handle async shutdown in process-cleanup signal handlers 2026-03-12 01:37:03 +09:00
YeonGyu-Kim
2c3c447dc4 fix: address review-work round 3 findings (async shutdown, signal generation, stale test name) 2026-03-12 01:37:03 +09:00
YeonGyu-Kim
ff536e992a fix: address review-work round 2 findings
- MCP teardown race: add shutdownGeneration counter to prevent
  in-flight connections from resurrecting after disconnectAll
- MCP multi-key disconnect race: replace disconnectedSessions Set
  with generation-based Map to track per-session disconnect events
- MCP clients: check shutdownGeneration in stdio/http client
  creators before inserting into state.clients
- BackgroundManager: call clearTaskHistoryWhenParentTasksGone after
  timer-based task removal in scheduleTaskRemoval and notifyParentSession
- BackgroundManager: clean completedTaskSummaries when parent has
  no remaining tasks
- Plugin dispose: remove duplicate tmuxSessionManager.cleanup call
  since BackgroundManager.shutdown already handles it via onShutdown
2026-03-12 01:37:03 +09:00
YeonGyu-Kim
03eaa429ce fix: address 5 edge cases from review-work findings
- C3: include command args in auto-slash-command dedup key
- H2: track completed task summaries for ALL COMPLETE message
- H9: increment tmux close retry count on re-mark
- H8: detect stale MCP connections after disconnect+reconnect race
- H8: guard disconnectedSessions growth for non-MCP sessions
- C1: await tmux cleanup in plugin dispose lifecycle
2026-03-12 01:37:03 +09:00
YeonGyu-Kim
b8aea50dfa test(background-agent): update completion timer test for per-task cleanup
Test expected timers only after allComplete, but H2 fix intentionally
decoupled per-task cleanup from sibling completion state. Updated
assertion to expect timer after individual task notification.
2026-03-12 01:37:03 +09:00
YeonGyu-Kim
deaac8cb39 fix(plugin): add dispose lifecycle for full teardown on reload
Plugin created managers, hooks, intervals, and process listeners on
every load but had no teardown mechanism. On plugin reload, old
instances remained alive causing cumulative memory leaks.

- Add createPluginDispose() orchestrating shutdown sequence:
  backgroundManager.shutdown() → skillMcpManager.disconnectAll() →
  disposeHooks()
- Add disposeHooks() aggregator with safe optional chaining
- Wire dispose into index.ts to clean previous instance on reload
- Make dispose idempotent (safe to call multiple times)

Tests: 4 pass, 8 expects
2026-03-12 01:37:03 +09:00
YeonGyu-Kim
b4e13883b1 fix(background-agent): fix 3 memory leaks in task lifecycle management
H3: cancelTask(skipNotification=true) now schedules task removal.
Previously the early return path skipped cleanup, leaking task objects
in this.tasks Map permanently. Extracted scheduleTaskRemoval() helper
called from both skipNotification and normal paths.

H2: Per-task completion cleanup timer decoupled from allComplete check.
Previously cleanup timer only ran when ALL sibling tasks completed. Now
each finished task gets its own removal timer regardless of siblings.

H1+C2: TaskHistory.clearAll() added and wired into shutdown(). Added
clearSession() calls on session error/deletion and prune cycles.
taskHistory was the only data structure missed by shutdown().

Tests: 10 pass (3 cancel + 3 completion + 4 history)
2026-03-12 01:37:03 +09:00
YeonGyu-Kim
d1fc6629c2 fix(skill-mcp-manager): remove process listeners on disconnect and guard connection races
H7: Process 'exit'/'SIGINT' listeners registered per-session were
never removed when all sessions disconnected, accumulating handlers.
- Add unregisterProcessCleanup() called in disconnectAll()

H8: Race condition where disconnectSession() during pending connection
left orphan clients in state.clients.
- Add disconnectedSessions Set to track mid-flight disconnects
- Check disconnect marker after connection resolves, close if stale
- Clear marker on reconnection for same session

Tests: 6 pass (3 disconnect + 3 race)
2026-03-12 01:37:03 +09:00
YeonGyu-Kim
fed720dd11 fix(tmux-subagent): retry pending pane closes to prevent zombie panes
When queryWindowState returned null during session deletion, the
session mapping was deleted but the real tmux pane stayed alive,
creating zombie panes.

- Add closePending/closeRetryCount fields to TrackedSession
- Mark sessions closePending instead of deleting on close failure
- Add retryPendingCloses() called from onSessionCreated and cleanup
- Force-remove mappings after 3 failed retry attempts
- Extract TrackedSessionState helper for field initialization

Tests: 3 pass, 9 expects
2026-03-12 01:37:02 +09:00
YeonGyu-Kim
a2f030e699 fix(todo-continuation-enforcer): expose prune interval for cleanup
Prune interval created inside hook was not exposed for disposal,
preventing cleanup on plugin unload.

- Add dispose() method that clears the prune interval
- Export dispose in hook return type

Tests: 2 pass, 6 expects
2026-03-12 01:37:02 +09:00
YeonGyu-Kim
2d2ca863f1 fix(runtime-fallback): clear monitoring interval on dispose
setInterval for model availability monitoring was never cleared,
keeping the hook alive indefinitely with no dispose mechanism.

- Add dispose() method to RuntimeFallbackHook that clears interval
- Track intervalId in hook state for cleanup
- Export dispose in hook return type

Tests: 3 pass, 10 expects
2026-03-12 01:37:02 +09:00
YeonGyu-Kim
f342dcfa12 fix(call-omo-agent): add finally cleanup for sync executor session Sets
Sync call_omo_agent leaked entries in global activeSessionMessages
and activeSessionToolResults Sets when execution threw errors,
since cleanup only ran on success path.

- Wrap session Set operations in try/finally blocks
- Ensure Set.delete() runs regardless of success/failure
- Add guard against double-cleanup

Tests: 2 pass, 14 expects
2026-03-12 01:37:02 +09:00
YeonGyu-Kim
7904410294 fix(auto-slash-command): bound Set growth with TTL eviction and session cleanup
processedCommands and recentResults Sets grew infinitely because
Date.now() in dedup keys made deduplication impossible and no
session.deleted cleanup existed.

- Extract ProcessedCommandStore with maxSize cap and TTL-based eviction
- Add session cleanup on session.deleted event
- Remove Date.now() from dedup keys for effective deduplication
- Add dispose() for interval cleanup

Tests: 3 pass, 9 expects
2026-03-12 01:37:02 +09:00
YeonGyu-Kim
3822423069 Merge pull request #2482 from code-yeongyu/fix/issue-2407-binary-version-embed
fix: sync root package.json version before binary compile
2026-03-12 01:34:33 +09:00
YeonGyu-Kim
e26088ba8f Merge pull request #2481 from code-yeongyu/fix/issue-2185-lsp-notification-params
fix: use rest params in LSP sendNotification to avoid undefined serialization
2026-03-12 01:34:29 +09:00
YeonGyu-Kim
7998667a86 Merge pull request #2480 from code-yeongyu/fix/issue-2356-preemptive-compaction-limit
fix: skip preemptive compaction when model context limit is unknown
2026-03-12 01:34:25 +09:00
YeonGyu-Kim
9eefbfe310 fix: restore await on metadata call in create-background-task (#2441) 2026-03-12 01:34:16 +09:00
YeonGyu-Kim
ef2017833d Merge pull request #2425 from MoerAI/fix/issue-2408-gemini-vertex-edit-schema
fix(hashline-edit): remove array type from lines union to fix Gemini Vertex schema validation
2026-03-12 01:32:37 +09:00
YeonGyu-Kim
994b9a724b Merge pull request #2424 from MoerAI/fix/issue-2386-custom-agent-summaries
fix(agents): pass custom agent summaries instead of client object to createBuiltinAgents
2026-03-12 01:32:35 +09:00
YeonGyu-Kim
142f8ac7d1 Merge pull request #2422 from MoerAI/fix/issue-2393-model-fallback-defaults
fix(model-fallback): enable by default and add missing error patterns for usage limits
2026-03-12 01:32:34 +09:00
YeonGyu-Kim
f5be99f911 Merge pull request #2420 from MoerAI/fix/issue-2375-run-in-background-default
fix(delegate-task): default run_in_background to false when orchestrator intent is detected
2026-03-12 01:32:31 +09:00
YeonGyu-Kim
182fe746fc Merge pull request #2476 from code-yeongyu/fix/issue-2441-session-id-pending
fix: omit sessionId from metadata when not yet assigned
2026-03-12 01:32:30 +09:00
YeonGyu-Kim
f61ee25282 Merge pull request #2475 from code-yeongyu/fix/issue-2300-compaction-event-dispatch
fix: register preemptive-compaction event handler in dispatchToHooks
2026-03-12 01:32:29 +09:00
YeonGyu-Kim
08b411fc3b fix: use rest params in LSP sendNotification to avoid undefined serialization (#2185)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:24:42 +09:00
YeonGyu-Kim
26091b2f48 fix: skip preemptive compaction when model context limit is unknown (#2356) 2026-03-12 01:24:16 +09:00
YeonGyu-Kim
afe3792ecf docs(config): correct background task default timeout description
Keep the background_task schema comment aligned with the runtime default so timeout guidance stays accurate.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:14:43 +09:00
YeonGyu-Kim
aaa54858a3 fix(background-agent): extend default no-progress stale timeout to 30 minutes
Give never-updated background tasks a longer default window and keep the default-threshold regression coverage aligned with that behavior.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:14:35 +09:00
YeonGyu-Kim
6d5175b9b0 fix(delegate-task): extend default sync poll timeout to 30 minutes
Keep synchronous subagent runs from timing out after 10 minutes when no explicit override is configured.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:14:26 +09:00
YeonGyu-Kim
f6125c5efa docs: refresh category model variant references
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:08:07 +09:00
YeonGyu-Kim
004f504e6c fix(agents): keep oracle available on first run without cache
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:07:57 +09:00
YeonGyu-Kim
f4f54c2b7f test(ralph-loop): remove volatile tool result timestamp
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:07:50 +09:00
YeonGyu-Kim
b9369d3c89 fix(config): preserve disabled arrays during partial parsing
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:07:43 +09:00
YeonGyu-Kim
88568398ac fix: sync root package.json version before binary compile (#2407) 2026-03-12 01:06:30 +09:00
YeonGyu-Kim
f2a7d227cb fix: omit sessionId from metadata when not yet assigned (#2441) 2026-03-12 01:02:12 +09:00
YeonGyu-Kim
39e799c596 docs: sync category model defaults
Update the public and internal docs to describe the new ultrabrain and unspecified-high defaults so the documented routing matches runtime behavior.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:00:41 +09:00
YeonGyu-Kim
7c29962014 fix(delegate-task): refresh built-in category defaults
Keep delegate-task category defaults in sync with the new routing policy so ultrabrain and unspecified-high resolve to the intended primary models.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:00:41 +09:00
YeonGyu-Kim
d2c2e8196b fix(shared): update category fallback priorities
Align ultrabrain with GPT-5.4 xhigh and move unspecified-high to Opus-first fallback order so category routing reflects the new model policy.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-12 01:00:41 +09:00
YeonGyu-Kim
4a67044cd6 fix: register preemptive-compaction event handler in dispatchToHooks (#2300) 2026-03-12 00:55:15 +09:00
YeonGyu-Kim
1c09b9869c Merge pull request #2474 from code-yeongyu/fix/regression-check-cleanup
fix: tighten Anthropic provider matching and fix look-at test isolation
2026-03-12 00:37:25 +09:00
YeonGyu-Kim
f1b5b1023f fix: tighten Anthropic provider matching and fix look-at test isolation
- Replace overly broad .includes('anthropic') with exact provider ID
  matching against known Anthropic providers (anthropic, google-vertex-
  anthropic, aws-bedrock-anthropic) in context-limit-resolver
- Add afterEach cleanup for vision-capable-models cache in look-at
  tool tests to prevent cross-test state leakage
2026-03-12 00:31:02 +09:00
acamq
c55603782c fix(auto-update): handle null JSON.parse and restore mocks on test failure 2026-03-11 08:08:30 -06:00
acamq
46a8ad279b Merge remote-tracking branch 'origin/dev' into fix/sync-package-json-to-opencode-intent 2026-03-11 08:04:16 -06:00
acamq
0764f0e563 fix(auto-update): sync cache package.json to opencode.json intent
When users switch from pinned version to tag in opencode.json (e.g.,
3.10.0 -> @latest), the cache package.json still contains the resolved
version. This causes bun install to reinstall the old version instead
of resolving the new tag.

This adds syncCachePackageJsonToIntent() which updates the cache
package.json to match user intent before running bun install. Uses
atomic writes (temp file + rename) with UUID-based temp names for
concurrent safety.

Critical changes:
- Treat all sync errors as abort conditions (file_not_found,
  plugin_not_in_deps, parse_error, write_error) to prevent corrupting
  a bad cache state further
- Remove dead code (unreachable revert branch for pinned versions)
- Add tests for all error paths and atomic write cleanup
2026-03-11 07:42:08 -06:00
YeonGyu-Kim
5ef391cb72 Merge pull request #2472 from code-yeongyu/fix/stagnation-detection-accuracy
fix(todo-continuation): improve stagnation detection accuracy
2026-03-11 22:05:58 +09:00
YeonGyu-Kim
387e83e2fc Merge pull request #2471 from code-yeongyu/fix/compaction-model-filter
fix(compaction): guard model update during compaction
2026-03-11 22:01:53 +09:00
YeonGyu-Kim
d22867db27 fix(todo-continuation): improve stagnation detection accuracy 2026-03-11 21:59:59 +09:00
YeonGyu-Kim
b129cccc83 Merge pull request #2469 from code-yeongyu/fix/multimodal-variant-metadata
fix(look-at): preserve variant metadata and block non-vision models
2026-03-11 21:58:51 +09:00
YeonGyu-Kim
7dddf99d9a Merge pull request #2470 from code-yeongyu/fix/terminal-task-retention-ttl
fix(background-agent): add TTL for terminal task retention
2026-03-11 21:57:33 +09:00
YeonGyu-Kim
6272e4321f Merge pull request #2468 from code-yeongyu/fix/shared-context-limit-resolver
fix(shared): extract shared context limit resolver to eliminate drift
2026-03-11 21:57:32 +09:00
YeonGyu-Kim
4956280042 Merge pull request #2467 from code-yeongyu/fix/spawn-sdk-error-fail-closed
fix(background-agent): handle SDK error response in spawn lineage lookup
2026-03-11 21:57:30 +09:00
YeonGyu-Kim
f5a792778e Merge pull request #2466 from code-yeongyu/fix/anti-dup-prometheus-metis
fix(agents): add anti-duplication rules to Prometheus and Metis
2026-03-11 21:57:28 +09:00
YeonGyu-Kim
7cca563af8 Merge pull request #2465 from code-yeongyu/fix/tmux-strict-parse
fix(tmux): strict integer parsing and isActive validation
2026-03-11 21:57:27 +09:00
YeonGyu-Kim
f7085450f1 fix(compaction): guard model update during compaction and validate checkpoint model 2026-03-11 21:57:06 +09:00
YeonGyu-Kim
a668860b86 fix: adjust vision capability check to not block when no model resolved
- Only block when a resolved model is explicitly not vision-capable
- Set up vision cache in model passthrough test for proper isolation
2026-03-11 21:56:19 +09:00
YeonGyu-Kim
0d9f001c11 fix(background-agent): add TTL for terminal task retention to prevent unbounded growth
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 21:52:48 +09:00
YeonGyu-Kim
ccfb5702ac fix: correct import path for buildAntiDuplicationSection in metis.ts 2026-03-11 21:48:08 +09:00
YeonGyu-Kim
85151f7dfd fix(look-at): preserve variant metadata in fallback chain and block non-vision models
- fallback-chain.ts: cache-derived entries inherit variant from matching hardcoded entries
- agent-metadata.ts: new isVisionCapableAgentModel() guard blocks non-vision registered models
- tools.ts: early vision-capability check before session creation
- Added regression tests for variant preservation and non-vision model rejection
2026-03-11 21:45:49 +09:00
YeonGyu-Kim
59f0f06e71 fix(shared): extract shared context limit resolver to eliminate monitor/truncator drift
- New context-limit-resolver.ts with resolveActualContextLimit() shared helper
- Anthropic provider detection now uses .includes('anthropic') instead of hard-coded IDs
- Both context-window-monitor and dynamic-truncator use the shared resolver
- Added missing test cases: Anthropic+1M disabled+cached limit, non-Anthropic without cache
2026-03-11 21:45:45 +09:00
YeonGyu-Kim
cc1c23032f fix(background-agent): handle SDK error response in spawn limit lineage lookup
- Check response.error and !response.data after session.get() to fail closed
- Prevents unlimited spawning when SDK returns non-throwing error responses
- Added regression tests for SDK error and missing data scenarios
2026-03-11 21:45:40 +09:00
YeonGyu-Kim
11423c97a7 fix(agents): add anti-duplication rules to Prometheus and Metis agents
- Import and inject buildAntiDuplicationSection() in all 3 Prometheus variants (interview-mode, gpt, gemini) and Metis
- Added tests verifying anti-dup section presence in all prompt variants
- Completes anti-duplication coverage for all delegating agents
2026-03-11 21:45:35 +09:00
YeonGyu-Kim
599ce0c283 fix(tmux): strict integer parsing and isActive validation in pane-state-parser
- parseInteger() now rejects malformed input like '120oops' using /^\d+$/ regex
- New parseActiveValue() validates active flag is exactly '0' or '1'
- Added regression tests for malformed integers, negative values, empty fields, non-binary active flags
2026-03-11 21:45:30 +09:00
YeonGyu-Kim
d4232c9eac Merge pull request #2464 from code-yeongyu/feat/gpt-last-message-continuation
Auto-continue GPT permission-seeking replies
2026-03-11 21:37:31 +09:00
YeonGyu-Kim
a6406c817f docs: document GPT permission continuation hook
Document the new continuation hook in the feature and configuration references so users can discover it and disable it through disabled_hooks.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 21:29:11 +09:00
YeonGyu-Kim
a1b060841f fix(continuation): auto-continue GPT permission-seeking replies
Resume GPT sessions when the last assistant reply ends in a permission-seeking tail, while honoring stop-continuation and avoiding duplicate continuation across todo and atlas flows.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 21:20:59 +09:00
YeonGyu-Kim
3f364cc8df Merge pull request #2451 from code-yeongyu/fix/issue-2238-v2
fix: prevent terminal corruption during background bun install
2026-03-11 21:04:43 +09:00
YeonGyu-Kim
de2b073fce test(auto-update-checker): type background update bun install mock
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 21:01:16 +09:00
YeonGyu-Kim
4b5c47172d Merge pull request #2449 from code-yeongyu/fix/issue-2330-v2
fix(background-agent): cap recursive subagent spawning
2026-03-11 21:00:34 +09:00
YeonGyu-Kim
594233183b fix(background-agent): fail closed on spawn lineage lookup errors
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:57:09 +09:00
YeonGyu-Kim
330def4539 Merge pull request #2456 from code-yeongyu/fix/issue-2292-v2
fix(background-agent): preserve terminal tasks until notification cleanup
2026-03-11 20:56:32 +09:00
YeonGyu-Kim
522ae81960 test(config-manager): add bun types reference for bun install test
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:56:22 +09:00
YeonGyu-Kim
9faff19b01 fix(auto-update-checker): suppress background bun install output
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:56:22 +09:00
YeonGyu-Kim
e3b17da4bd fix(background-agent): preserve terminal tasks until notification cleanup
Route terminal task cleanup through parent notifications so cancelled and errored tasks stay visible until delayed cleanup finishes.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:50:49 +09:00
YeonGyu-Kim
8c5f9b8082 fix(background-agent): skip terminal tasks during stale pruning
Prevent TTL pruning from deleting terminal tasks before delayed notification cleanup runs.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:50:49 +09:00
YeonGyu-Kim
3ccf378b2d fix(config-manager): support silent bun install execution
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:50:25 +09:00
YeonGyu-Kim
a179ebe0b9 Count sync subagent spawns against descendant limits 2026-03-11 20:50:11 +09:00
YeonGyu-Kim
4a39c83eb5 Limit recursive subagent spawning 2026-03-11 20:50:10 +09:00
YeonGyu-Kim
4ded281ee0 Merge pull request #2370 from code-yeongyu/fix/issue-2322
fix: stop stagnant todo continuation loops
2026-03-11 20:49:02 +09:00
YeonGyu-Kim
05c744da72 Merge pull request #2461 from code-yeongyu/fix/2448-regression
fix(agents): add anti-duplication rules to Atlas agent prompts
2026-03-11 20:44:46 +09:00
YeonGyu-Kim
404b8dcc0d Merge pull request #2460 from code-yeongyu/fix/2366-regression
fix: prioritize Anthropic 1M limits over cached context limits
2026-03-11 20:44:34 +09:00
YeonGyu-Kim
e7bda1630a Merge pull request #2459 from code-yeongyu/fix/2453-regression
fix(tmux): add barrel export for pane-state-parser and log parse failures
2026-03-11 20:44:33 +09:00
YeonGyu-Kim
554392e639 fix(agents): add anti-duplication rules to Atlas agent prompts 2026-03-11 20:38:46 +09:00
YeonGyu-Kim
4516b2e484 fix: prioritize Anthropic 1M limits over cached context limits 2026-03-11 20:38:44 +09:00
YeonGyu-Kim
899d265cbf fix(tmux): add barrel export for pane-state-parser and log parse failures 2026-03-11 20:36:57 +09:00
YeonGyu-Kim
d40d686014 Merge pull request #2378 from code-yeongyu/fix/issue-2232
fix(compaction): recover agent config after session compaction
2026-03-11 20:23:26 +09:00
YeonGyu-Kim
661def7f51 Merge pull request #2371 from code-yeongyu/fix/issue-2323
fix: respect multimodal provider vision capabilities
2026-03-11 20:22:35 +09:00
YeonGyu-Kim
3550305af8 Merge branch 'dev' into fix/issue-2232 2026-03-11 20:20:04 +09:00
YeonGyu-Kim
adc927f422 Merge pull request #2448 from code-yeongyu/fix/subagent-self-execute-v2
fix: prevent agents from duplicating delegated subagent work
2026-03-11 20:19:47 +09:00
YeonGyu-Kim
e513f663be fix: rename test file to .ts extension
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:16:16 +09:00
YeonGyu-Kim
0e093afb57 refactor: split oversized hook.ts to respect 200 LOC limit
- Extract types to types.ts
- Extract constants to constants.ts
- Extract session ID helpers to session-id.ts
- Extract recovery logic to recovery.ts

hook.ts reduced from 331 to 164 LOC

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:16:08 +09:00
YeonGyu-Kim
f142009bb0 fix: add anti-duplication rules to junior default prompt
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 20:10:25 +09:00
YeonGyu-Kim
3a980c53e6 Merge pull request #2366 from code-yeongyu/fix/issue-2338
fix: honor model-specific context limits for non-Anthropic models
2026-03-11 20:06:44 +09:00
YeonGyu-Kim
836ce97f07 Merge pull request #2453 from code-yeongyu/fix/issue-2241-v2
fix(tmux): handle single-pane pane-state parsing
2026-03-11 20:06:31 +09:00
YeonGyu-Kim
0eb447113e feat(cli): add --model option to run command for model override
Add -m, --model <provider/model> option to oh-my-opencode run command.
Allows users to override the model while keeping the agent unchanged.

Changes:
- Add model?: string to RunOptions interface
- Create model-resolver.ts to parse provider/model format
- Add model-resolver.test.ts with 7 test cases (TDD)
- Add --model CLI option with help text examples
- Wire resolveRunModel in runner.ts and pass to promptAsync
- Export resolveRunModel from barrel (index.ts)

Example usage:
  bunx oh-my-opencode run --model anthropic/claude-sonnet-4 "Fix the bug"
  bunx oh-my-opencode run --agent Sisyphus --model openai/gpt-5.4 "Task"
2026-03-11 19:42:46 +09:00
YeonGyu-Kim
d24ec336e5 Rebuild platform binary source maps after latest changes 2026-03-11 19:42:46 +09:00
YeonGyu-Kim
c52abe88f1 fix(tests): fix test isolation for cache-dependent tests
- Mock getOmoOpenCodeCacheDir to use temp directories

- Clear real cache files in beforeEach to prevent pollution

- Add top-level beforeEach/afterEach in model-availability.test.ts

- Use mock.module for proper test isolation

- Fixes model-error-classifier, model-availability, connected-providers-cache
2026-03-11 19:42:46 +09:00
YeonGyu-Kim
84cbd256e1 fix(tests): stabilize flaky session-notification test
- Add try/finally for fake timers cleanup

- Restore real timers in beforeEach/afterEach

- Use enforceMainSessionFilter: false for grace period tests

- Prevent timer state pollution between tests
2026-03-11 19:42:46 +09:00
YeonGyu-Kim
413e8b73b7 Add session permission support to background agents for denying questions
Implements question-denied session permission rules when creating child
sessions via background task delegation. This prevents subagents from
asking questions by passing explicit permission configuration during
session creation.

🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode
2026-03-11 19:42:46 +09:00
YeonGyu-Kim
24f4e14f07 Simplify poll completion test setup
Move repeated console suppression and abort scheduling into shared helpers so each test focuses on completion state transitions instead of harness noise.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 19:42:46 +09:00
YeonGyu-Kim
339ece93f6 Strengthen sync executor test coverage
Cover metadata output and prompt failure branches so the sync executor is verified by its returned contract, not only tool flag plumbing.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 19:42:46 +09:00
YeonGyu-Kim
09a3c54f85 Restructure background update checker tests
Collapse duplicate no-op scenarios into a state table and assert user-visible update outcomes instead of narrow call plumbing.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 19:42:46 +09:00
YeonGyu-Kim
55aa1c0054 Refine auto-update checker hook tests
Make the hook tests deterministic by replacing repeated fixed waits with a small scheduling helper and shared event trigger paths.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 19:42:45 +09:00
YeonGyu-Kim
cbceb3cd0d Preserve ultrawork runtime variants
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 19:42:45 +09:00
YeonGyu-Kim
a3fe161158 Merge pull request #2447 from devxoul/fix/auto-update-sync-cache-package-json
fix(auto-update): sync cache package.json to opencode.json intent
2026-03-11 19:34:00 +09:00
YeonGyu-Kim
d1e37a5079 Merge pull request #2333 from devxoul/feat/claude-model-mapper
feat(claude): map Claude Code model strings to OpenCode format when importing agents
2026-03-11 19:33:51 +09:00
YeonGyu-Kim
38ac3d095a Merge pull request #2332 from devxoul/feat/git-master-env-prefix
feat(git-master): add GIT_MASTER=1 env prefix for all git commands
2026-03-11 19:33:50 +09:00
YeonGyu-Kim
0c52d42f8b fix(todo-continuation-enforcer): gate stagnation on successful injections
Keep failed or skipped injections on the MAX_CONSECUTIVE_FAILURES path so unchanged todos do not trip stagnation first.
2026-03-11 18:39:54 +09:00
YeonGyu-Kim
398b556f23 Merge pull request #2364 from code-yeongyu/fix/issue-2240
fix(doctor): prefer config dir for loaded plugin version
2026-03-11 18:29:51 +09:00
YeonGyu-Kim
e99e638e45 fix(compaction): validate recovered agent config state
Retry compaction recovery when model or tool state is still incomplete, and treat reasoning or tool-only assistant progress as valid output so no-text tail recovery does not misfire.
2026-03-11 18:23:59 +09:00
YeonGyu-Kim
f28ee0e21a fix(background-task): default background_output to full session 2026-03-11 18:17:49 +09:00
YeonGyu-Kim
7de80e6717 fix(context-window-monitor): show actual reminder limits 2026-03-11 18:17:26 +09:00
YeonGyu-Kim
b590d8335f test(todo-continuation-enforcer): cover stagnation progress edge cases
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 17:56:54 +09:00
YeonGyu-Kim
5952bbabb4 fix(todo-continuation-enforcer): pass todos into stagnation tracking
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 17:56:49 +09:00
YeonGyu-Kim
51bf823893 fix(todo-continuation-enforcer): track todo state changes for stagnation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 17:56:43 +09:00
YeonGyu-Kim
e1b59e3d67 Use dedicated pane state parser
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 17:55:53 +09:00
YeonGyu-Kim
5168ae0f3b Add pane state parser with test coverage
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 17:55:48 +09:00
YeonGyu-Kim
b6329b6044 Merge pull request #2450 from code-yeongyu/fix/combined-npm-badge
fix: use combined npm downloads badge (oh-my-opencode + oh-my-openagent)
2026-03-11 17:50:04 +09:00
YeonGyu-Kim
e1ff18ca12 fix: use combined npm downloads badge for both packages
Replace single-package npm/dt badge with shields.io endpoint badge
that combines downloads from both oh-my-opencode and oh-my-openagent.

Endpoint: https://ohmyopenagent.com/api/npm-downloads
2026-03-11 17:49:43 +09:00
YeonGyu-Kim
e4fd29ac8b fix: prevent agents from duplicating delegated subagent work
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 17:42:42 +09:00
YeonGyu-Kim
70edea2d7f Merge pull request #2397 from code-yeongyu/fix/browser-provider-skill-context-playwright
fix(skill-context): gate discovered browser skills by provider
2026-03-11 17:30:37 +09:00
YeonGyu-Kim
35df4d5d1b Merge pull request #2372 from code-yeongyu/fix/issue-2314
fix(plugin): preserve cross-zod tool arg metadata
2026-03-11 17:27:00 +09:00
Jeon Suyeol
07e05764dd Sync cache package.json to opencode.json intent before auto-update bun install 2026-03-11 17:16:58 +09:00
YeonGyu-Kim
a70e7fe742 test(git-master): cover full git command prefix injection 2026-03-11 17:07:43 +09:00
YeonGyu-Kim
02fec3ddb1 test(git-master): cover git_env_prefix validation 2026-03-11 17:07:38 +09:00
YeonGyu-Kim
bf9721d4ee fix(git-master): prefix git commands in injected templates 2026-03-11 17:07:33 +09:00
YeonGyu-Kim
c288ad7124 feat(git-master): validate git_env_prefix values 2026-03-11 17:07:29 +09:00
YeonGyu-Kim
c6ea3f4aff map Claude Code model strings to OpenCode format with proper object structure 2026-03-11 17:07:23 +09:00
YeonGyu-Kim
e2cf9c677c Align ast-grep fallback downloader version
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 15:48:42 +09:00
YeonGyu-Kim
5b5235c000 Bump AST tooling and Bun types in root manifest
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 15:44:32 +09:00
YeonGyu-Kim
a883647b46 Bump OpenCode SDK packages in root manifest
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 15:43:03 +09:00
YeonGyu-Kim
41c7c71d0d Remove unused benchmark OpenAI SDK dependency 2026-03-11 15:33:05 +09:00
YeonGyu-Kim
29e1136813 Guard ultrawork variant overrides with SDK metadata
Ultrawork now checks provider SDK metadata before forcing a variant, so unsupported variants are skipped instead of being written into the message state.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-11 15:33:05 +09:00
github-actions[bot]
3ba4ada04c @win0na has signed the CLA in code-yeongyu/oh-my-openagent#2446 2026-03-11 06:16:36 +00:00
Winona Bryan
d62a586be4 fix(momus): make keyTrigger specify file-path-only invocation requirement
The previous keyTrigger ('Work plan created → invoke Momus') was too
vague — Sisyphus would fire Momus on inline plans or todo lists,
causing Momus to REJECT because its input_extraction requires exactly
one .sisyphus/plans/*.md file path.

The updated trigger explicitly states:
- Momus should only be invoked when a plan file exists on disk
- The file path must be the sole prompt content
- Inline plans and todo lists should NOT trigger Momus
2026-03-11 02:13:21 -04:00
github-actions[bot]
77563b92d6 @zztdandan has signed the CLA in code-yeongyu/oh-my-openagent#2444 2026-03-11 03:27:33 +00:00
github-actions[bot]
ab039d9e6c @tc9011 has signed the CLA in code-yeongyu/oh-my-openagent#2443 2026-03-11 02:43:29 +00:00
github-actions[bot]
427c135818 @hehe226 has signed the CLA in code-yeongyu/oh-my-openagent#2438 2026-03-11 01:43:25 +00:00
acamq
17de67c7d1 Merge pull request #2440 from code-yeongyu/revert-2439-fix/sync-package-json-to-opencode-intent
Revert "fix(auto-update): sync cache package.json to opencode.json intent"
2026-03-10 18:42:48 -06:00
acamq
b5c598af2d Revert "fix(auto-update): sync cache package.json to opencode.json intent" 2026-03-10 18:42:37 -06:00
Sisyphus
a4ee0d2167 Merge pull request #2439 from acamq/fix/sync-package-json-to-opencode-intent
fix(auto-update): sync cache package.json to opencode.json intent
2026-03-11 09:34:56 +09:00
acamq
094bcc8ef2 fix(auto-update): sync cache package.json to opencode.json intent
When users switch opencode.json from pinned version to tag (e.g., 3.10.0 -> @latest),
the cache package.json still contains the pinned version. This causes bun install
to reinstall the old version instead of resolving the new tag.

This adds syncCachePackageJsonToIntent() which updates the cache package.json
to match the user's declared intent in opencode.json before running bun install.

Also fixes mock.module in test files to include all exported constants,
preventing module pollution across parallel tests.
2026-03-10 16:15:15 -06:00
github-actions[bot]
d74b41569e @cphoward has signed the CLA in code-yeongyu/oh-my-openagent#2437 2026-03-10 19:23:00 +00:00
acamq
31d54b24a2 Merge pull request #2352 from rluisr/fix/register-sisyphus-junior-as-builtin-agent
fix: register sisyphus-junior as builtin agent
2026-03-10 09:39:34 -06:00
github-actions[bot]
160e966074 @zengxiaolou has signed the CLA in code-yeongyu/oh-my-openagent#2433 2026-03-10 12:43:35 +00:00
YeonGyu-Kim
35ad5ae685 Merge pull request #2409 from ualtinok/fix/bgpollfix
fix(delegate-task): abort sync sessions on timeout and parent abort
2026-03-10 18:41:50 +09:00
MoerAI
204322b120 fix(hashline-edit): remove array type from lines union to fix Gemini Vertex schema validation (#2408) 2026-03-10 17:18:14 +09:00
MoerAI
46c3bfcf1f fix(agents): pass custom agent summaries instead of client object to createBuiltinAgents (#2386) 2026-03-10 17:10:55 +09:00
MoerAI
059853554d fix(model-fallback): enable by default and add missing error patterns for usage limits (#2393) 2026-03-10 17:04:17 +09:00
MoerAI
49b7e695ce fix(delegate-task): default run_in_background to false when orchestrator intent is detected (#2375) 2026-03-10 16:57:47 +09:00
guazi04
309a3e48ec fix(tmux): handle serverUrl throw getter from upstream opencode refactor 2026-03-10 15:45:44 +08:00
YeonGyu-Kim
b7731f5520 Merge pull request #2417 from code-yeongyu/fix/repo-name-confusion
docs: update all GitHub URLs from oh-my-opencode to oh-my-openagent
2026-03-10 15:42:02 +09:00
YeonGyu-Kim
4200574dd0 docs: fix cd path and branch URL per review feedback 2026-03-10 15:31:03 +09:00
YeonGyu-Kim
a2fd6d77bd docs: update all GitHub URLs from oh-my-opencode to oh-my-openagent
The GitHub repository was renamed from oh-my-opencode to oh-my-openagent,
but all documentation, scripts, and source code references still pointed
to the old repository name. This caused confusion for users who saw
'oh-my-opencode' in docs but a different repo name on GitHub.

Updated all references across:
- README files (en, ko, ja, zh-cn, ru)
- CONTRIBUTING.md
- docs/ (installation, overview, configuration, etc.)
- Source code (schema URLs, GitHub API calls, issue links)
- Test snapshots

The npm package name remains 'oh-my-opencode' (unchanged).

Fixes: https://x.com/Dhruv14588676/status/2031216617762468348
2026-03-10 15:18:16 +09:00
Kenny
85e7a24e26 Merge pull request #2413 from code-yeongyu/docs/readme-maintainer-delay-notice
docs: clarify temporary maintainer delay notice headings
2026-03-10 11:27:04 +08:00
Kenny
db42edd547 docs: clarify temporary maintainer delay notice headings 2026-03-10 11:21:06 +08:00
ismeth
2836919954 Abort sync sessions on timeout and parent abort 2026-03-09 18:55:12 +01:00
YeonGyu-Kim
61867b31e5 Fix connected providers cache type
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-09 23:37:16 +09:00
YeonGyu-Kim
ea61856021 Fix session notification scheduler notification check
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-09 23:37:12 +09:00
YeonGyu-Kim
b9d54ed881 Rebuild platform binaries
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-09 23:37:06 +09:00
YeonGyu-Kim
2919ec7256 Tune OpenAI-only model catalog variants
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-09 18:31:17 +09:00
rluisr
123f73c2c8 fix: update model-requirements test to include sisyphus-junior (11 agents) 2026-03-09 14:12:39 +09:00
YeonGyu-Kim
39cbe11432 Merge pull request #2302 from RaviTharuma/fix/runtime-fallback-cooldown-session-status
Fix cooldown fallback switching across runtime/model fallback hooks
2026-03-09 13:38:46 +09:00
YeonGyu-Kim
9e07f1d32b Merge pull request #2328 from mrosnerr/fix/background-result-collection-wait-behavior
fix(agents): prevent orchestrator from rushing ahead of background agents
2026-03-09 13:23:14 +09:00
YeonGyu-Kim
7d1607dc16 fix: align sync fallback chain, fix model-fallback test determinism
- Hoist resolveFallbackChainForCallOmoAgent before sync/background branch
  so sync executor also receives the fallback chain
- Add fallbackChain parameter to sync-executor with setSessionFallbackChain
- Mock connected-providers-cache in event.model-fallback tests for
  deterministic behavior (no dependency on local cache files)
- Update test expectations to account for no-op fallback skip when
  normalized current model matches first fallback entry
- Add cache spy isolation for subagent-resolver fallback_models tests
2026-03-09 13:11:03 +09:00
YeonGyu-Kim
f1f682c3ab fix(agents): apply background agent result prompt update to all sisyphus variants
The prompt update from sisyphus.ts was not applied to the gpt-5-4 and
default variant files. This aligns all three sisyphus prompt variants
to use the updated background result handling guidance.
2026-03-09 13:10:57 +09:00
Ravi Tharuma
c598afa521 Address PR review follow-ups for retry status handling 2026-03-09 12:43:30 +09:00
Ravi Tharuma
86c6bc7716 Unify dynamic fallback chains for background subagents 2026-03-09 12:43:30 +09:00
Ravi Tharuma
38c925697b Respect per-agent fallback chains in runtime fallback 2026-03-09 12:43:01 +09:00
Ravi Tharuma
4300f60aaf Detect runtime retry signals from assistant text parts 2026-03-09 12:43:01 +09:00
Ravi Tharuma
e65433861c Stabilize provider assertions after rebase 2026-03-09 12:43:01 +09:00
Ravi Tharuma
f2d23a8a36 Make fallback provider selection provider-agnostic 2026-03-09 12:43:01 +09:00
Ravi Tharuma
eab5be666d Fix cooldown fallback switching across model/runtime fallback hooks 2026-03-09 12:43:01 +09:00
mrosnerr
2f06f2c3b9 fix(agents): prevent orchestrator from rushing ahead of background agents
Tighten Background Result Collection instructions so the model waits
for explore/librarian results instead of duplicating their work and
delivering premature answers.

- Remove 'Continue working immediately' which models interpreted as
  'do ALL work yourself, ignore agents'
- Clarify step 2: only do DIFFERENT independent work while waiting
- Add explicit step 3: end response when no other work remains
- Add 'not for files you already know' to explore section header

Fixes #2124, fixes #1967
2026-03-09 12:41:58 +09:00
YeonGyu-Kim
53337ad68f fix(atlas): append idle subagent sessions to active boulder
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-09 12:37:21 +09:00
YeonGyu-Kim
1120885fd0 fix(background-agent): release interrupted task slots during startup cleanup
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-09 12:36:49 +09:00
github-actions[bot]
18f84fef93 @conversun has signed the CLA in code-yeongyu/oh-my-openagent#2399 2026-03-09 03:02:30 +00:00
YeonGyu-Kim
85aa744c8a fix(background-agent): clear toast tracking when tasks stop
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-09 11:39:04 +09:00
YeonGyu-Kim
c9402b96fc fix(claude-code-hooks): compact transcript tool results for diff-heavy metadata
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-09 11:28:04 +09:00
YeonGyu-Kim
4f088c7ab8 test(plugin): run tool output truncation before claude transcript hooks
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-09 11:27:58 +09:00
YeonGyu-Kim
0aae45c95f Merge pull request #2396 from code-yeongyu/fix/lsp-directory-diagnostics-followup
fix(lsp): make directory diagnostics output actionable
2026-03-09 11:20:55 +09:00
YeonGyu-Kim
dc23e63fa6 test(lsp): avoid leaking directory diagnostics mocks across tests 2026-03-09 11:16:38 +09:00
YeonGyu-Kim
1528e46faa fix(skill-context): gate discovered browser skills by provider
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-09 11:16:24 +09:00
YeonGyu-Kim
4517699d5e fix(atlas): clarify capped directory diagnostics guidance 2026-03-09 11:09:13 +09:00
YeonGyu-Kim
f78d811f84 fix(lsp): include file paths in directory diagnostics output 2026-03-09 11:09:13 +09:00
acamq
c09ff7a72c Merge pull request #2390 from acamq/fix/think-variant-switcher
fix(think-mode): remove modelID modification, only set variant
2026-03-08 20:01:36 -06:00
acamq
59e468db34 Merge pull request #2391 from acamq/feature/lsp-directories
feat(lsp): add directory support to lsp_diagnostics via extension param
2026-03-08 19:51:39 -06:00
sisyphus-dev-ai
8c366d255b chore: changes by sisyphus-dev-ai 2026-03-09 01:49:29 +00:00
YeonGyu-Kim
d553bb75a4 Allow registered atlas boulder sessions to continue on idle
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-09 10:45:12 +09:00
github-actions[bot]
ee8c659e1b @jainnam-1993 has signed the CLA in code-yeongyu/oh-my-openagent#2394 2026-03-09 01:39:48 +00:00
acamq
2e8f0835d8 Merge pull request #2306 from Romanok2805/fix/builtin-agent-mode-override
fix(agents): prevent user/project .md agents from overriding builtin agent modes
2026-03-08 18:57:59 -06:00
acamq
5713106526 Merge pull request #2284 from MoerAI/fix/tmux-list-panes-parsing
fix(tmux): handle \r line endings and missing pane_title in list-panes
2026-03-08 18:18:31 -06:00
acamq
b2f97dde55 Merge pull request #2196 from acamq/fix/toolcall-format
fix(hephaestus): add tool call format instructions to prevent malformed output
2026-03-08 17:31:42 -06:00
acamq
39600617cb Merge pull request #2380 from acamq/fix/auto-updater-paths
fix(auto-update-checker): use OpenCode cache paths for updates
2026-03-08 17:04:15 -06:00
acamq
f10500f97b Merge remote-tracking branch 'upstream/dev' into fix/toolcall-format 2026-03-08 17:02:21 -06:00
acamq
ecdc835b13 fix(lsp): improve code quality in directory diagnostics
- Dedupe directory-checking logic: findWorkspaceRoot now uses isDirectoryPath helper
- Add early return when no files match extension to avoid starting LSP server unnecessarily
2026-03-08 16:56:33 -06:00
github-actions[bot]
1ee28ba893 @davincilll has signed the CLA in code-yeongyu/oh-my-openagent#2392 2026-03-08 18:32:36 +00:00
YeonGyu-Kim
a7d8c1cdf4 feat: dual-publish platform binaries for oh-my-openagent
After publishing oh-my-opencode-{platform}, rename package.json and
publish oh-my-openagent-{platform} from the same build artifact.
Download/extract steps now run if either package needs publishing.
2026-03-09 02:56:01 +09:00
acamq
c4112f80db fix(auto-updater): handle bun.lockb and add workspace validation
- Support binary bun.lockb format by deleting entire file (cannot parse)
- Add workspace check: verify package.json exists before bun install
- Quote paths in error messages for Windows/paths with spaces
2026-03-08 09:15:13 -06:00
acamq
05a5c010ab docs(think-mode): document getHighVariant deprecation
Add deprecation notice explaining that getHighVariant() is no longer
used by the hook. Function is kept for backward compatibility and
potential future validation use.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 09:13:07 -06:00
acamq
ccd4dceaf2 fix(think-mode): remove overly broad Korean keyword
Remove '고민' from MULTILINGUAL_KEYWORDS as it triggers false
positives in everyday Korean speech. The keyword '생각' (thinking)
remains for intentional think-mode activation.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 09:12:29 -06:00
acamq
89a4d22354 test(think-mode): update tests for variant-only behavior
Update test assertions to verify hook only sets output.message.variant
and no longer modifies output.message.model.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 09:12:13 -06:00
acamq
96a80bb09b fix(think-mode): remove modelID modification, only set variant
The hook was incorrectly setting output.message.model.modelID to non-existent
variants like gpt-5-nano-high, causing ProviderModelNotFoundError.

OpenCode's native variant system only needs the variant field - it handles
the transformation automatically.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 09:12:01 -06:00
YeonGyu-Kim
beb89faa0f Merge pull request #2388 from code-yeongyu/fix/background-output-undefined-status-2387
fix: handle undefined sessionStatus in pollRunningTasks (#2387)
2026-03-08 23:54:58 +09:00
YeonGyu-Kim
dc370f7fa8 fix: handle undefined sessionStatus in pollRunningTasks (#2387)
When a completed session is no longer returned by session.status(),
allStatuses[sessionID] is undefined. Previously this fell through to
a 'still running' log, leaving the task stuck as running forever.

Match the sync-session-poller pattern: only continue (skip completion
check) when sessionStatus EXISTS and is not idle. When undefined,
fall through to validateSessionHasOutput + checkSessionTodos +
tryCompleteTask, same as idle.
2026-03-08 23:42:11 +09:00
github-actions[bot]
a5fe6eb1a6 @vaur94 has signed the CLA in code-yeongyu/oh-my-openagent#2385 2026-03-08 14:02:29 +00:00
acamq
f89cc969ec test(auto-update-checker): stabilize cache invalidation module isolation
Mock constants directly in cache.test to avoid transitive module-cache reuse when importing cache.ts. This removes Date.now query cache-busting and makes the test deterministic across runs.
2026-03-07 16:13:51 -07:00
acamq
9a44e29509 Merge upstream/dev into fix/auto-updater-paths 2026-03-07 16:01:28 -07:00
acamq
a7d5e683c7 fix(auto-update-checker): use OpenCode cache paths for updates
Align version lookup, invalidation, and bun install with OpenCode's cache directory so updates target the loaded plugin location. Keep dependency declarations intact during invalidation so auto-update can reinstall instead of converging to uninstall.
2026-03-07 15:56:21 -07:00
YeonGyu-Kim
26ae247f4f test(doctor): isolate loaded version module import
Load the doctor loaded-version module through a unique test-only specifier so Bun module mocks from system tests cannot leak into the real module assertions in CI.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 07:07:06 +09:00
acamq
ba6fc35abd Merge pull request #2376 from acamq/fix/idle-notification-grace-period
fix(session-notification): add grace period to prevent late events from cancelling idle notifications
2026-03-07 14:46:25 -07:00
acamq
9b4c826d01 chore: restore bun.lock from dev 2026-03-07 14:39:04 -07:00
github-actions[bot]
8a827f9927 @acamq has signed the CLA in code-yeongyu/oh-my-openagent#2012 2026-03-07 21:32:30 +00:00
CrazyRabbit
4e352f9caf fix(session-notification): add grace period to prevent late events from cancelling idle notifications 2026-03-07 14:07:08 -07:00
acamq
621cad7268 Merge pull request #2230 from Chocothin/fix/respect-config-question-permission
fix(tool-config): respect question permission from OPENCODE_CONFIG_CONTENT
2026-03-07 14:02:47 -07:00
acamq
ab5a713d2d Merge pull request #2291 from SeeYouCowboi/fix/cache-dir-invalidation-stale-version
fix: also invalidate plugin from CACHE_DIR in invalidatePackage
2026-03-07 13:10:15 -07:00
acamq
858b10df6f feat(lsp): add directory support to lsp_diagnostics via extension param
- Add isDirectoryPath helper to lsp-client-wrapper.ts
- Create directory-diagnostics.ts with aggregateDiagnosticsForDirectory
- Update diagnostics-tool.ts with extension parameter for directory paths
- Update Atlas agent prompts to use extension param for directory diagnostics
- Add unit tests for isDirectoryPath and aggregateDiagnosticsForDirectory

Fixes #2362
2026-03-07 13:05:58 -07:00
YeonGyu-Kim
adaeaca8e9 fix: add NODE_AUTH_TOKEN to publish-main job for npm auth
The publish-main job relied on npm trusted publishing (OIDC) which
broke after the repo rename from oh-my-opencode to oh-my-openagent.
Adding explicit NODE_AUTH_TOKEN restores auth while --provenance
still uses OIDC for Sigstore attestation.

Fixes #2373
2026-03-08 03:36:52 +09:00
YeonGyu-Kim
63ed7a5448 fix: update repository URLs to oh-my-openagent for npm provenance
npm --provenance validates repository.url against the actual GitHub
repo. Since the repo was renamed to oh-my-openagent, all platform
binary publishes failed with E422 provenance mismatch.
2026-03-08 02:59:40 +09:00
YeonGyu-Kim
e2444031ff ci(publish): deploy both oh-my-opencode and oh-my-openagent simultaneously 2026-03-08 02:31:26 +09:00
YeonGyu-Kim
719a35edc8 fix(plugin): capture compaction context during compaction
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:23:51 +09:00
YeonGyu-Kim
df36efacf4 fix(plugin): dispatch compaction context hook events
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:23:46 +09:00
YeonGyu-Kim
65edddac41 fix(plugin): wire compaction context hook creation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:23:41 +09:00
YeonGyu-Kim
2b5dec5333 fix(background-agent): use compaction-aware prompt context in manager
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:23:33 +09:00
YeonGyu-Kim
c789baf1d9 fix(background-agent): merge prompt context across compaction gaps
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:23:27 +09:00
YeonGyu-Kim
b7170b2de5 fix(compaction): recover checkpointed agent config after compaction
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:23:22 +09:00
YeonGyu-Kim
67a30cd15f fix(compaction): resolve prompt config from recent session context
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:23:16 +09:00
YeonGyu-Kim
90be61b45b fix(compaction): add checkpoint store for session agent config
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:23:11 +09:00
YeonGyu-Kim
d84c28dbab fix(plugin): preserve cross-zod tool arg metadata
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:21:42 +09:00
YeonGyu-Kim
5d31bf46fa fix(look-at): resolve multimodal models from vision-capable providers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:20:48 +09:00
YeonGyu-Kim
8b0ca63bbb fix(look-at): build dynamic multimodal fallback chain
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:20:42 +09:00
YeonGyu-Kim
dd680357ae fix(plugin-handlers): cache vision-capable provider models
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:20:34 +09:00
YeonGyu-Kim
f80181199b fix(shared): add vision-capable model cache store
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:20:25 +09:00
YeonGyu-Kim
4eb8a2fa15 fix(plugin-state): track vision-capable multimodal models
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:20:20 +09:00
YeonGyu-Kim
fe12fc68b1 fix(todo-continuation-enforcer): stop idle continuation after repeated stagnation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:18:08 +09:00
YeonGyu-Kim
e65366b5ce fix(todo-continuation-enforcer): add stagnation guard helper
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:18:00 +09:00
YeonGyu-Kim
07e8b32ed1 fix(todo-continuation-enforcer): track continuation stagnation state
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:17:51 +09:00
YeonGyu-Kim
d7349b62da fix(todo-continuation-enforcer): add stagnation state fields
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:17:44 +09:00
YeonGyu-Kim
0ae4812bee fix(todo-continuation-enforcer): add stagnation limit constant
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:17:38 +09:00
YeonGyu-Kim
b5e222b792 fix(tool-output-truncator): accept model context limit cache state
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:10:56 +09:00
YeonGyu-Kim
fdabebe889 fix(dynamic-truncator): use provider-aware context limits
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:10:48 +09:00
YeonGyu-Kim
17707ee835 fix(context-window-monitor): use model-specific context limits
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:10:40 +09:00
YeonGyu-Kim
740d39e13a fix(doctor): prefer config dir for loaded plugin version
Check the OpenCode config install before the legacy cache install so doctor reports the actual loaded plugin version for bun-based installs.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 02:08:37 +09:00
YeonGyu-Kim
f3be710a73 release: v3.11.0 2026-03-08 01:59:20 +09:00
YeonGyu-Kim
01efda454f feat(model-requirements): set multimodal-looker primary model to gpt-5.4 medium
Change multimodal-looker's primary model from gpt-5.3-codex to gpt-5.4 medium
in both runtime and CLI fallback chains.

Changes:
- Runtime chain (src/shared/model-requirements.ts): primary now gpt-5.4
- CLI chain (src/cli/model-fallback-requirements.ts): primary now gpt-5.4
- Updated test expectations in model-requirements.test.ts
- Updated config-manager.test.ts assertion
- Updated model-fallback snapshots
2026-03-08 01:53:30 +09:00
YeonGyu-Kim
60bc9a7609 feat(model-requirements): add k2p5, kimi-k2.5, gpt-5.4 medium to Sisyphus fallback chain
Sisyphus can now fall back through Kimi and OpenAI models when Claude
is unavailable, enabling OpenAI-only users to use Sisyphus directly
instead of being redirected to Hephaestus.

Runtime chain: claude-opus-4-6 max → k2p5 → kimi-k2.5 → gpt-5.4 medium → glm-5 → big-pickle
CLI chain: claude-opus-4-6 max → k2p5 → gpt-5.4 medium → glm-5
2026-03-08 01:41:45 +09:00
YeonGyu-Kim
bf8d0ffcc0 fix(atlas): enforce checkbox completion before next task
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-08 01:41:45 +09:00
YeonGyu-Kim
532143c5f4 feat(delegate-task): use explicit high variant for unspecified-high category
- Update DEFAULT_CATEGORIES to use 'openai/gpt-5.4-high' directly instead of separate model + variant
- Add helper functions (isExplicitHighModel, getExplicitHighBaseModel) to preserve explicit high models during fuzzy matching
- Update category resolver to avoid collapsing explicit high models to base model + variant pair
- Update tests to verify explicit high model handling in both background and sync modes
- Update documentation examples to reflect new configuration

🤖 Generated with OhMyOpenCode assistance
2026-03-08 01:41:45 +09:00
github-actions[bot]
5e86b22cee @hobostay has signed the CLA in code-yeongyu/oh-my-openagent#2360 2026-03-07 13:54:05 +00:00
github-actions[bot]
6660590276 @rluisr has signed the CLA in code-yeongyu/oh-my-openagent#2352 2026-03-07 07:47:56 +00:00
rluisr
2594a1c5aa fix: register sisyphus-junior as builtin agent across type system and model fallback
Sisyphus-Junior was missing from BuiltinAgentName type, agentSources map,
barrel exports, and AGENT_MODEL_REQUIREMENTS. This caused type inconsistencies
and prevented model-fallback hooks from working for sisyphus-junior sessions.

Closes code-yeongyu/oh-my-openagent#1697
2026-03-07 16:45:32 +09:00
YeonGyu-Kim
b3ef86c574 fix(atlas): skip compaction in last-agent recovery
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-07 15:39:25 +09:00
YeonGyu-Kim
e193002775 fix(plugin): ignore compaction session agent updates
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-07 15:39:25 +09:00
acamq
f5f996983e Merge pull request #2252 from acamq/fix/librarian-exa-name
fix: correct librarian agent tool name from websearch_exa_web_search_exa to websearch_web_search_exa
2026-03-06 22:11:42 -07:00
acamq
b717d26880 Merge pull request #2278 from MoerAI/fix/tmux-health-check-url
fix(tmux): use correct health check endpoint /global/health
2026-03-06 21:37:09 -07:00
acamq
51de6f18ee Merge pull request #2334 from devxoul/fix/flaky-background-task-test
fix(test): fix flaky late-session-id background task test
2026-03-06 20:48:50 -07:00
acamq
2ae63ca590 Merge pull request #2350 from wousp112/fix/git-plugin-prepare
fix(install): build dist for git-based plugin installs
2026-03-06 20:13:46 -07:00
github-actions[bot]
a245abe07b @wousp112 has signed the CLA in code-yeongyu/oh-my-openagent#2350 2026-03-06 23:14:57 +00:00
YeonGyu-Kim
58052984ff remove trash 2026-03-07 06:42:58 +09:00
YeonGyu-Kim
58d4f8b40a Revert "Merge pull request #2339 from JimMoen/fix/external-directory-default-ask"
This reverts commit 8a1352fc9b, reversing
changes made to d08bc04e67.
2026-03-07 06:40:19 +09:00
wousp112
f6d8d44aba fix(install): build dist for git-based plugin installs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 21:25:51 +00:00
YeonGyu-Kim
8ec2c44615 fix(ulw-loop): retry parent session after failed verification
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-07 05:46:05 +09:00
YeonGyu-Kim
fade6740ae chore: update GPT-5.2 references to GPT-5.4
Align runtime defaults, tests, docs, and generated artifacts with the newer GPT-5.4 baseline. Keep think-mode and prompt-routing expectations consistent after the model version bump.
2026-03-07 05:46:05 +09:00
acamq
8a1352fc9b Merge pull request #2339 from JimMoen/fix/external-directory-default-ask
fix(tool-config): stop overriding external_directory permission
2026-03-06 13:40:56 -07:00
YeonGyu-Kim
d08bc04e67 feat(sisyphus): strengthen non-Claude parallel delegation guidance
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-07 00:47:55 +09:00
YeonGyu-Kim
fa460469f0 feat(sisyphus): rewrite GPT-5.4 prompt with 8-block architecture
Restructure from 13 scattered XML blocks to 8 dense blocks with 9
named sub-anchors, following OpenAI GPT-5.4 prompting guidance and
Oracle-reviewed context preservation strategy.

Key changes:
- Merge think_first + intent_gate + autonomy into unified <intent>
  with domain_guess classification and <ask_gate> sub-anchor
- Add <execution_loop> as central workflow: EXPLORE -> PLAN -> ROUTE ->
  EXECUTE_OR_SUPERVISE -> VERIFY -> RETRY -> DONE
- Add mandatory manual QA in <verification_loop> (conditional on
  runnable behavior)
- Move <constraints> to position #2 for GPT-5.4 attention pattern
- Add <completeness_contract> as explicit loop exit gate
- Add <output_contract> and <verbosity_controls> per GPT-5.4 guidance
- Add domain_guess (provisional) in intent, finalized in ROUTE after
  exploration -- visual domain always routes to visual-engineering
- Preserve all named sub-anchors: ask_gate, tool_persistence,
  parallel_tools, tool_method, dependency_checks, verification_loop,
  failure_recovery, completeness_contract
- Add skill loading emphasis at intent/route/delegation layers
- Rename EXECUTE to EXECUTE_OR_SUPERVISE to preserve orchestrator
  identity with non-execution exits (answer/ask/challenge)
2026-03-07 00:43:01 +09:00
YeonGyu-Kim
20b185b59f fix(task): append plan delegation prompt requirements
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 22:56:51 +09:00
YeonGyu-Kim
898b628d3d fix(ulw-loop): track Oracle verification sessions explicitly
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-06 22:37:41 +09:00
YeonGyu-Kim
9778cc6c98 feat(ultrawork): enforce manual QA execution and acceptance criteria workflow
Add MANUAL_QA_MANDATE sections to all three ultrawork prompts (default,
GPT, Gemini). Agents must now define acceptance criteria in TODO/Task items
before implementation, then execute manual QA themselves after completing
work. lsp_diagnostics alone is explicitly called out as insufficient since
it only catches type errors, not functional bugs.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 22:33:42 +09:00
YeonGyu-Kim
2e7b7c1f55 feat(prompts): enforce category domain matching and design-system-first workflow
Remove deep parallel delegation section from GPT-5.4 Sisyphus prompt since
it encouraged direct implementation over orchestration. Add zero-tolerance
category domain matching guide to all Sisyphus prompts with visual-engineering
examples. Rewrite visual-engineering category prompt with 4-phase mandatory
workflow (analyze design system, create if missing, build with system, verify)
targeting Gemini's tendency to skip foundational steps.
2026-03-06 22:19:18 +09:00
YeonGyu-Kim
c17f7215f2 test(ulw-loop): cover Oracle verification flow
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 22:00:21 +09:00
YeonGyu-Kim
a010de1db2 feat(ulw-loop): require Oracle verification before completion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 22:00:14 +09:00
YeonGyu-Kim
c3f2198d34 feat(gpt-5.4): amplify parallel tool-calling with XML behavioral contracts
Add <parallel_tool_calling> and <tool_usage_rules> blocks that GPT-5.4
treats as first-class behavioral contracts. Add parallel-planning question
to <think_first>, strengthen Exploratory route in intent gate, and add
IN PARALLEL annotations to verification loop.
2026-03-06 21:09:30 +09:00
github-actions[bot]
de59825d0c release: v3.10.1 2026-03-06 11:57:16 +00:00
YeonGyu-Kim
d7bafc3475 docs(features): refresh agent and category reference tables
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 20:50:11 +09:00
YeonGyu-Kim
6db5ceee09 docs(config): update command, skill, and fallback references
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 20:50:11 +09:00
YeonGyu-Kim
d897f79a7d docs(cli): remove stale auth command section
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 20:50:11 +09:00
YeonGyu-Kim
27e085b4e2 docs(overview): refresh Sisyphus and category examples
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 20:50:11 +09:00
YeonGyu-Kim
2b40d4e6f4 docs(orchestration): align model tables with current runtime
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 20:50:11 +09:00
YeonGyu-Kim
3ee974b966 docs(installation): refresh provider model mappings
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 20:50:11 +09:00
YeonGyu-Kim
56a49df698 docs(agent-models): refresh current model guidance
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 20:50:11 +09:00
YeonGyu-Kim
4616b8f2b8 docs(contributing): fix stale build and structure notes
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 20:50:11 +09:00
github-actions[bot]
94ad67009c @JimMoen has signed the CLA in code-yeongyu/oh-my-opencode#2339 2026-03-06 10:06:10 +00:00
JimMoen
a1ca658d76 fix(tool-config): stop overriding external_directory permission
Remove the hardcoded external_directory: "allow" default from
applyToolConfig(). This was silently overriding OpenCode's built-in
default of "ask" and any user-configured external_directory permission.

With this change, external_directory permission is fully controlled by
OpenCode's defaults and user configuration, as intended.

Fixes #1973
Fixes #2194
2026-03-06 17:58:08 +08:00
YeonGyu-Kim
23dcd99c9a docs(agents): refresh generated AGENTS guides
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-06 17:59:05 +09:00
YeonGyu-Kim
7718969317 feat(model-requirements): prefer GPT-5.4 and glm-5 in agent fallback chains
Align Prometheus, Momus, and Atlas with newer GPT-5.4 fallback tiers and replace Sisyphus install-time GLM-4.7 fallbacks with GLM-5 only.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 17:43:48 +09:00
YeonGyu-Kim
7fe44024c0 feat(no-sisyphus-gpt): allow Sisyphus with GPT-5.4 model
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 17:35:31 +09:00
YeonGyu-Kim
901ddda09c refactor(sisyphus): extract prompt builders into subdirectory with GPT-5.4 variant
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 17:35:24 +09:00
YeonGyu-Kim
cfb9435e42 Merge pull request #2335 from code-yeongyu/fix/boulder-continuation-abort
fix(atlas): schedule delayed retry when cooldown blocks boulder continuation
2026-03-06 17:00:54 +09:00
YeonGyu-Kim
b062fc45cb fix: address Cubic P2 review - fake timers in tests, add opencode provider to glm-5
Replace real setTimeout(7000) with fake timer interception in atlas
retry tests (35s -> 227ms). Add missing opencode provider to glm-5
fallback in unspecified-high category.
2026-03-06 16:55:02 +09:00
YeonGyu-Kim
4eb38d99d2 fix(atlas): add full eligibility checks to delayed retry callback
Address Cubic P1 review: timer callback now re-checks failure backoff
count, boulder session membership, and running background tasks before
injecting continuation, matching the main idle handler's eligibility
gate.
2026-03-06 16:31:48 +09:00
YeonGyu-Kim
cecb78e944 fix(atlas): schedule delayed retry when cooldown blocks boulder continuation
When atlas injects a boulder continuation via promptAsync() and the
model's response is immediately aborted (MessageAbortedError), OpenCode
fires a burst of session.idle events within milliseconds. Atlas blocks
all of them due to the 5-second cooldown. After the burst, OpenCode
stops generating session.idle events (it's state-change based, not
periodic), leaving the session stuck forever.

Fix: When cooldown blocks an idle event for a boulder session with an
incomplete plan, schedule a one-shot setTimeout (cooldown + 1s) to
re-attempt injection. The timer callback re-checks boulder state, plan
progress, and continuation-stopped flag before injecting. Only one timer
per session is allowed (deduped via pendingRetryTimer field). Timers are
cleaned up on session.deleted and session.compacted events.
2026-03-06 16:14:24 +09:00
YeonGyu-Kim
764ca0c51b feat(hephaestus): add generic GPT prompt fallback with model-specific routing
Split monolithic hephaestus.ts into directory with model-specific prompt
variants (gpt-5-4.ts, gpt-5-3-codex.ts, gpt.ts) mirroring the
sisyphus-junior pattern. Generic gpt.ts uses pre-codex-tuning prompt as
fallback for non-specific GPT models.

Also adds isGpt5_4Model and isGpt5_3CodexModel helpers to types.ts.
2026-03-06 15:34:37 +09:00
YeonGyu-Kim
f4eba51388 feat(sisyphus-junior): add model-specific GPT prompt routing (gpt-5-4, gpt-5-3-codex, generic gpt)
Split GPT prompt into three variants with model-based routing:
- gpt-5-4.ts: GPT-5.4 optimized (expert coding agent framing, prose-first)
- gpt-5-3-codex.ts: GPT-5.3-Codex optimized (Hephaestus-style Senior Engineer)
- gpt.ts: Generic GPT fallback (Hephaestus-style, for any other GPT model)

Routing: gpt-5.4 → gpt-5-4 | gpt-5.3-codex → gpt-5-3-codex | other GPT → gpt

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-06 14:50:01 +09:00
YeonGyu-Kim
533aa6d5e3 chore: rebuild platform binaries
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 14:26:24 +09:00
YeonGyu-Kim
17f11a5fa6 feat(metis,momus): add QA scenario executability checks
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 14:26:14 +09:00
YeonGyu-Kim
cde6566792 refactor(atlas): add Final Verification Wave to orchestration workflow
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 14:26:04 +09:00
YeonGyu-Kim
2e4fd5843c feat(model-requirements): update unspecified-high to gpt-5.4, add glm-5/k2p5/kimi-k2.5 fallbacks
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 14:25:47 +09:00
YeonGyu-Kim
ae05e76ddf fix(start-work): remove worktree setup prompt when unspecified, add strong worktree active instructions
When no worktree is specified in boulder, stop injecting 'Worktree Setup Required'
instructions. When worktree IS present, inject emphatic instructions ensuring the
agent and all subagents operate exclusively within the worktree directory.
2026-03-06 14:20:32 +09:00
YeonGyu-Kim
4fd59cd31a chore: rebuild platform binaries
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 13:44:46 +09:00
YeonGyu-Kim
381d7688ab refactor(ultrawork): rename gpt5.2.ts to gpt.ts and align with 5.4 style
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 13:44:39 +09:00
YeonGyu-Kim
3d0ccdd019 feat(momus): add GPT-5.4 variant prompt with model-based routing
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 13:44:32 +09:00
YeonGyu-Kim
051737078e feat(oracle): add GPT-5.4 variant prompt with model-based routing
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 13:44:26 +09:00
YeonGyu-Kim
983b4d8ca7 refactor(prometheus): align GPT prompt with 5.4 system prompt style
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 13:44:20 +09:00
YeonGyu-Kim
de8e5ea97f refactor(atlas): align GPT prompt with 5.4 system prompt style
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 13:44:14 +09:00
YeonGyu-Kim
285db926da refactor(sisyphus-junior): align GPT prompt with 5.4 system prompt style
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 13:44:05 +09:00
Jeon Suyeol
1429ae1505 fix(test): increase poll timeout to fix flaky late-session-id test
WAIT_FOR_SESSION_TIMEOUT_MS of 2ms was too tight for 2 poll iterations
at 1ms intervals — setTimeout precision caused the budget to expire
before the 2nd getTask call. Bumped to 50ms.
2026-03-06 12:16:49 +09:00
Jeon Suyeol
96b5811dc1 use Map for alias lookup to prevent prototype pollution, return undefined for non-Claude bare models 2026-03-06 12:16:34 +09:00
Jeon Suyeol
567f5075c3 handle Claude Code official model aliases (sonnet, opus, haiku, inherit) 2026-03-06 12:06:57 +09:00
Jeon Suyeol
5e25f55bc7 add anthropic/ provider prefix for claude models, preserve date suffixes, passthrough provider-prefixed models 2026-03-06 12:00:54 +09:00
Jeon Suyeol
77a2ab7bdf map Claude Code model strings to OpenCode format when importing agents 2026-03-06 11:56:03 +09:00
Jeon Suyeol
6366c7ef6e test(git-master): add tests for git_env_prefix injection
Add unit tests for env prefix injection (default, disabled, custom value) and update existing skill-content tests to include git_env_prefix field.
2026-03-06 11:35:59 +09:00
Jeon Suyeol
26c8d55b67 feat(git-master): add git_env_prefix config to prefix all git commands
When git-master skill is loaded, all git commands are prefixed with the configured env variable (default: GIT_MASTER=1). This enables custom git hooks to detect git-master skill usage. Set to empty string to disable.
2026-03-06 11:35:52 +09:00
YeonGyu-Kim
ee3d88af9d refactor(installer): remove dead Antigravity auth plugin code
The installer was writing Antigravity provider config and calling a no-op addAuthPlugins function. Since opencode-antigravity-auth is no longer auto-installed and OpenCode supports native Google/Gemini auth, all Antigravity-related installer code is dead. Gemini detection now checks for native google provider instead.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-06 10:59:41 +09:00
YeonGyu-Kim
89dc302403 update agent-browser skill to match upstream v0.16.3
Sync SKILL.md and inline template with vercel-labs/agent-browser v0.16.3.
Adds: native Rust daemon, diff commands, annotated screenshots, profiler,
keyboard type/inserttext, get styles, expanded locators (placeholder/alt/
title/testid/last), security options, config file support, iOS Simulator,
cloud providers (Browserbase/Browser Use/Kernel), session persistence,
CDP auto-connect, and state management commands.
2026-03-06 10:45:35 +09:00
github-actions[bot]
5137df72d8 @mrosnerr has signed the CLA in code-yeongyu/oh-my-opencode#2328 2026-03-05 18:11:22 +00:00
github-actions[bot]
dd70ce37f0 @hkc5 has signed the CLA in code-yeongyu/oh-my-opencode#2327 2026-03-05 17:56:52 +00:00
github-actions[bot]
7e0a1a133c @mInrOz has signed the CLA in code-yeongyu/oh-my-opencode#2321 2026-03-05 12:42:40 +00:00
YeonGyu-Kim
be606cdfbe Merge pull request #2315 from ualtinok/fix/bgoutputdesc
fix(background-task): clarify timeout unit is milliseconds in description
2026-03-05 20:58:29 +09:00
github-actions[bot]
6a29a373f4 @Wangmerlyn has signed the CLA in code-yeongyu/oh-my-opencode#2318 2026-03-05 11:08:20 +00:00
ismeth
389625cb20 Update constants.ts 2026-03-05 11:41:39 +01:00
ismeth
e916d564a9 fix(background-task): clarify timeout unit is milliseconds in description 2026-03-05 09:05:29 +01:00
github-actions[bot]
3d8f390b9e @Vacbo has signed the CLA in code-yeongyu/oh-my-opencode#2310 2026-03-05 04:20:01 +00:00
YeonGyu-Kim
a61f8bb853 Update @opencode-ai/plugin and SDK to v1.2.x and align system transform handler signature
- Bump @opencode-ai/plugin ^1.1.19 → ^1.2.16, @opencode-ai/sdk ^1.1.19 → ^1.2.17
- Update system-transform handler input type to match new plugin contract (optional sessionID, required model)
- Add @opencode-ai/sdk override in bun.lock

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-05 11:18:12 +09:00
YeonGyu-Kim
c8c99445ea fix(look-at): add catch block to prevent TUI crash on unexpected errors 2026-03-05 11:11:53 +09:00
YeonGyu-Kim
fc41a389c5 Merge pull request #2309 from code-yeongyu/fix/task-tui-session-metadata-sync
fix(task): align background delegate-task output with OpenCode TUI session metadata contract
2026-03-05 11:06:11 +09:00
YeonGyu-Kim
39d94a4af6 fix(task): disambiguate background task_id metadata 2026-03-05 11:02:49 +09:00
YeonGyu-Kim
acf4c46439 fix(task): align background output task_id with opencode contract 2026-03-05 11:02:49 +09:00
YeonGyu-Kim
5cbf7828f0 fix(task): avoid pending sessionId metadata in background delegate output 2026-03-05 11:02:49 +09:00
github-actions[bot]
0efd1b65bb @Romanok2805 has signed the CLA in code-yeongyu/oh-my-opencode#2306 2026-03-04 23:51:14 +00:00
Romanok
7f2188bd07 fix(agents): prevent user/project .md agents from overriding builtin agent modes
When users have .md agent files in ~/.claude/agents/ with the same names
as builtin agents (e.g. sisyphus.md, hephaestus.md, atlas.md),
loadAgentsFromDir() hardcodes mode: "subagent" for all loaded agents.

Because the config assembly spreads userAgents after builtinAgents:

  config.agent = {
    ...builtinAgents,  // sisyphus: mode="primary"
    ...userAgents,     // sisyphus: mode="subagent" ← overrides
  }

this causes all primary agents to become subagents. The TUI filters out
subagents, so only non-plugin agents (like "docs") appear in the agent
selector.

Fix:
- Filter out user/project agents that share names with builtin agents
  before spreading into config.agent (both sisyphus-enabled and fallback
  branches)
- Respect frontmatter `mode` field in .md agent files instead of
  hardcoding "subagent"
- Add `mode` to AgentFrontmatter type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:29:29 +05:00
github-actions[bot]
f8d2bd55b9 @RaviTharuma has signed the CLA in code-yeongyu/oh-my-opencode#2302 2026-03-04 21:53:50 +00:00
github-actions[bot]
1ef8d73ce5 @brandonwebb-vista has signed the CLA in code-yeongyu/oh-my-opencode#2299 2026-03-04 17:30:54 +00:00
github-actions[bot]
2b7524b1cb @guazi04 has signed the CLA in code-yeongyu/oh-my-opencode#2293 2026-03-04 10:31:56 +00:00
YeonGyu-Kim
d6b0e564bf feat(delegate-task): unify TUI metadata by adding model field to all 5 executor paths 2026-03-04 18:31:19 +09:00
github-actions[bot]
6897761b21 @SeeYouCowboi has signed the CLA in code-yeongyu/oh-my-opencode#2291 2026-03-04 08:50:49 +00:00
SeeYouCowboi
f67b605f7a fix: also invalidate plugin from CACHE_DIR in invalidatePackage
Fix #2289

invalidatePackage() only removed the plugin from USER_CONFIG_DIR/node_modules/,
but bun may install it in CACHE_DIR/node_modules/ on some systems. This left a
stale copy behind, causing the startup toast to keep showing the old version even
after the auto-update completed successfully.

Now both candidate locations are checked and removed so the reinstalled version
is loaded on the next restart.
2026-03-04 16:48:33 +08:00
github-actions[bot]
fe66b68baa @chan1103 has signed the CLA in code-yeongyu/oh-my-opencode#2288 2026-03-04 08:41:04 +00:00
MoerAI
e1952d35e6 fix(tmux): handle \r line endings and missing pane_title in list-panes
Strip \r characters from list-panes output to handle Windows-style line
endings. Also relax field count check from 9 to 8 to handle cases where
pane_title is empty or missing, which caused the parser to drop pane
rows and fail to determine the main pane in single-pane sessions.

Fixes #2241
2026-03-04 12:24:22 +09:00
YeonGyu-Kim
a7f794c7a3 Merge pull request #2280 from code-yeongyu/feat/multimodal-looker-gpt53-codex-first
feat: make gpt-5.3-codex medium the primary model for multimodal-looker
2026-03-04 11:33:27 +09:00
YeonGyu-Kim
85690b69a8 test: update snapshots and assertions for kimi-k2.5-free removal 2026-03-04 11:33:11 +09:00
YeonGyu-Kim
8c2dcb75cb refactor: remove kimi-k2.5-free from all fallback chains and reorder multimodal-looker
kimi-k2.5-free is no longer available. Remove from all agent and category
fallback chains (sisyphus, multimodal-looker, prometheus, metis, atlas,
writing). Reorder multimodal-looker to: gpt-5.3-codex medium -> k2p5 ->
gemini-3-flash -> glm-4.6v -> gpt-5-nano.
2026-03-04 11:24:39 +09:00
YeonGyu-Kim
1ef5c17c35 feat: make gpt-5.3-codex medium the primary model for multimodal-looker
GPT-5.3 Codex has strong multimodal capabilities. Promote it to first
candidate in multimodal-looker fallback chain, with gemini-3-flash
following (matching the ULW pattern of gpt-5.3-codex -> gemini).
2026-03-04 11:20:55 +09:00
MoerAI
d6fe9aa123 fix(tmux): use correct health check endpoint /global/health
The server health check was using /health which returns HTTP 403 since
the endpoint doesn't exist in OpenCode. The correct endpoint is
/global/health as defined in OpenCode's server routes.

Fixes #2260
2026-03-04 10:17:12 +09:00
github-actions[bot]
42641a9922 @SwiggitySwerve has signed the CLA in code-yeongyu/oh-my-opencode#2277 2026-03-04 00:44:03 +00:00
github-actions[bot]
63b783ba72 @markarranz has signed the CLA in code-yeongyu/oh-my-opencode#2127 2026-03-03 14:12:10 +00:00
YeonGyu-Kim
840af692a0 chore: remove sisyphus-prompt.md
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-03 21:43:12 +09:00
YeonGyu-Kim
2175d58f5d docs(readme): remove security warning banners and fix table formatting
Remove ohmyopencode.com impersonation warnings from all localized READMEs
and fix markdown table column alignment across ja, ko, ru, zh-cn variants.
Also remove Sisyphus Labs note block from ko README.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-03 21:43:06 +09:00
github-actions[bot]
23e1a42690 @yhc509 has signed the CLA in code-yeongyu/oh-my-opencode#1455 2026-03-03 10:16:53 +00:00
github-actions[bot]
ceb8b239ac @janghoon-ju has signed the CLA in code-yeongyu/oh-my-opencode#2269 2026-03-03 07:44:39 +00:00
github-actions[bot]
6e57479ec1 @wangjingu has signed the CLA in code-yeongyu/oh-my-opencode#2265 2026-03-03 02:20:41 +00:00
github-actions[bot]
7fe2746e96 @ilovingjny has signed the CLA in code-yeongyu/oh-my-opencode#2259 2026-03-02 23:58:24 +00:00
github-actions[bot]
f983099957 @nous-labs has signed the CLA in code-yeongyu/oh-my-opencode#2254 2026-03-02 17:12:00 +00:00
acamq
c69344686c fix: correct librarian agent tool name from websearch_exa_web_search_exa to websearch_web_search_exa
The librarian agent's system prompt contained incorrect example function
names for the Exa web search tool, causing the agent to call a non-existent
tool 'websearch_exa_web_search_exa' instead of the correct
'websearch_web_search_exa'.

Fixes #2242
2026-03-02 09:17:43 -07:00
YeonGyu-Kim
f9da00d021 Merge pull request #2251 from code-yeongyu/fix/pr-1906-image-conversion
fix(look-at): temp dir cleanup, Windows compat, argument injection prevention
2026-03-03 00:49:25 +09:00
YeonGyu-Kim
51a3d20dc9 Merge pull request #2250 from code-yeongyu/fix/pr-2113-model-fallback
fix(model-fallback): correct transform expectations and hermetic test isolation
2026-03-03 00:48:11 +09:00
YeonGyu-Kim
785dd529e1 Merge pull request #2249 from code-yeongyu/fix/pr-2173-timeout-issues
fix(delegate-task): resolve timeout handling regressions from #2173
2026-03-03 00:48:08 +09:00
YeonGyu-Kim
025d2a3579 Merge pull request #2248 from code-yeongyu/fix/pr-2080-model-format
fix: model format normalization and explicit config cache bypass
2026-03-03 00:48:04 +09:00
YeonGyu-Kim
0e858ee1df Merge pull request #2247 from code-yeongyu/fix/pr-1977-doctor-paths
fix(doctor): quote cache paths and respect release channel tags
2026-03-03 00:48:00 +09:00
YeonGyu-Kim
5ba9f37d8b Merge pull request #2246 from code-yeongyu/fix/pr-2166-notifier-fallback
fix(hooks): ensure notification fallback on terminal-notifier failure
2026-03-03 00:47:57 +09:00
YeonGyu-Kim
b5100d99df test(look-at): stabilize image-converter tests across platforms 2026-03-03 00:47:21 +09:00
acamq
6a5d094b03 Merge branch 'code-yeongyu:dev' into fix/toolcall-format 2026-03-02 08:41:37 -07:00
YeonGyu-Kim
4123148376 fix(look-at): temp dir cleanup, Windows compat, argument injection prevention 2026-03-03 00:38:47 +09:00
YeonGyu-Kim
95fe698817 fix(model-fallback): correct transform expectations and hermetic test isolation 2026-03-03 00:38:45 +09:00
YeonGyu-Kim
031967857f fix(delegate-task): resolve timeout detection and config drift in sync poller 2026-03-03 00:38:22 +09:00
YeonGyu-Kim
c80a74c5f4 fix(model-resolution): normalize model format and remove dead config flag 2026-03-03 00:38:20 +09:00
YeonGyu-Kim
3d66a30406 fix(doctor): quote paths and respect version channels in fix messages 2026-03-03 00:38:19 +09:00
YeonGyu-Kim
cf40ca5553 fix(hooks): ensure notification fallback on terminal-notifier failure 2026-03-03 00:38:17 +09:00
YeonGyu-Kim
d4033da41a Merge pull request #2244 from code-yeongyu/fix/pr-2021-issues
fix(dispatch): resolve 3 bugs from PR #2021 plugin command wiring
2026-03-03 00:36:56 +09:00
YeonGyu-Kim
3363f0c63a fix(test): resolve test failure in PR #2021 fixes 2026-03-03 00:27:53 +09:00
YeonGyu-Kim
c084cc3f26 fix(dispatch): resolve plugin namespace parsing, template substitution, and discovery duplication 2026-03-03 00:14:01 +09:00
YeonGyu-Kim
f383d7abb5 Revert "Merge pull request #1951 from edxeth/feat/custom-agents"
This reverts commit 47e300b17e, reversing
changes made to 243ce1b7e8.
2026-03-02 23:55:48 +09:00
acamq
34eff610f5 merge: upstream/dev into fix/toolcall-format
Resolved conflict in dynamic-agent-prompt-builder.ts by keeping both
buildToolCallFormatSection() and buildNonClaudePlannerSection() functions.
2026-03-02 07:48:46 -07:00
YeonGyu-Kim
33d39597ae docs(agents): regenerate AGENTS.md hierarchy with updated metrics and model configs
- 1208→1243 TS files (+35), 143k→155k LOC (+12k)
- Update all agent models: Sisyphus, Hephaestus, Oracle, Librarian, Atlas, Metis, Momus
- Add 6 new hook directories (39→45 dirs): beast-mode-system, hashline-edit-diff-enhancer, anthropic-image-context, task-reminder, compaction-todo-preserver, runtime-fallback
- Update category models: visual-engineering/artistry gemini-3-pro→gemini-3.1-pro
- Add 2 config schema files: fallback-models.ts, runtime-fallback.ts
- Timestamp: 2026-03-02 | Commit: 1c2caa09

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-03-02 23:40:38 +09:00
sisyphus-dev-ai
3d4269dcf9 chore: changes by sisyphus-dev-ai 2026-03-02 14:40:25 +00:00
YeonGyu-Kim
47e300b17e Merge pull request #1951 from edxeth/feat/custom-agents
feat(config): make custom agents first-class for planning and delegation
2026-03-02 23:28:57 +09:00
YeonGyu-Kim
243ce1b7e8 Merge pull request #1977 from iyoda/fix/doctor-cache-dir-fix-message
fix(doctor): point fix messages to actual OpenCode cache directory
2026-03-02 23:28:52 +09:00
YeonGyu-Kim
ddeb6e7c54 Merge pull request #1906 from xinpengdr/feat/auto-convert-heic-images
feat: Add automatic image format conversion for HEIC/RAW/PSD files
2026-03-02 23:28:45 +09:00
YeonGyu-Kim
e5d972cc2c Merge pull request #1984 from MoerAI/fix/respect-user-external-directory-permission
fix(config): respect user's external_directory permission setting
2026-03-02 23:28:22 +09:00
YeonGyu-Kim
7a43737cd6 fix(model-fallback): apply transformModelForProvider in getNextFallback
fix(model-fallback): apply transformModelForProvider in getNextFallback
2026-03-02 23:28:20 +09:00
YeonGyu-Kim
4905e6fc7c Merge pull request #2021 from cruzanstx/feat/marketplace-plugin-dispatch
feat(dispatch): wire marketplace plugin commands into slash command dispatch
2026-03-02 23:28:20 +09:00
YeonGyu-Kim
fdd806e729 Merge pull request #2173 from Lynricsy/feat/sync-poll-timeout-config
feat(delegate-task): ⚙️ make sync subagent timeout configurable via syncPollTimeoutMs
2026-03-02 23:28:15 +09:00
YeonGyu-Kim
8a16c95be1 Merge pull request #2080 from Firstbober/dev
fix: model format normalization and explicit config cache bypass
2026-03-02 23:28:06 +09:00
YeonGyu-Kim
8248381150 Merge pull request #2068 from DMax1314/patch-1
Update Kimi Code Subscription link in README
2026-03-02 23:28:03 +09:00
YeonGyu-Kim
0f6e9c7bfa Merge pull request #2125 from zhzy0077/fix/copilot-invalid-initiator
fix(chat-headers): skip x-initiator override for @ai-sdk/github-copilot models
2026-03-02 23:27:59 +09:00
YeonGyu-Kim
d43c5c68bd Merge pull request #2131 from maou-shonen/fix/comment-checker-dependency-version
fix(comment-checker): bump dependency to ^0.7.0 for --prompt support
2026-03-02 23:27:59 +09:00
YeonGyu-Kim
31f8493ee3 Merge pull request #2166 from 1noilimrev/fix/macos-notification-click-target
fix(hooks): use terminal-notifier for macOS notification click-to-focus
2026-03-02 23:27:57 +09:00
YeonGyu-Kim
8b57ca8c6c Merge pull request #2237 from iyoda/refactor/model-resolution-dedup
refactor(shared): deduplicate model resolution utility functions
2026-03-02 23:27:49 +09:00
YeonGyu-Kim
efa959895a Merge pull request #2198 from acamq/feat/no-auto-commit-work-plan
feat(start-work): add auto_commit config option
2026-03-02 23:27:44 +09:00
YeonGyu-Kim
36a29e826d Merge pull request #2184 from mertyldrm/fix/config-context-warning-leak
fix: remove config-context console.warn that leaks into TUI textbox
2026-03-02 23:27:43 +09:00
YeonGyu-Kim
7236e6ee02 Merge pull request #2176 from YLRong/fix/replace-pos-only-description
fix: remove misleading hint from replace pos only description
2026-03-02 23:27:41 +09:00
YeonGyu-Kim
50b9eddae9 fix: initialize config context in plugin runtime to prevent warnings
fix: initialize config context in plugin runtime to prevent warnings
2026-03-02 23:27:39 +09:00
YeonGyu-Kim
7df2a57efb Merge pull request #2193 from acamq/fix/load-mcp-hint
fix(skill_mcp): improve hint for builtin MCP names
2026-03-02 23:27:37 +09:00
YeonGyu-Kim
1c2caa09df fix(preemptive-compaction): allow re-compaction after context grows and use model-specific limits
compactedSessions permanently blocked re-compaction after first success,
causing unbounded context growth (e.g. 500k on Kimi K2.5 with 256k limit).

- Clear compactedSessions flag on new message.updated so compaction can
  re-trigger when context exceeds threshold again
- Use modelContextLimitsCache for model-specific context limits instead
  of always falling back to 200k for non-Anthropic providers
2026-03-02 23:07:39 +09:00
IYODA Atsushi
4b366926d4 refactor(shared): deduplicate model resolution utility functions
Extract normalizeModel() (3 identical copies) and normalizeModelID()
(2 identical copies) into canonical src/shared/model-normalization.ts.
Delete dead-end duplicate model-name-matcher.ts. Update all consumers.
2026-03-02 16:38:22 +09:00
github-actions[bot]
f27fd9a6de release: v3.10.0 2026-03-02 06:27:47 +00:00
YeonGyu-Kim
3db46a58a7 feat(hashline): change hashline_edit default from true to false
Hashline edit tool and companion hooks now require explicit opt-in
via `"hashline_edit": true` in config. Previously enabled by default.

- tool-registry: hashline edit tool not registered unless opted in
- create-tool-guard-hooks: hashline-read-enhancer disabled by default
- Updated config schema comment and documentation
- Added TDD tests for default behavior
2026-03-02 15:20:31 +09:00
YeonGyu-Kim
0dd9ac43ea perf(read-image-resizer): decode only first 32KB of base64 for dimension parsing
Previously decoded entire image buffer to read headers. Now slices base64
to 32KB prefix before decoding — sufficient for PNG/GIF/WebP/JPEG headers.
Dramatically reduces memory allocation for large images.
2026-03-02 15:20:31 +09:00
YeonGyu-Kim
1a9e7eb305 fix(hook-message-injector): add process-unique prefix to message/part IDs to prevent storage collisions
IDs now include a random 8-hex-char prefix per process (e.g. msg_a1b2c3d4_000001)
preventing collisions when counters reset across process restarts.
2026-03-02 15:20:31 +09:00
YeonGyu-Kim
682a3c8515 fix(hooks): prevent SSRF via URL scheme validation and extend disable mechanism to HTTP hooks
- Restrict HTTP hook URLs to http: and https: schemes only (blocks file://, data://, ftp://)
- Extend hook disable config to cover HTTP hooks by matching against hook URL identifier
- Update all 5 hook executors (pre-tool-use, post-tool-use, stop, pre-compact, user-prompt-submit)
- Add 6 new tests for URL scheme validation (file, data, ftp rejection + http, https, invalid URL)
2026-03-02 15:20:31 +09:00
github-actions[bot]
a666612354 @mathew-cf has signed the CLA in code-yeongyu/oh-my-opencode#2233 2026-03-01 20:19:41 +00:00
github-actions[bot]
a6955d7d14 @Chocothin has signed the CLA in code-yeongyu/oh-my-opencode#2230 2026-03-01 13:52:22 +00:00
Chocothin
65bc742881 fix(tool-config): respect question permission from OPENCODE_CONFIG_CONTENT
applyToolConfig() unconditionally set question permission based only on
OPENCODE_CLI_RUN_MODE, ignoring the question:deny already configured via
OPENCODE_CONFIG_CONTENT. This caused agents to hang in headless environments
(e.g. Maestro Auto Run) where the host sets question:deny but does not
know about the plugin-internal OPENCODE_CLI_RUN_MODE variable.

Read permission.question from OPENCODE_CONFIG_CONTENT and give it highest
priority: config deny > CLI run mode deny > default allow.
2026-03-01 22:49:47 +09:00
github-actions[bot]
1a25b251c3 @DEAN-Cherry has signed the CLA in code-yeongyu/oh-my-opencode#2227 2026-03-01 08:13:56 +00:00
github-actions[bot]
9a505a33ac @laciferin2024 has signed the CLA in code-yeongyu/oh-my-opencode#2222 2026-03-01 01:16:35 +00:00
YeonGyu-Kim
acc21326c5 Merge pull request #2212 from code-yeongyu/fix/h5-collector-ordering
fix(context-injector): use monotonic registration order instead of timestamp for deterministic sorting
2026-02-28 13:40:20 +09:00
YeonGyu-Kim
e7503655b9 Merge pull request #2211 from code-yeongyu/fix/c2-hook-message-ids
fix(hook-message-injector): use monotonic counter for deterministic message/part IDs
2026-02-28 13:40:18 +09:00
YeonGyu-Kim
73fea697d7 Merge pull request #2210 from code-yeongyu/fix/c1-synthetic-part-id
fix(context-injector): use deterministic synthetic part ID for cache stability
2026-02-28 13:40:16 +09:00
YeonGyu-Kim
d39b3aa9b7 Merge pull request #2151 from ualtinok/fix/agent-usage-reminder-subagent-exclusion
[Bug]: agent-usage-reminder hook sends circular reminders to explore/librarian subagents
2026-02-28 13:37:14 +09:00
YeonGyu-Kim
7c9f507dad fix(context-injector): use monotonic registration order instead of timestamp for deterministic sorting 2026-02-28 13:30:57 +09:00
YeonGyu-Kim
4d8360c72f fix(context-injector): use deterministic synthetic part ID for cache stability 2026-02-28 13:30:49 +09:00
YeonGyu-Kim
6e9f27350d fix(hook-message-injector): use monotonic counter for deterministic message/part IDs 2026-02-28 13:30:14 +09:00
YeonGyu-Kim
2478b28e71 Merge pull request #2204 from ualtinok/fix/glob-directory-prefix
fix(glob): use cwd-relative search for ripgrep to fix directory prefix patterns
2026-02-28 13:27:00 +09:00
ismeth
418cf8529f fix(glob): use cwd-relative search for ripgrep to fix directory prefix patterns
Ripgrep's --glob flag silently returns zero results when the search target
is an absolute path and the pattern contains directory prefixes (e.g.
'apps/backend/**/*.ts' with '/project'). This is a known ripgrep behavior
where glob matching fails against paths rooted at absolute arguments.

Fix by running ripgrep with cwd set to the search path and '.' as the
search target, matching how the find backend already operates. Ripgrep
then sees relative paths internally, so directory-prefixed globs match
correctly. Output paths are resolved back to absolute via resolve().
2026-02-28 13:26:30 +09:00
YeonGyu-Kim
cc6ab1addc feat(hooks): add read-image-resizer hook
Intercepts Read tool output with image attachments and resizes to comply with Anthropic API limits (≤1568px long edge, ≤5MB). Only activates for Anthropic provider sessions and appends resize metadata (original/new resolution, token count) to tool output.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 13:21:40 +09:00
YeonGyu-Kim
74f7992442 feat(agents): add Gemini tool guide and few-shot examples to system prompt
Embed tool usage guide (per-tool parallel/sequential signals) and 5 concrete tool-calling examples directly in Gemini system prompt. Modeled after Antigravity's inline schema approach to improve Gemini tool-call quality.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 13:21:40 +09:00
YeonGyu-Kim
13d689cb3a feat(agents): add Plan Agent dependency and strengthen Deep Parallel Delegation for non-Claude models
Non-Claude models skip planning and under-parallelize. Two new sections
injected only when model is not Claude:

- Plan Agent Dependency: multi-step tasks MUST consult Plan Agent first,
  use session_id for follow-ups, ask aggressively when ambiguous
- Deep Parallel Delegation (rewrite): explicit '4 units = 4 agents'
  pattern, each with clear GOAL + success criteria, all run_in_background
2026-02-28 13:21:40 +09:00
YeonGyu-Kim
29d606241b Merge pull request #2202 from ualtinok/fix/glob-grep-relative-path
fix(tools): resolve relative paths in glob/grep against project directory
2026-02-28 13:17:53 +09:00
YeonGyu-Kim
d65ee31d17 Merge pull request #2208 from code-yeongyu/feat/http-hook-support
feat(hooks): add HTTP hook handler support
2026-02-28 12:10:45 +09:00
YeonGyu-Kim
4dae458cf7 style(hooks): add blank line between interpolateEnvVars and resolveHeaders 2026-02-28 12:05:08 +09:00
YeonGyu-Kim
4740515f2f fix(agents): replace active polling with notification-based waiting for background tasks
Sisyphus prompt instructed 'your next action is background_output' which
caused agents to repeatedly poll running tasks instead of ending their
response and waiting for the system notification.

- Replace 'STOP all other output' with 'end your response' (actionable)
- Add system-reminder notification mechanism explanation
- Add explicit 'Do NOT poll' prohibition
- Reduce background_cancel(all=true) mentions from 5x to 1x (Hard Blocks)
- Reduce Oracle collect obligation from 4x to 2x
- Remove motivational fluff ('blind spots', 'normal and expected')

Net: -2 lines, clearer mechanism, eliminates polling loop root cause.
2026-02-28 12:04:18 +09:00
YeonGyu-Kim
3eb53adfc3 fix(hooks): resolve cubic review issues
- Replace two-pass env interpolation with single-pass combined regex to
  prevent re-interpolation of $-sequences in substituted header values
- Convert HookEntry to discriminated union so type: "http" requires url,
  preventing invalid configs from passing type checking
- Add regression test for double-interpolation edge case
2026-02-28 12:00:02 +09:00
YeonGyu-Kim
43dfdb2380 feat(hooks): add HTTP hook handler support
Add type: "http" hook support matching Claude Code's HTTP hook specification.
HTTP hooks send POST requests with JSON body, support env var interpolation
in headers via allowedEnvVars, and configurable timeout.

New files:
- execute-http-hook.ts: HTTP hook execution with env var interpolation
- dispatch-hook.ts: Unified dispatcher for command and HTTP hooks
- execute-http-hook.test.ts: 14 tests covering all HTTP hook scenarios

Modified files:
- types.ts: Added HookHttp interface, HookAction union type
- config.ts: Updated to accept HookAction in raw hook matchers
- pre-tool-use/post-tool-use/stop/user-prompt-submit/pre-compact:
  Updated all 5 executors to dispatch HTTP hooks via dispatchHook()
- plugin-loader/types.ts: Added "http" to HookEntry type union
2026-02-28 11:38:34 +09:00
ismeth
7cec6f7c8b fix(tools): resolve relative paths in glob/grep against project directory
When models pass relative paths (e.g. 'apps/ios/CleanSlate') to glob/grep
tools, they were passed directly to ripgrep which resolved them against
process.cwd(). In OpenCode Desktop, process.cwd() is '/' causing all
relative path lookups to fail with 'No such file or directory'.

Fix: use path.resolve(ctx.directory, args.path) to resolve relative paths
against the project directory instead of relying on process.cwd().
2026-02-28 00:58:05 +01:00
github-actions[bot]
866bd50dca @renanale has signed the CLA in code-yeongyu/oh-my-opencode#2201 2026-02-27 22:38:27 +00:00
acamq
5e726a2af2 fix(docs): remove corrupted text and duplicate entries in AGENTS.md
- Remove accidental '7ZB|' keystroke insertion on line 7
- Remove duplicate schema tree entries (start-work.ts and internal/permission.ts)
2026-02-27 13:45:35 -07:00
acamq
e2e3d110b7 feat(start-work): add auto_commit config option
Add start_work.auto_commit configuration option to allow users to
disable the automatic commit step in the /start-work workflow.

When auto_commit is false:
- STEP 8: COMMIT ATOMIC UNIT is removed from orchestrator reminder
- STEP 9: PROCEED TO NEXT TASK becomes STEP 8

Resolves #2197
2026-02-27 13:38:52 -07:00
acamq
f393f50131 fix(hephaestus): add tool call format instructions to prevent malformed output
GPT-5.x Codex models occasionally hallucinate malformed tool calls like:
  assistant to=functions.XXX <garbled_unicode>json\n{...}

This is a model-level issue where the model outputs tool calls as text
instead of using the native tool calling mechanism. Add explicit prompt
instructions telling the model to use the tool call interface.

Related: #2190
2026-02-27 12:58:05 -07:00
acamq
deb904bbc4 fix(skill-mcp): clarify builtin MCP error hint 2026-02-27 10:03:20 -07:00
David Hardy
09fd131f24 fix: initialize config context in plugin runtime to prevent warnings
The auto-update checker hook calls getConfigDir() which requires the
config context to be initialized via initConfigContext(). When running
in the OpenCode TUI plugin runtime (vs CLI), this initialization never
happened, causing the warning:

"getConfigContext() called before initConfigContext(); defaulting to CLI paths."

This warning would appear when opening folders containing .mulch or .beads
directories because the lifecycle plugins triggered the auto-update checker.

Fix: Call initConfigContext("opencode", null) at plugin startup to ensure
the config context is properly initialized for all hooks and utilities.

Fixes upstream issue where TUI users see spurious bun install warnings.
2026-02-27 15:19:21 +00:00
Nguyen Khac Trung Kien
518e3c5da7 Merge pull request #2161 from acamq/fix/duplicate-agent-entries 2026-02-27 18:35:59 +07:00
Kenny
85126247b4 Merge pull request #2153 from devxoul/fix/docs-master-to-dev-branch
replace master branch references with dev
2026-02-27 19:33:48 +08:00
Kenny
bc2eaaf89b Merge pull request #2160 from dwnmf/add-russian-readme
Add Russian README
2026-02-27 19:32:14 +08:00
github-actions[bot]
0f73504639 @mertyldrm has signed the CLA in code-yeongyu/oh-my-opencode#2184 2026-02-27 10:53:16 +00:00
Mert Yıldırım
83c024dd66 fix: remove console.warn that leaks into TUI textbox
getConfigContext() emitted a console.warn when called before
initConfigContext() completed. Since initConfigContext runs async
(spawns opencode --version subprocess), other modules calling
getConfigDir/getConfigJson could trigger this warning during startup.

The fallback behavior is intentional and safe (defaults to standard
CLI paths), but console.warn writes to stderr which the TUI captures,
causing the warning to render inside the user's textbox.

Fixes #2183
2026-02-27 13:51:51 +03:00
github-actions[bot]
db32ac5ae8 @YLRong has signed the CLA in code-yeongyu/oh-my-opencode#2176 2026-02-27 09:06:59 +00:00
YLRong
c1eaf5fcab fix: remove misleading hint from replace pos-only description
The hint '(MOST COMMON for single-line edits)' misleads agents into
thinking pos-only replace is the default behavior. When agents want
to replace multiple lines but only specify pos without end, the tool
only replaces one line, causing duplicate code from retained lines.
2026-02-27 17:06:40 +08:00
Lynricsy
d09cf56e15 feat(delegate-task): ⚙️ make sync subagent timeout configurable via syncPollTimeoutMs
Allow users to set `background_task.syncPollTimeoutMs` in config to override
the default 10-minute sync subagent timeout. Affects sync task, sync continuation,
and unstable agent task paths. Minimum value: 60000ms (1 minute).

Co-authored-by: Wine Fox <fox@ling.plus>
2026-02-27 16:17:39 +08:00
1noilimrev
fbe3b5423d refactor(test): extract shared mock helper and add try-finally for env cleanup 2026-02-27 15:30:13 +09:00
YeonGyu-Kim
2eb7994163 fix(atlas): use start-work session agent for continuation gating
Prefer the in-memory session agent set by /start-work when validating idle continuation eligibility, so stale message storage agent values do not block boulder continuation.
2026-02-27 15:01:44 +09:00
github-actions[bot]
15ad9442a4 @1noilimrev has signed the CLA in code-yeongyu/oh-my-opencode#2166 2026-02-27 05:53:45 +00:00
1noilimrev
88bf8268f5 test(hooks): add darwin notification backend selection tests 2026-02-27 14:48:34 +09:00
1noilimrev
1c6d384f14 fix(hooks): use terminal-notifier for macOS notification click-to-focus 2026-02-27 14:39:07 +09:00
LYA_CAP_OCEAN
07542d39aa Fix markdown blockquote structure in Russian README 2026-02-27 01:59:29 +03:00
acamq
d6dd54867a fix(agents): remove duplicate remapped agent keys 2026-02-26 15:58:02 -07:00
github-actions[bot]
f3cbc24e78 @dwnmf has signed the CLA in code-yeongyu/oh-my-opencode#2160 2026-02-26 22:51:52 +00:00
LYA_CAP_OCEAN
b76abeb8e0 Add Russian README 2026-02-27 01:49:51 +03:00
edxeth
d7ab5c4d7b refactor(schema): dedupe custom agent override with ref 2026-02-26 21:39:04 +01:00
edxeth
818fdc490c fix(config): avoid conflicting typo and migration guidance 2026-02-26 21:28:00 +01:00
edxeth
a5749a1392 fix(custom-agents): align planner catalog and schema validation 2026-02-26 21:14:00 +01:00
edxeth
922ff7f2bc docs(config): fix custom_agents examples 2026-02-26 20:55:58 +01:00
YeonGyu-Kim
21c249e8c8 fix(ci): pre-download baseline compile targets to avoid Bun extraction failures
Bun's internal download of baseline compile targets from npm registry
consistently fails on Windows CI runners (ExtractionFailed error).
Pre-download the baseline binary via curl into Bun's cache directory
so the compile step finds it already cached and skips the download.

Also makes publish job resilient with if: always() so one failed
platform doesn't block publishing all other successful platforms.
2026-02-27 04:43:29 +09:00
YeonGyu-Kim
0749a8f138 fix(ci): make platform publish resilient to individual build failures
publish job now runs with if: always() && !cancelled(), and gates
each publish step on download.outcome == 'success'. One flaky target
(e.g. windows-x64-baseline) no longer blocks all other platforms.
2026-02-27 04:39:05 +09:00
github-actions[bot]
ae54fd31f4 release: v3.9.0 2026-02-26 19:30:38 +00:00
YeonGyu-Kim
bdd86b1415 fix(hephaestus): remove auto-commit policy to prevent surprise commits
The auto-commit section instructed Hephaestus to automatically commit after
implementation work. Users who didn't know about this behavior would get
surprise commits — a trust-breaking behavioral change flagged by 5 Oracle
reviews as the sole publish blocker for 3.9.0.
2026-02-27 04:27:07 +09:00
edxeth
da1e160add docs(config): document custom_agents behavior and delegation flow 2026-02-26 20:01:53 +01:00
YeonGyu-Kim
76cba9b222 Merge pull request #2159 from code-yeongyu/fix/ralph-loop-completion-scoping
fix(ralph-loop): scope completion detection to messages since loop start
2026-02-27 03:23:46 +09:00
YeonGyu-Kim
2955dc868f Merge pull request #2158 from code-yeongyu/fix/hashline-diff-format-compat
test(hashline-edit): verify diff format compatibility with OpenCode UI
2026-02-27 03:23:43 +09:00
YeonGyu-Kim
3ab4b7f77b Merge pull request #2157 from code-yeongyu/fix/token-limiter-safe-truncation
fix(token-limiter): truncate at newline boundaries instead of raw slice
2026-02-27 03:23:40 +09:00
YeonGyu-Kim
3540d1c550 Merge pull request #2156 from code-yeongyu/fix/background-pending-notif-leak
fix(background-agent): clean pendingNotifications on session.deleted
2026-02-27 03:23:38 +09:00
YeonGyu-Kim
9bc9dcaa18 Merge pull request #2155 from code-yeongyu/fix/ultrawork-thinking-db-write
fix(ultrawork-db): write $.thinking alongside $.variant in deferred model override
2026-02-27 03:23:30 +09:00
YeonGyu-Kim
f2a1412bf1 test(ralph-loop): harden completion detector PluginInput mock 2026-02-27 03:12:22 +09:00
YeonGyu-Kim
190c6991ac fix(ralph-loop): persist session message count at loop start 2026-02-27 03:08:30 +09:00
YeonGyu-Kim
e17a00a906 fix(ralph-loop): scope completion detection to messages since loop start 2026-02-27 03:05:14 +09:00
YeonGyu-Kim
c8aa1bbce4 test(hashline-edit): add diff format compatibility tests 2026-02-27 03:02:49 +09:00
YeonGyu-Kim
911710e4d4 fix(token-limiter): truncate at newline boundaries instead of raw slice 2026-02-27 03:02:04 +09:00
YeonGyu-Kim
050b93bebb fix(background-agent): clean pendingNotifications on session.deleted 2026-02-27 03:00:39 +09:00
YeonGyu-Kim
2ffa803b05 fix(ultrawork-db): write $.thinking alongside $.variant in deferred model override 2026-02-27 02:59:22 +09:00
edxeth
7e90c2c48f Merge remote-tracking branch 'origin/dev' into feat/custom-agents
# Conflicts:
#	src/agents/utils.test.ts
#	src/plugin-handlers/agent-config-handler.ts
2026-02-26 18:53:29 +01:00
YeonGyu-Kim
cf97494073 Merge pull request #2154 from minpeter/feat/hashline-benchmark
fix(hashline-edit): harden deduplication, validation, and add benchmark suite
2026-02-27 02:14:12 +09:00
minpeter
8fb5949ac6 fix(benchmarks): address review feedback on error handling and validation
- headless.ts: emit error field on tool_result when output starts with Error:
- test-multi-model.ts: errored/timed-out models now shown as RED and exit(1)
- test-multi-model.ts: validate --timeout arg (reject NaN/negative)
- test-edge-cases.ts: use exact match instead of trim() for whitespace test
- test-edge-cases.ts: skip file pre-creation for create-via-append test

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-27 01:44:51 +09:00
minpeter
04f50bac1f feat(benchmarks): add hashline-edit test suites (46 tests)
Ported from code-editing-agent benchmark:
- test-edit-ops.ts: 21 basic edit operations (replace, append, prepend, delete, batch, range)
- test-edge-cases.ts: 25 edge cases (unicode, long lines, whitespace, special chars, file creation)
- test-multi-model.ts: multi-model comparison runner

Verified 21/21 + 25/25 (100%) with Minimax M2.5 via FriendliAI.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-27 01:37:49 +09:00
minpeter
d1a0a66dde feat(benchmarks): add hashline-edit benchmark agent and deps
Standalone headless agent using Vercel AI SDK v6 with FriendliAI provider.
Imports hashline-edit pure functions directly from src/ for benchmarking
the edit tool against LLMs (Minimax M2.5 via FriendliAI).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-27 01:37:40 +09:00
minpeter
b1203b9501 Fix hashline-edit deduplication and validation
- Canonicalize anchors in dedupe keys to handle whitespace variants
- Make lines field required in edit operations
- Only allow unanchored append/prepend to create missing files
- Reorder delete/rename validation to prevent edge cases
- Add allow_non_gpt_model and max_prompt_tokens to config schema
  ```
2026-02-27 01:37:19 +09:00
ismeth
35edcecd8f fix(agent-usage-reminder): skip reminders for non-orchestrator subagents 2026-02-26 17:05:33 +01:00
Jeon Suyeol
0cc9edac17 replace master branch references with dev across docs, schema URLs, and tests 2026-02-27 00:49:53 +09:00
YeonGyu-Kim
58201220cc Merge pull request #2093 from code-yeongyu/fix/issue-1966-ultrawork-variant
fix(keyword-detector): respect ultrawork config variant instead of hardcoding "max"
2026-02-26 23:23:14 +09:00
YeonGyu-Kim
4efad491e7 Merge pull request #2149 from code-yeongyu/fix/issue-1815-1733-prompt-token-count
fix(delegate-task): add token counting and truncation to prevent context overflow
2026-02-26 23:19:35 +09:00
YeonGyu-Kim
4df69c58bf fix(keyword-detector): respect ultrawork config variant instead of hardcoding "max"
Closes #1966
2026-02-26 23:15:32 +09:00
YeonGyu-Kim
cc8ef7fe39 ci: trigger CI 2026-02-26 23:14:33 +09:00
YeonGyu-Kim
2ece7c3d0a Merge pull request #1963 from MoerAI/fix/multi-issue-1888-1693-1891
fix: resolve issues #1888, #1693, #1891
2026-02-26 23:13:00 +09:00
YeonGyu-Kim
decff3152a Merge pull request #2145 from code-yeongyu/fix/issue-1915-windows-spawn-hide
fix(windows): add windowsHide to Bun.spawn calls to prevent stray terminal windows
2026-02-26 23:12:57 +09:00
YeonGyu-Kim
0526bac873 Merge pull request #2148 from code-yeongyu/fix/issue-2121-legacy-hardware-baseline
fix(ci): add baseline CPU variant binaries for legacy hardware support
2026-02-26 21:09:19 +09:00
YeonGyu-Kim
0c62656cc6 Merge pull request #2146 from code-yeongyu/fix/issue-2065-1968-model-updates
fix(models): update Gemini 3→3.1 Pro and add Kimi K2.5 to writing category
2026-02-26 21:07:23 +09:00
YeonGyu-Kim
aff43bfc77 Merge pull request #2143 from code-yeongyu/fix/issue-2017-stop-continuation-cancel
fix(stop-continuation): wire backgroundManager to cancel running tasks on stop
2026-02-26 21:07:20 +09:00
YeonGyu-Kim
6865cee8ca Merge pull request #2141 from code-yeongyu/fix/issue-2084-ralph-loop-inflight
fix(ralph-loop): add inFlight guard and improve completion detection to prevent infinite loops
2026-02-26 21:07:17 +09:00
YeonGyu-Kim
8721ba471c Merge pull request #2140 from code-yeongyu/fix/issue-2025-blocked-todo-continuation
fix(todo-continuation): exclude blocked todos from incomplete count to prevent infinite loops
2026-02-26 21:06:55 +09:00
YeonGyu-Kim
96d27ff56b Merge pull request #2134 from code-yeongyu/fix/issue-2064-config-overwrite
fix(config): preserve existing user config when writing new defaults
2026-02-26 21:06:17 +09:00
YeonGyu-Kim
017c18c1b3 Merge pull request #2138 from code-yeongyu/fix/issue-2062-compaction-timeout
fix(compaction): add timeout and cleanup to prevent indefinite hangs on rate limit
2026-02-26 21:06:05 +09:00
YeonGyu-Kim
fb194fc944 Merge pull request #2147 from code-yeongyu/fix/issue-2117-preserve-formatter-config
fix(config): preserve formatter config from opencode settings
2026-02-26 21:05:46 +09:00
YeonGyu-Kim
10c25d1d47 Merge pull request #2144 from code-yeongyu/fix/issue-2087-look-at-hang
fix(look-at): add timeout to sync model retry to prevent process hang
2026-02-26 21:05:43 +09:00
YeonGyu-Kim
86fcade9a4 Merge pull request #2142 from code-yeongyu/fix/issue-1922-retain-agent-keys
fix(agents): retain original agent keys in remapAgentKeysToDisplayNames to prevent crash
2026-02-26 21:04:32 +09:00
YeonGyu-Kim
5bc3a9e0db Merge pull request #2137 from code-yeongyu/fix/issue-2051-diff-context-limit
fix(hashline-edit): limit diff context to 3 lines to prevent oversized hunks
2026-02-26 21:04:29 +09:00
YeonGyu-Kim
810ebec1cd Merge pull request #2136 from code-yeongyu/fix/issue-2044-atlas-task-tool
fix(atlas): allow task and call_omo_agent tools for subagent dispatch
2026-02-26 21:04:26 +09:00
YeonGyu-Kim
8f7ed2988a Merge pull request #2135 from code-yeongyu/fix/issue-2115-background-output-block
fix(background-task): make background_output block=true actually wait for task completion
2026-02-26 21:04:23 +09:00
YeonGyu-Kim
7ff8352a0a fix(config): preserve formatter config from opencode settings
Closes #2117
2026-02-26 21:01:31 +09:00
YeonGyu-Kim
d425f9bb80 fix(models): update Gemini 3 to 3.1 Pro and add Kimi to writing category fallback
Closes #2065

Closes #1968
2026-02-26 21:01:26 +09:00
YeonGyu-Kim
cc5e9d1e9b fix(ci): add baseline CPU variant binaries for legacy hardware support
Closes #2121
2026-02-26 21:00:45 +09:00
YeonGyu-Kim
269f37af1c fix(windows): add windowsHide to Bun.spawn calls to prevent stray terminal windows
Closes #1915
2026-02-26 21:00:40 +09:00
YeonGyu-Kim
1e060e9028 fix(look-at): add timeout to sync model retry to prevent process hang
Closes #2087
2026-02-26 20:59:53 +09:00
YeonGyu-Kim
ccb789e5df fix(stop-continuation): wire backgroundManager to cancel running tasks on stop
Closes #2017
2026-02-26 20:59:35 +09:00
YeonGyu-Kim
a6617d93c0 fix(ralph-loop): add inFlight guard and improve completion detection to prevent infinite loops
Closes #2084
2026-02-26 20:59:18 +09:00
YeonGyu-Kim
2295161022 fix(ralph-loop): add inFlight guard and improve completion detection to prevent infinite loops
Closes #2084
2026-02-26 20:58:55 +09:00
YeonGyu-Kim
0516f2febc fix(todo-continuation): exclude blocked todos from incomplete count to prevent infinite loops
Closes #2025
2026-02-26 20:58:48 +09:00
YeonGyu-Kim
df02c73a54 fix(agents): retain original agent keys in remapAgentKeysToDisplayNames to prevent crash
Closes #1922
2026-02-26 20:58:47 +09:00
YeonGyu-Kim
52658ac1c4 fix(config): preserve existing user config when writing new defaults
Closes #2064
2026-02-26 20:58:07 +09:00
YeonGyu-Kim
fab820e919 fix(compaction): add timeout and ensure cleanup to prevent indefinite hangs on rate limit
Closes #2062
2026-02-26 20:58:01 +09:00
YeonGyu-Kim
6f54404a51 fix(hephaestus): add explicit auto-commit instructions to agent prompt
Closes #2102
2026-02-26 20:57:58 +09:00
YeonGyu-Kim
a3169c9287 fix(hashline-edit): limit diff context to 3 lines to prevent oversized hunks
Closes #2051
2026-02-26 20:57:47 +09:00
YeonGyu-Kim
0639ce8df7 fix(atlas): allow task and call_omo_agent tools for subagent dispatch
Closes #2044
2026-02-26 20:55:20 +09:00
YeonGyu-Kim
685b8023dd fix(background-task): make background_output block=true actually wait for task completion
Closes #2115
2026-02-26 20:55:11 +09:00
YeonGyu-Kim
07e8d965a8 fix(atlas): allow task and call_omo_agent tools for subagent dispatch
Closes #2044
2026-02-26 20:54:42 +09:00
YeonGyu-Kim
c505989ad4 Merge pull request #2095 from code-yeongyu/fix/issue-1934-exit-code-130-timeout
fix(run): add event watchdog and secondary timeout to prevent infinite hang in CI
2026-02-26 20:48:46 +09:00
YeonGyu-Kim
088984a8d4 fix: remove Current date from env context since OpenCode already provides it
date is already injected by OpenCode's system.ts. omo-env now contains only
Timezone and Locale, which are stable across requests and never break cache.
2026-02-26 20:22:17 +09:00
YeonGyu-Kim
0b69a6c507 fix(atlas): replace permanent failure lockout with 5-minute backoff
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:20:45 +09:00
YeonGyu-Kim
5fe1640f2a fix(boulder): count indented checkboxes in plan progress
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:20:28 +09:00
YeonGyu-Kim
ad01f60e99 fix: remove seconds-precision time from env context to stop breaking token cache
Current time with HH:MM:SS changed every second, invalidating the prompt cache
on every request. Date-level precision is sufficient; timezone and locale are
stable. Removes Current time field entirely from createEnvContext output.
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
87d6b2b519 feat(agents): simplify GPT detection to name-based check, add hephaestus providers (venice uses gpt-5.3-codex)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
b7b6721796 refactor(think-mode): migrate hook from chat.params to chat.message and remove thinking config injection
Drop provider-specific thinking config injection (THINKING_CONFIGS, getThinkingConfig,
resolveProvider) and instead rely on the provider to handle thinking based on the variant field.
Hook now fires on chat.message using model from input rather than from the message object.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
0c59d2dbe7 refactor(ultrawork): remove thinking config injection from model override
Delegate thinking config control to the provider layer rather than
injecting it manually in ultrawork model override.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
52d366e866 feat(start-work): update template with --worktree flag documentation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
9cd6fc6135 feat(atlas): inject worktree_path into boulder continuation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
f872f5e171 feat(start-work): add --worktree flag support in hook
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
f500fb0286 feat(start-work): add --worktree flag parsing from user request
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
9a94e12065 feat(start-work): add worktree path detection
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:08:44 +09:00
YeonGyu-Kim
808a50d808 feat(boulder-state): add worktree_path field to BoulderState
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-26 20:08:44 +09:00
github-actions[bot]
a263188abd @maou-shonen has signed the CLA in code-yeongyu/oh-my-opencode#2131 2026-02-26 09:50:58 +00:00
maou shonen
acb51d1702 fix(comment-checker): bump dependency to ^0.7.0 for --prompt support 2026-02-26 09:48:57 +00:00
github-actions[bot]
155ed5248d @imwxc has signed the CLA in code-yeongyu/oh-my-opencode#2129 2026-02-26 09:22:45 +00:00
github-actions[bot]
ed5a2fe393 @spacecowboy0416 has signed the CLA in code-yeongyu/oh-my-opencode#2126 2026-02-26 06:05:38 +00:00
github-actions[bot]
cd504a2694 @zhzy0077 has signed the CLA in code-yeongyu/oh-my-opencode#2125 2026-02-26 04:45:36 +00:00
Zhiyuan Zheng
890a737d1e fix(chat-headers): skip x-initiator override for @ai-sdk/github-copilot models
OpenCode's copilot fetch wrapper already sets x-initiator based on the
actual HTTP request body content. When oh-my-opencode's chat.headers
hook overrides it with 'agent', the Copilot API detects a mismatch
between the header and the request body and rejects the request with
'invalid initiator'.

This matches the approach OpenCode's own chat.headers handler uses
(copilot.ts:314) — it explicitly skips @ai-sdk/github-copilot models
because the fetch wrapper handles x-initiator correctly on its own.
2026-02-26 12:38:05 +08:00
github-actions[bot]
e556c4a5c8 @SupenBysz has signed the CLA in code-yeongyu/oh-my-opencode#2119 2026-02-25 22:01:04 +00:00
east-shine
94ff673d40 test(model-fallback): google provider 모델명 변환 테스트 추가
google provider에서 gemini-3-pro → gemini-3-pro-preview 변환이
getNextFallback를 통해 정상 적용되는지 검증하는 테스트 추가.
기존 github-copilot 테스트와 동일한 패턴으로 작성.
2026-02-25 21:40:28 +09:00
github-actions[bot]
be7f408049 @east-shine has signed the CLA in code-yeongyu/oh-my-opencode#2113 2026-02-25 08:19:44 +00:00
Jaden
f6d5f6f79f fix(model-fallback): apply transformModelForProvider in getNextFallback
The getNextFallback function returned raw model names from the
hardcoded fallback chain without transforming them for the target
provider. For example, github-copilot requires dot notation
(claude-sonnet-4.6) but the fallback chain stores hyphen notation
(claude-sonnet-4-6).

The background-agent retry handler already calls
transformModelForProvider correctly, but the sync chat.message
hook in model-fallback was missing it — a copy-paste omission.

Add transformModelForProvider call in getNextFallback and a test
verifying github-copilot model name transformation.
2026-02-25 17:15:13 +09:00
YeonGyu-Kim
2ab40124ee Merge pull request #2111 from code-yeongyu/fix/background-notification-idle-queue
fix(background-agent): queue notifications for idle parent sessions
2026-02-25 16:30:09 +09:00
YeonGyu-Kim
840c612be8 fix(background-agent): queue notifications for idle parent sessions
When a background task completes and the parent session is waiting for
user input, promptAsync() fails with an aborted error. Previously the
notification was silently dropped — lost forever.

Fix: queue the notification text in-memory on the BackgroundManager
when promptAsync fails with an aborted/idle error. On the user's next
message to that session, the queued notifications are injected into the
chat context before the agent sees the message.

- BackgroundManager: add pendingNotifications map + queuePendingNotification()
  and injectPendingNotificationsIntoChatMessage() methods
- background-notification hook: add chat.message handler that calls injection
- chat-message.ts: wire backgroundNotificationHook.chat.message into the
  message processing chain
- Add tests covering queue-on-abort and next-message delivery
2026-02-25 16:26:31 +09:00
YeonGyu-Kim
235bb58779 Merge pull request #2110 from code-yeongyu/fix/boulder-continuation-agent-check
fix(atlas): boulder continuation deadlock after /start-work + 30s→5s cooldown
2026-02-25 16:22:58 +09:00
YeonGyu-Kim
ace1790c72 test(atlas): update agent check tests to match fixed behavior
- Rename test to 'should inject when last agent is sisyphus and boulder targets atlas
  explicitly' and flip expectation to toHaveBeenCalled() - the old assertion was
  testing the buggy deadlock behavior
- Add 'should not inject when last agent is non-sisyphus and does not match boulder
  agent' to verify hephaestus (unrelated agents) are still correctly skipped
2026-02-25 16:18:59 +09:00
YeonGyu-Kim
31eb7f5d28 Merge pull request #2108 from code-yeongyu/fix/issue-2100-reset-strategy-race-condition
fix(ralph-loop): fix race condition in --strategy=reset
2026-02-25 16:16:53 +09:00
YeonGyu-Kim
6b5622c62f Merge pull request #2107 from code-yeongyu/fix/issue-2054-hephaestus-model-opt-out
fix(no-hephaestus-non-gpt): add opt-out for model enforcement
2026-02-25 16:16:50 +09:00
YeonGyu-Kim
cf0d157673 Merge pull request #2106 from code-yeongyu/fix/issue-2049-ultrawork-thinking-config
fix(ultrawork-model-override): fix thinking config when upgrading variant
2026-02-25 16:16:48 +09:00
YeonGyu-Kim
adf62267aa fix(agents/utils.test): correct hephaestus github-copilot provider test expectation
The test 'hephaestus is created when github-copilot provider is connected'
had incorrect expectation. github-copilot does not provide gpt-5.3-codex,
so hephaestus should NOT be created when only github-copilot is connected.

This test was causing CI flakiness due to incorrect assertion and
missing readConnectedProvidersCache mock (state pollution between tests).

Also adds cacheSpy mock for proper isolation.
2026-02-25 14:17:36 +09:00
YeonGyu-Kim
9f64e2a869 fix(agents/utils.test): correct hephaestus github-copilot provider test expectation
The test 'hephaestus is created when github-copilot provider is connected'
had incorrect expectation. github-copilot does not provide gpt-5.3-codex,
so hephaestus should NOT be created when only github-copilot is connected.

This test was causing CI flakiness due to incorrect assertion and
missing readConnectedProvidersCache mock (state pollution between tests).

Also adds cacheSpy mock for proper isolation.
2026-02-25 14:17:34 +09:00
YeonGyu-Kim
e00f461eb1 fix(agents/utils.test): correct hephaestus github-copilot provider test expectation
The test 'hephaestus is created when github-copilot provider is connected'
had incorrect expectation. github-copilot does not provide gpt-5.3-codex,
so hephaestus should NOT be created when only github-copilot is connected.

This test was causing CI flakiness due to incorrect assertion and
missing readConnectedProvidersCache mock (state pollution between tests).

Also adds cacheSpy mock for proper isolation.
2026-02-25 14:17:33 +09:00
YeonGyu-Kim
da6c54ed93 Revert "fix(model-requirements): add github-copilot to hephaestus requiresProvider"
This reverts commit 2acf6fa124.
2026-02-25 14:16:26 +09:00
YeonGyu-Kim
1d99fdf843 Revert "fix(model-requirements): add github-copilot to hephaestus requiresProvider"
This reverts commit 7e5872935a.
2026-02-25 14:16:26 +09:00
YeonGyu-Kim
de70c3a332 Revert "fix(model-requirements): add github-copilot to hephaestus requiresProvider"
This reverts commit 6458fe9fce.
2026-02-25 14:16:25 +09:00
YeonGyu-Kim
5e07dfe19b fix(atlas): allow Sisyphus as last agent when boulder targets atlas explicitly
The boulder continuation in event-handler.ts skipped injection whenever
the last agent was 'sisyphus' and the boulder state had agent='atlas'
set explicitly. The allowSisyphusWhenDefaultAtlas guard required
boulderAgentWasNotExplicitlySet=true, but start-work-hook.ts always
calls createBoulderState(..., 'atlas') which sets the agent explicitly.

This created a chicken-and-egg deadlock: boulder continuation needs
atlas to be the last agent, but the continuation itself is what switches
to atlas. With /start-work, the first iteration was always blocked.

Fix: drop the boulderAgentWasNotExplicitlySet constraint so Sisyphus is
always allowed when the boulder targets atlas (whether explicit or default).

Also reduce todo-continuation-enforcer CONTINUATION_COOLDOWN_MS from
30s to 5s to match atlas hook cooldown and recover interruptions faster.
2026-02-25 14:16:17 +09:00
YeonGyu-Kim
2acf6fa124 fix(model-requirements): add github-copilot to hephaestus requiresProvider
Hephaestus requires GPT models, which can be provided by github-copilot.
The requiresProvider list was missing github-copilot, causing hephaestus
to not be created when github-copilot was the only GPT provider connected.

This also fixes a flaky CI test that documented this expected behavior.
2026-02-25 14:12:52 +09:00
YeonGyu-Kim
7e5872935a fix(model-requirements): add github-copilot to hephaestus requiresProvider
Hephaestus requires GPT models, which can be provided by github-copilot.
The requiresProvider list was missing github-copilot, causing hephaestus
to not be created when github-copilot was the only GPT provider connected.

This also fixes a flaky CI test that documented this expected behavior.
2026-02-25 14:12:45 +09:00
YeonGyu-Kim
6458fe9fce fix(model-requirements): add github-copilot to hephaestus requiresProvider
Hephaestus requires GPT models, which can be provided by github-copilot.
The requiresProvider list was missing github-copilot, causing hephaestus
to not be created when github-copilot was the only GPT provider connected.

This also fixes a flaky CI test that documented this expected behavior.
2026-02-25 14:12:43 +09:00
YeonGyu-Kim
640d9fb773 Merge pull request #2109 from code-yeongyu/fix/issue-1815-1733-prompt-token-count
fix(delegate-task): prevent prompt context overflow with token counting
2026-02-25 14:09:17 +09:00
YeonGyu-Kim
fc1b6e4917 fix(delegate-task): add token counting and truncation to prevent context overflow
Fixes #1815, #1733
2026-02-25 14:03:47 +09:00
YeonGyu-Kim
a0e57c13c3 fix(ralph-loop): prevent race condition in reset strategy between session ID update and TUI switch
Fixes #2100
2026-02-25 14:01:27 +09:00
YeonGyu-Kim
997db0e05b fix(no-hephaestus-non-gpt): add allow_non_gpt_model config opt-out
Fixes #2054
2026-02-25 14:01:26 +09:00
YeonGyu-Kim
565ab8c13a fix(ultrawork-model-override): set thinking config object instead of variant string
Fixes #2049
2026-02-25 14:01:03 +09:00
edxeth
8836b61aaa test(agents): stabilize provider gating and skill filter tests 2026-02-24 19:04:45 +01:00
edxeth
4f212dbaf9 chore(schema): regenerate schema after rebase conflict resolution 2026-02-24 18:49:34 +01:00
edxeth
fb139a7a01 fix(custom-agents): preserve summary flags during description merge 2026-02-24 18:46:49 +01:00
edxeth
754a2593f9 chore(schema): regenerate config schema after rebase 2026-02-24 18:46:49 +01:00
edxeth
ae12f2e9d2 feat(config): add custom_agents overrides and strict agent validation 2026-02-24 18:46:49 +01:00
github-actions[bot]
15519b9580 @Pantoria has signed the CLA in code-yeongyu/oh-my-opencode#1983 2026-02-24 17:12:43 +00:00
YeonGyu-Kim
b174513725 Merge pull request #2099 from code-yeongyu/fix/gpt-5-3-codex-github-copilot-provider
fix: remove github-copilot from gpt-5.3-codex provider list
2026-02-25 00:33:27 +09:00
YeonGyu-Kim
465f5e13a8 fix: remove github-copilot from gpt-5.3-codex provider list
gpt-5.3-codex is not available on GitHub Copilot. The fallback chains
incorrectly listed github-copilot as a valid provider for this model,
causing the doctor to report 'configured model github-copilot/gpt-5.3-codex
is not valid' for Hephaestus agent.

Affected agents: hephaestus (requiresProvider + fallbackChain)
Affected categories: ultrabrain, deep, unspecified-low

Copilot users can still use Hephaestus via openai or opencode providers.

Fixes #2047
2026-02-25 00:29:00 +09:00
YeonGyu-Kim
73453a7191 docs(agents): update hook counts 44→46, add hashline-edit documentation
- Update root AGENTS.md: hook count 44→46, commit fcb90d92, generated 2026-02-24
- Update src/AGENTS.md: core hooks 35→37, session hooks 21→23
- Update src/hooks/AGENTS.md: 46 hooks total, add modelFallback/noSisyphusGpt/noHephaestusNonGpt/runtimeFallback, jsonErrorRecovery moved to tool-guard (tier 2)
- Create src/tools/hashline-edit/AGENTS.md (93 lines): documents three-op model, LINE#ID format, execution pipeline
- Refresh timestamps: 2026-02-21→2026-02-24 on 28 files
- Update plugin/AGENTS.md hook composition counts

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-25 00:02:05 +09:00
YeonGyu-Kim
fcb90d92a4 refactor(hashline-edit): replace custom diff with diff library
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-24 22:30:06 +09:00
github-actions[bot]
ddf426c4b3 @PHP-Expert has signed the CLA in code-yeongyu/oh-my-opencode#2098 2026-02-24 13:27:28 +00:00
sisyphus-dev-ai
a882e6f027 chore: changes by sisyphus-dev-ai 2026-02-24 13:21:54 +00:00
YeonGyu-Kim
dab2f90051 test(run): make completion metadata timing assertion deterministic
Avoid Date.now call-order flakiness by pinning the mocked current time and setting the message start time explicitly in the test setup.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-24 21:43:52 +09:00
YeonGyu-Kim
99f4c7e222 fix(hooks): stabilize session notification checks in parallel tests
Use sender-module indirection and an optional main-session filter guard to keep notification assertions deterministic across concurrent test execution.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-24 21:43:47 +09:00
CloudWaddie
54d0dcde48 fix: address code review feedback on PR #1988
- Fix operator precedence bug in hasActiveWork boolean expression
- Reuse getMainSessionStatus result from watchdog to avoid duplicate API calls
- Add flag to only check secondary timeout once to avoid unnecessary API traffic
2026-02-24 21:32:07 +09:00
CloudWaddie
159ade05cc fix(run): add event watchdog and secondary timeout for hasReceivedMeaningfulWork
Implements fixes from issue #1880 and #1934 to prevent exit code 130 timeout in CI environments:

- Add lastEventTimestamp to EventState for tracking when events were last received
- Add event watchdog: if no events for 30s, verify session status via direct API call
- Add secondary timeout: after 60s without meaningful work events, check for active children/todos and assume work is in progress

This prevents the poll loop from waiting for full 600s timeout when:
1. Event stream drops silently (common in CI with network instability)
2. Main session delegates to children without producing meaningful work on main session
2026-02-24 21:32:07 +09:00
github-actions[bot]
55b9ad60d8 release: v3.8.5 2026-02-24 09:45:36 +00:00
YeonGyu-Kim
e997e0071c Merge pull request #2088 from minpeter/feat/hashline-edit-error-hints
fix(hashline-edit): improve error messages for invalid LINE#ID references
2026-02-24 18:36:04 +09:00
YeonGyu-Kim
b8257dc59c fix(hashline-edit): tolerate >>> prefix and spaces around # in line refs 2026-02-24 18:21:05 +09:00
YeonGyu-Kim
365d863e3a fix(hashline-edit): use instanceof for hash mismatch error detection 2026-02-24 18:21:05 +09:00
YeonGyu-Kim
1785313f3b fix(hashline-read-enhancer): skip hashifying OpenCode-truncated lines 2026-02-24 18:21:05 +09:00
YeonGyu-Kim
ac962d62ab fix(hashline-edit): add same-line operation precedence ordering 2026-02-24 18:21:05 +09:00
YeonGyu-Kim
d61c0f8cb5 fix(hashline-read-enhancer): guard against overwriting error output with success message 2026-02-24 17:52:04 +09:00
YeonGyu-Kim
a567cd0d68 fix(hashline-edit): address Oracle review feedback
- Extract WRITE_SUCCESS_MARKER constant to couple guard and output string
- Remove double blank line after parseLineRefWithHint
- Add comment clarifying normalized equals ref.trim() in error paths
2026-02-24 17:41:30 +09:00
YeonGyu-Kim
55ad4297d4 fix(hashline-edit): widen non-numeric prefix detection and remove duplicate try-catch
- Replace regex /^([A-Za-z_]+)#.../ with indexOf-based prefix check to catch
  line-ref#VK and line.ref#VK style inputs that were previously giving generic errors
- Extract parseLineRefWithHint helper to eliminate duplicated try-catch in
  validateLineRef and validateLineRefs
- Restore idempotency guard in appendWriteHashlineOutput using new output format
- Add tests for LINE42 extraction, line-ref hint, line.ref hint, and guard behavior

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-24 17:32:44 +09:00
MoerAI
718884210b fix: resolve issues #1888, #1693, #1891
- fix(hooks): skip todo continuation when agent has pending question (#1888)
  Add pending-question-detection module that walks messages backwards
  to detect unanswered question tool_use, preventing CONTINUATION_PROMPT
  injection while awaiting user response.

- fix(config): allow custom agent names in disabled_agents (#1693)
  Change disabled_agents schema from BuiltinAgentNameSchema to z.string()
  and add filterDisabledAgents helper in agent-config-handler to filter
  user, project, and plugin agents with case-insensitive matching.

- fix(agents): change primary agents mode to 'all' (#1891)
  Update Sisyphus, Hephaestus, and Atlas agent modes from 'primary'
  to 'all' so they are available for @mention routing and task()
  delegation in addition to direct chat.
2026-02-24 16:57:02 +09:00
MoerAI
8d66ab742b fix(test): update EventState inline literal to use createEventState() spread
EventState interface gained new required fields; the inline literal in the
session.status test was missing them, causing type errors and runtime failures.
2026-02-24 16:31:44 +09:00
MoerAI
ad79246376 fix(config): respect user's external_directory permission setting
applyToolConfig() forcibly overrode the user's external_directory
permission to 'allow' by placing OMO defaults after the user config
spread. Reorder so defaults come first and user config spreads on
top, allowing users to set 'ask' or 'deny'. The task permission
remains forced to 'deny' after the spread for security.

Closes #1973
2026-02-24 16:31:44 +09:00
minpeter
c6a69899d8 fix(hashline-read-enhancer): simplify write tool output to line count summary
Replace full hashlined file content in write tool response with a simple
'File written successfully. N lines written.' summary to reduce context
bloat.
2026-02-24 16:00:23 +09:00
minpeter
2aeb96c3f6 fix(hashline-edit): improve error messages for invalid LINE#ID references
- Detect non-numeric prefixes (e.g., "LINE#HK", "POS#VK") and explain
  that the prefix must be an actual line number, not literal text
- Add suggestLineForHash() that reverse-looks up a hash in file lines
  to suggest the correct reference (e.g., Did you mean "1#HK"?)
- Unify error message format from "LINE#ID" to "{line_number}#{hash_id}"
  matching the tool description convention
- Add 3 tests covering non-numeric prefix detection and hash suggestion
2026-02-24 16:00:23 +09:00
YeonGyu-Kim
5fd65f2935 Merge pull request #2086 from code-yeongyu/refactor/hashline-legacy-cleanup
refactor(hashline-edit): clean up legacy code and dead exports
2026-02-24 15:44:32 +09:00
YeonGyu-Kim
b03aae57f3 fix: remove accidentally committed node_modules symlink 2026-02-24 15:39:31 +09:00
YeonGyu-Kim
8c3a0ca2fe refactor(hashline-edit): rename legacy operation names in error messages
Update error messages to match current op schema:
- insert_after → append (anchored)
- insert_before → prepend (anchored)
2026-02-24 15:33:48 +09:00
YeonGyu-Kim
9a2e0f1add refactor(hashline-edit): remove unnecessary barrel re-exports of internal primitives
applySetLine, applyReplaceLines, applyInsertAfter, applyInsertBefore
were re-exported from both edit-operations.ts and index.ts but have no
external consumers — they are only used internally within the module.
Only applyHashlineEdits (the public API) remains exported.
2026-02-24 15:33:17 +09:00
YeonGyu-Kim
d28ebd10c1 refactor(hashline-edit): remove HASHLINE_LEGACY_REF_PATTERN and legacy ref compat
Remove the old LINE:HEX (e.g. "42:ab") reference format support. All
refs now use LINE#ID format exclusively (e.g. "42#VK"). Also fixes
HASHLINE_OUTPUT_PATTERN to use | separator (was missed in PR #2079).
2026-02-24 15:32:24 +09:00
YeonGyu-Kim
fb92babee7 refactor(hashline-edit): remove dead applyInsertBetween function
This function is no longer called from edit-operations.ts after the
op/pos/end/lines schema refactor in PR #2079. Remove the function
definition and its 3 dedicated test cases.
2026-02-24 15:31:43 +09:00
YeonGyu-Kim
5d30ec80df Merge pull request #2079 from minpeter/feat/hashline-edit-op-schema
refactor(hashline-edit): align tool payload to op/pos/end/lines
2026-02-24 15:13:45 +09:00
YeonGyu-Kim
f50f3d3c37 fix(hashline-edit): clarify LINE#ID placeholder to prevent literal interpretation 2026-02-24 15:00:06 +09:00
YeonGyu-Kim
833c26ae5c sisyphus waits for oracle 2026-02-24 14:50:00 +09:00
minpeter
60cf2de16f fix(hashline-edit): detect overlapping ranges and prevent false unwrap of blank-line spans
- Add detectOverlappingRanges() to reject edits with overlapping pos..end ranges
  instead of crashing with undefined.match()
- Add bounds guard (?? "") in edit-operation-primitives for out-of-range line access
- Add null guard in leadingWhitespace() for undefined/empty input
- Fix restoreOldWrappedLines false unwrap: skip candidate spans containing
  blank/whitespace-only lines, preventing incorrect collapse of structural
  blank lines and indentation (the "애국가 bug")
- Improve tool description for range replace clarity
- Add tests: overlapping range detection, false unwrap prevention
2026-02-24 14:46:17 +09:00
minpeter
c7efe8f002 fix(hashline-edit): preserve intentional whitespace removal in autocorrect
restoreIndentForPairedReplacement() and restoreLeadingIndent() unconditionally
restored original indentation when replacement had none, preventing intentional
indentation changes (e.g. removing a tab from '\t1절' to '1절'). Skip indent
restoration when trimmed content is identical, indicating a whitespace-only edit.
2026-02-24 14:07:21 +09:00
minpeter
54b756c145 refactor(hashline): change content separator from colon to pipe
Change LINE#HASH:content format to LINE#HASH|content across the entire
codebase. The pipe separator is more visually distinct and avoids
conflicts with TypeScript colons in code content.

15 files updated: implementation, prompts, tests, and READMEs.
2026-02-24 06:01:24 +09:00
minpeter
1cb362773b fix(hashline-read-enhancer): handle inline <content> tag from updated OpenCode read tool
OpenCode updated its read tool output format — the <content> tag now shares
a line with the first content line (<content>1: content) with no newline.

The hook's exact indexOf('<content>') detection returned -1, causing all
read output to pass through unmodified (no hash anchors). This silently
disabled the entire hashline-edit workflow.

Fixes:
- Sub-bug 1: Use findIndex + startsWith instead of exact indexOf match
- Sub-bug 2: Extract inline content after <content> prefix as first line
- Sub-bug 3: Normalize open-tag line to bare tag in output (no duplicate)

Also adds backward compat for legacy <file> + 00001| pipe format.
2026-02-24 05:47:05 +09:00
minpeter
08b663df86 refactor(hashline-edit): enforce three-op edit model
Unify internal hashline edit handling around replace/append/prepend to remove legacy operation shapes. This keeps normalization, ordering, deduplication, execution, and tests aligned with the new op/pos/end/lines contract.
2026-02-24 05:06:41 +09:00
github-actions[bot]
fddd6f1306 @Firstbober has signed the CLA in code-yeongyu/oh-my-opencode#2080 2026-02-23 19:28:23 +00:00
YeonGyu-Kim
e11c217d15 fix(tools/background-task): respect block=true even when full_session=true
Move blocking/polling logic before full_session branch so that
block=true waits for task completion regardless of output format.

🤖 Generated with assistance of oh-my-opencode
2026-02-24 03:52:20 +09:00
minpeter
6ec0ff732b refactor(hashline-edit): align tool payload to op/pos/end/lines
Unify hashline_edit input with replace/append/prepend + pos/end/lines semantics so callers use a single stable shape. Add normalization coverage and refresh tool guidance/tests to reduce schema confusion and stale legacy payload usage.
2026-02-24 03:00:38 +09:00
github-actions[bot]
ebd26b7421 release: v3.8.4 2026-02-23 17:11:38 +00:00
YeonGyu-Kim
9f804c2a6a fix(test): sync AGENTS_WITH_TODO_DENY with tool-config-handler implementation 2026-02-24 02:08:30 +09:00
Firstbober
13716f78aa fix: model format normalization and explicit config cache bypass
- Add normalizeModelFormat() utility for string/object model handling
- Update subagent-resolver to handle both model formats
- Add explicitUserConfig flag to ModelResolutionResult
- Set explicitUserConfig: true when user model is found in pipeline

This fixes the issue where plugin-provided models fail cache validation
and fall through to random fallback models.
2026-02-23 17:42:53 +01:00
YeonGyu-Kim
05c04838f4 test(hashline-edit): cover concise responses and anchor alias normalization
Update expectations to the new pi-style response contract and add cases for one-anchor replace_lines fallback plus after_line alias handling.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 18:51:37 +09:00
YeonGyu-Kim
86671ad25c refactor(hashline-edit): adopt normalized single-shape edit input
Keep current field names but accept a pi-style flexible edit payload that is normalized to concrete operations at execution time.

Response now follows concise update/move status with diff metadata retained, removing full-file hashline echo to reduce model feedback loops.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 18:51:32 +09:00
YeonGyu-Kim
ab768029fa refactor(hashline-edit): stabilize hashes and tighten prefix stripping
Switch line hashing to significance-aware seeding so meaningful lines stay stable across reflows while punctuation-only lines still disambiguate by line index.

Also narrow prefix stripping to hashline/diff patterns that reduce accidental content corruption during edit normalization.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 18:51:25 +09:00
github-actions[bot]
afec1f2928 @DMax1314 has signed the CLA in code-yeongyu/oh-my-opencode#2068 2026-02-23 07:06:25 +00:00
Zhendong Li
584a82ea20 Update Kimi Code Subscription link in README
The link does not work anymore. You can use your referral link if you'd like. This one I'm sharing is just a direct link.
2026-02-23 01:59:43 -05:00
YeonGyu-Kim
41fe6ad2e4 fix(tools/call-omo-agent): replace as any with Record type cast in session-creator
Cast session body to Record<string, unknown> instead of as any

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:48 +09:00
YeonGyu-Kim
b47b034209 chore(assets): regenerate JSON schema
Regenerate oh-my-opencode.schema.json after config export changes

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:19 +09:00
YeonGyu-Kim
a37a6044dc refactor(config): remove unused barrel exports
Clean up unused re-exports from config barrel file

Remove 14 unused schema exports identified by knip analysis

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:17 +09:00
YeonGyu-Kim
7a01035736 refactor(agents/prometheus): remove unused barrel exports
Clean up unused re-exports from prometheus agents barrel file

Remove 9 unused exports identified by knip analysis

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:16 +09:00
YeonGyu-Kim
f1076d978e refactor(agents/atlas): remove unused barrel exports
Clean up unused re-exports from atlas agents barrel file

Remove 12 unused exports identified by knip analysis

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:14 +09:00
YeonGyu-Kim
3a5aaf6488 refactor(agents): remove unused barrel exports
Clean up unused re-exports from agents barrel file

Remove 24 unused exports identified by knip analysis

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:12 +09:00
YeonGyu-Kim
830dcf8d2f refactor(features): remove empty barrel files
Delete 2 empty barrel index.ts files:

- claude-tasks/index.ts

- mcp-oauth/index.ts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:11 +09:00
YeonGyu-Kim
96d51418d6 refactor(hooks): remove dead hook files
Delete 3 unused hook files:

- hashline-edit-diff-enhancer/index.ts (and test file)

- session-recovery/recover-empty-content-message.ts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:08 +09:00
YeonGyu-Kim
b3a6aaa843 refactor(shared): remove dead utility files
Delete 4 unused utility files:

- models-json-cache-reader.ts

- open-code-client-accessors.ts

- open-code-client-shapes.ts

- provider-models-cache-model-reader.ts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:06 +09:00
YeonGyu-Kim
1f62fa5b2a refactor(tools/call-omo-agent): remove dead code submodules
Delete 3 unused files in call-omo-agent module:

- session-completion-poller.ts

- session-message-output-extractor.ts

- subagent-session-prompter.ts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:04 +09:00
YeonGyu-Kim
2428a46e6d refactor(features/background-agent): remove dead code submodules
Delete 15 unused files in background-agent module:

- background-task-completer.ts

- format-duration.ts

- message-dir.ts

- parent-session-context-resolver.ts

- parent-session-notifier.ts (and its test file)

- result-handler-context.ts

- result-handler.ts

- session-output-validator.ts

- session-task-cleanup.ts

- session-todo-checker.ts

- spawner/background-session-creator.ts

- spawner/concurrency-key-from-launch-input.ts

- spawner/spawner-context.ts

- spawner/tmux-callback-invoker.ts

Update index.ts barrel and manager.ts/spawner.ts imports

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:43:01 +09:00
YeonGyu-Kim
b709fa8e83 fix(plugin/hooks): remove unnecessary as any cast
Remove as any from modelCacheState parameter

Structural typing works without explicit cast

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:45 +09:00
YeonGyu-Kim
0dc5f56af4 fix(shared): fix optional chaining on modelItem
Change modelItem.id to modelItem?.id to handle null values

Prevents TypeError when modelItem is null in provider-models cache

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:43 +09:00
YeonGyu-Kim
cd6c9cb5dc fix(cli/run): replace as any with Record type cast
Cast session body to Record<string, unknown> instead of as any

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:40 +09:00
YeonGyu-Kim
e5aa08b865 fix(tools/delegate-task): replace as any with Record type cast
Cast session body to Record<string, unknown> instead of as any

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:38 +09:00
YeonGyu-Kim
db15f96cd8 fix(tools/call-omo-agent): replace as any with SessionWithPromptAsync type
Add SessionWithPromptAsync local type for promptAsync access

Remove as any cast from session.promptAsync call

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:37 +09:00
YeonGyu-Kim
ff0e9ac557 fix(tools/call-omo-agent): replace as any with SDKMessage interface
Add SDKMessage local interface for message type safety

Replace any lambda params and message casts with SDKMessage

Remove eslint-disable comments for no-explicit-any

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:34 +09:00
YeonGyu-Kim
07113ebe94 fix(features/task-toast-manager): replace as any with ClientWithTui type
Add ClientWithTui local type for tui.showToast access

Remove 2 as any casts and eslint-disable comments

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:32 +09:00
YeonGyu-Kim
2d3d993eb6 fix(hooks/shared): replace as any with proper Record type cast
Cast pluginConfig.agents to Record type with proper structure

Remove eslint-disable comment for no-explicit-any

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:30 +09:00
YeonGyu-Kim
a82f4ee86a fix(hooks/thinking-block-validator): replace as any with typed interfaces
Add ThinkingPart and MessageInfoExtended local interfaces

Replace 3 as any casts with proper unknown-to-typed casts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:28 +09:00
YeonGyu-Kim
0cbc6b5410 fix(hooks/session-recovery): replace @ts-expect-error with proper type cast
Add ClientWithPromptAsync local type to avoid @ts-expect-error

Cast client to proper type before calling session.promptAsync

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:26 +09:00
YeonGyu-Kim
ac3a9fd272 fix(hooks/anthropic-context-window-limit-recovery): remove @ts-ignore comments and fix parameter types
Remove @ts-ignore and eslint-disable comments from executor.ts and recovery-hook.ts

- Change client: any to client: Client with proper import

- Rename experimental to _experimental for unused parameter

- Remove @ts-ignore for ctx.client casts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-23 02:42:24 +09:00
github-actions[bot]
41880f8ffb @imadal1n has signed the CLA in code-yeongyu/oh-my-opencode#2045 2026-02-22 10:57:45 +00:00
YeonGyu-Kim
35ab9b19c8 fix: deny todo tools for prometheus and sisyphus-junior when task_system enabled
Amp-Thread-ID: https://ampcode.com/threads/T-019c848f-b2a8-7037-9eb5-a258df14b683
Co-authored-by: Amp <amp@ampcode.com>
2026-02-22 17:58:42 +09:00
YeonGyu-Kim
6245e46885 feat(hooks): add Gemini-optimized ultrawork message with intent gate
Create dedicated Gemini ultrawork variant that enforces intent
classification as mandatory Step 0 before any action. Routes Gemini
models to the new variant via source-detector priority chain
(planner > GPT > Gemini > default). Includes anti-optimism checkpoint
and tool-call mandate sections tuned for Gemini's eager behavior.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-22 17:40:38 +09:00
YeonGyu-Kim
76da95116e feat(agents): add Gemini intent gate enforcement overlay for Sisyphus
Counter Gemini's tendency to skip Phase 0 intent classification by
injecting a mandatory self-check gate before tool calls. Includes
intent type classification, anti-skip mechanism, and common mistake
table showing wrong vs correct behavior per intent type.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-22 17:40:20 +09:00
YeonGyu-Kim
9933c6654f feat(model-fallback): disable model fallback retry by default
Model fallback is now opt-in via `model_fallback: true` in plugin config,
matching the runtime-fallback pattern. Prevents unexpected automatic model
switching on API errors unless explicitly enabled.
2026-02-22 17:25:04 +09:00
YeonGyu-Kim
2e845c8d99 feat(hooks): wire pluginConfig to preemptive-compaction hook factory 2026-02-22 17:19:46 +09:00
YeonGyu-Kim
bcf7fff9b9 feat(recovery-strategy): apply compaction model override in context window recovery 2026-02-22 17:19:43 +09:00
YeonGyu-Kim
2d069ce4cc feat(preemptive-compaction): apply compaction model override from agent config 2026-02-22 17:19:39 +09:00
YeonGyu-Kim
09314dba1a feat(schema): add compaction model and variant override configuration 2026-02-22 17:19:35 +09:00
YeonGyu-Kim
32a838ad3c feat(hooks): add compaction-model-resolver utility for session agent model lookup 2026-02-22 17:19:31 +09:00
YeonGyu-Kim
edf4d522d1 Merge pull request #2041 from code-yeongyu/fix/rewrite-overmocked-tests
refactor(tests): rewrite 5 over-mocked test files to test real behavior
2026-02-22 16:54:13 +09:00
YeonGyu-Kim
0bae7ec4fc chore(tests): remove duplicate test in background-update-check (cubic feedback) 2026-02-22 16:51:04 +09:00
YeonGyu-Kim
7e05bd2b8e refactor(tests): rewrite 5 over-mocked test files to test real behavior
- formatter.test.ts: use dynamic imports with cache-busting to avoid mock pollution from runner.test.ts; test real format output instead of dispatch mocking
- hook.test.ts: rewrite with proper branch coverage (7 tests), add success/guard/subagent paths
- background-update-check.test.ts: rewrite with 10 tests covering all branches (early returns, pinned versions, auto-update success/failure)
- directory-agents-injector/injector.test.ts: replace finder/storage mocks with real filesystem + temp directories, verify actual AGENTS.md injection content
- directory-readme-injector/injector.test.ts: same pattern as agents-injector but for README.md, verifies root inclusion behavior
2026-02-22 16:43:56 +09:00
github-actions[bot]
ffa2a255d9 release: v3.8.3 2026-02-22 06:46:51 +00:00
YeonGyu-Kim
07e8a7c570 feat(write-existing-file-guard): allow writes outside session directory
Remove blocking logic that prevented writes to files outside the
session directory. The guard now only applies to files within the
session directory, allowing free writes to external paths.

- Remove OUTSIDE_SESSION_MESSAGE constant
- Update test to expect outside writes to be allowed
- Add early return for paths outside session directory
- Keep isPathInsideDirectory for session boundary check

TDD cycle:
1. RED: Update test expectation
2. GREEN: Implement early return for outside paths
3. REFACTOR: Clean up unused constants
2026-02-22 15:43:19 +09:00
github-actions[bot]
d0b18787ba release: v3.8.2 2026-02-22 06:35:05 +00:00
YeonGyu-Kim
4d7b98d9f2 bun 2026-02-22 15:30:59 +09:00
YeonGyu-Kim
a3e4f904a6 refactor(background-agent): wire session-idle-event-handler into manager, add unit tests
The extracted handleSessionIdleBackgroundEvent was never imported by
manager.ts — dead code from incomplete refactoring (d53bcfbc). Replace
the inline session.idle handler (58 LOC) with a call to the extracted
function, remove unused MIN_IDLE_TIME_MS import, and add 13 unit tests
covering all edge cases.
2026-02-22 15:30:40 +09:00
YeonGyu-Kim
c0636e5b0c feat(agents,hooks): wire Sisyphus Gemini overlays and add Gemini verification reminder
Sisyphus: inject TOOL_CALL_MANDATE after intent gate, append delegation
and verification override sections for Gemini models.

Atlas hook: add VERIFICATION_REMINDER_GEMINI with stronger language -
'EXTREMELY SUSPICIOUS', explicit 'NOT reasoning, TOOL CALLS', and
consequence-driven framing for Gemini's optimistic tendencies.
2026-02-22 15:30:40 +09:00
YeonGyu-Kim
49e885d81d feat(agents): wire Gemini prompt routing into Sisyphus-Junior, Atlas, Prometheus
Add 'gemini' to prompt source types and route Gemini models to new
Gemini-optimized prompts via isGeminiModel detection. Update barrel
exports for all 3 agent modules. All existing tests pass.
2026-02-22 15:30:40 +09:00
YeonGyu-Kim
bf33e6f651 feat(agents): add isGeminiModel detection function with TDD
Detects Gemini models via:
- Provider prefixes: google/, google-vertex/
- GitHub Copilot: github-copilot/gemini-*
- Model name: gemini-* (for proxied providers like litellm)

Follows existing isGptModel pattern. All 16 tests pass.
2026-02-22 15:30:40 +09:00
YeonGyu-Kim
da13a2f673 feat(agents): add Gemini-optimized prompts for Sisyphus, Sisyphus-Junior, Prometheus, Atlas
Gemini models are aggressively optimistic and avoid tool calls in favor of
internal reasoning. These prompts counter that with:
- TOOL_CALL_MANDATE sections forcing actual tool usage
- Anti-optimism checkpoints before claiming completion
- Stronger delegation enforcement (Gemini prefers doing work itself)
- Aggressive verification language (subagent results are 'EXTREMELY SUSPICIOUS')
- Mandatory thinking checkpoints in Prometheus (prevents jumping to conclusions)
- Scope discipline reminders (creativity → implementation quality, not scope creep)
2026-02-22 15:30:40 +09:00
YeonGyu-Kim
02aff32b0c Merge pull request #2039 from code-yeongyu/fix/grep-formatter-files-mode
fix(grep): format files_with_matches output as clean file paths
2026-02-22 15:26:09 +09:00
YeonGyu-Kim
c806a35e49 fix(grep): format files_with_matches output as clean file paths 2026-02-22 15:19:26 +09:00
YeonGyu-Kim
b175c11b35 Merge pull request #2009 from JiHongKim98/fix/ripgrep-cpu-throttle
fix(tools): throttle ripgrep CPU usage with thread limits and concurrency control
2026-02-22 15:09:26 +09:00
YeonGyu-Kim
7b55cbab94 Merge pull request #2030 from acamq/feature/agent-input-notifications
feat(notification): alert when agent asks questions or needs permission
2026-02-22 15:09:24 +09:00
YeonGyu-Kim
6904cba061 Merge pull request #2029 from coleleavitt/fix/plug-resource-leaks
fix: plug resource leaks and add hook command timeout
2026-02-22 15:07:02 +09:00
YeonGyu-Kim
ac81e1d7cd fix(hashline-edit): correct offset advancement and fuzzy index mapping in merge expand
- Track matchedLen separately for stripped continuation token matches
- Map fuzzy index back to original string position via character-by-character
  scan that skips operator chars, fixing positional correctness
2026-02-22 14:50:59 +09:00
YeonGyu-Kim
9390f98f01 fix(hashline-edit): integrate continuation/merge helpers into expand logic and strengthen tool description
- maybeExpandSingleLineMerge now uses stripTrailingContinuationTokens and
  stripMergeOperatorChars as fallback matching strategies
- Add 'refs interpreted against last read' atomicity clause to tool description
- Add 'output tool calls only; no prose' rule to tool description
2026-02-22 14:46:59 +09:00
YeonGyu-Kim
e6868e9112 fix(hashline-edit): align autocorrect, BOM/CRLF, and tool description with oh-my-pi
- Rewrite restoreOldWrappedLines to use oh-my-pi's span-scanning algorithm
- Add stripTrailingContinuationTokens and stripMergeOperatorChars helpers
- Fix detectLineEnding to use first-occurrence logic instead of any-match
- Fix applyAppend/applyPrepend to replace empty-line placeholder in empty files
- Enhance tool description with 7 critical rules, tag guidance, and anti-patterns
2026-02-22 14:40:18 +09:00
YeonGyu-Kim
5d1d87cc10 feat(hashline-edit): add autocorrect, BOM/CRLF normalization, and file creation support
Implements key features from oh-my-pi to improve agent editing success rates:

- Autocorrect v1: single-line merge expansion, wrapped line restoration,
  paired indent restoration (autocorrect-replacement-lines.ts)
- BOM/CRLF normalization: canonicalize on read, restore on write
  (file-text-canonicalization.ts)
- Pre-validate all hashes before mutation (edit-ordering.ts)
- File creation via append/prepend operations (new types + executor logic)
- Modular refactoring: split edit-operations.ts into focused modules
  (primitives, ordering, deduplication, diff, executor)
- Enhanced tool description with operation choice guide and recovery hints

All 50 tests pass. TypeScript clean. Build successful.
2026-02-22 14:13:59 +09:00
github-actions[bot]
e84fce3121 release: v3.8.1 2026-02-22 03:37:21 +00:00
YeonGyu-Kim
a8f0300ba6 Merge pull request #2035 from code-yeongyu/fix/background-agent-review-feedback
fix: address Oracle + Cubic review feedback for background-agent refactoring
2026-02-22 12:18:07 +09:00
YeonGyu-Kim
d1e5bd63c1 fix: address Oracle + Cubic review feedback for background-agent refactoring
- Revert getMessageDir to original join(MESSAGE_STORAGE, sessionID) behavior
- Fix dead subagentSessions.delete by capturing previousSessionID before tryFallbackRetry
- Add .unref() to process cleanup setTimeout to prevent 6s hang on Ctrl-C
- Add missing isUnstableAgent to fallback retry input mapping
- Fix process-cleanup tests to use exit listener instead of SIGINT at index 0
- Swap test filenames in compaction-aware-message-resolver to exercise skip logic correctly
2026-02-22 12:14:26 +09:00
YeonGyu-Kim
ed43cd4c85 Merge pull request #2034 from code-yeongyu/refactor/background-manager-extraction
Extract inline logic from BackgroundManager into focused modules
2026-02-22 12:09:00 +09:00
YeonGyu-Kim
8d66d5641a test(background-agent): add unit tests for extracted modules
Add 104 new tests across 4 test files:
- error-classifier.test.ts (80 tests): isRecord, isAbortedSessionError, getErrorText, extractErrorName, extractErrorMessage, getSessionErrorMessage
- fallback-retry-handler.test.ts (19 tests): retry logic, fallback chain, concurrency release, session abort, queue management
- process-cleanup.test.ts (7 tests): signal registration, multi-manager shutdown, cleanup on unregister
- compaction-aware-message-resolver.test.ts (13 tests): compaction agent detection, message resolution with temp dirs (pre-existing, verified)

Total background-agent tests: 161 -> 265 (104 new, 0 regressions)
2026-02-22 11:59:06 +09:00
YeonGyu-Kim
d53bcfbced refactor(background-agent): extract inline logic from manager.ts into focused modules
Extract 5 concerns from BackgroundManager into dedicated modules:
- error-classifier.ts: enhance with extractErrorName, extractErrorMessage, getSessionErrorMessage, isRecord
- fallback-retry-handler.ts: standalone tryFallbackRetry with full retry logic
- process-cleanup.ts: registerManagerForCleanup/unregisterManagerForCleanup
- compaction-aware-message-resolver.ts: isCompactionAgent/findNearestMessageExcludingCompaction
- Delete notification-builder.ts (duplicate of background-task-notification-template.ts)

Manager.ts method bodies now delegate to extracted modules.
Wire duration-formatter.ts and task-poller.ts (existing but unused).

manager.ts: 2036 -> 1647 LOC (19% reduction).
All 161 existing tests pass unchanged.
2026-02-22 11:58:57 +09:00
Cole Leavitt
116f17ed11 fix: add proc.kill fallback when process group kill fails 2026-02-21 16:45:18 -07:00
Cole Leavitt
a31109bb07 fix: kill process group on timeout and handle stdin EPIPE
- Use detached process group (non-Windows) + process.kill(-pid) to kill
  the entire process tree, not just the outer shell wrapper
- Add proc.stdin error listener to absorb EPIPE when child exits before
  stdin write completes
2026-02-21 16:45:00 -07:00
Cole Leavitt
91530234ec fix: handle signal-killed exit code and guard SIGTERM kill
- code ?? 0 → code ?? 1: signal-terminated processes return null exit code,
  which was incorrectly coerced to 0 (success) instead of 1 (failure)
- wrap proc.kill(SIGTERM) in try/catch to match SIGKILL guard and prevent
  EPERM/ESRCH from crashing on already-dead processes
2026-02-21 16:45:00 -07:00
Cole Leavitt
6aa1e96f9e fix: plug resource leaks and add hook command timeout
- LSP signal handlers: store refs, return unregister handle, call in stopAll()
- session-tools-store: add per-session deleteSessionTools(), wire into session.deleted
- executeHookCommand: add 30s timeout with SIGTERM→SIGKILL escalation
2026-02-21 16:44:59 -07:00
acamq
f265e37cbc fix(notification): use permission.asked and main-session fallback 2026-02-21 16:42:23 -07:00
github-actions[bot]
c1ee4c8650 @coleleavitt has signed the CLA in code-yeongyu/oh-my-opencode#2029 2026-02-21 23:03:18 +00:00
acamq
931c0cd101 feat(notification): alert when agent asks questions or needs permission 2026-02-21 16:01:38 -07:00
YeonGyu-Kim
ead4a1bcf5 Merge branch 'origin/dev' into dev
Resolves conflicts in hashline-edit module:

- Accept Cubic-reviewed fixes from origin/dev

- Maintains: insert_before, insert_between, streaming formatters, strict validation

- Includes: hashline-chunk-formatter.ts extracted module

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-22 04:48:30 +09:00
YeonGyu-Kim
07ec7be792 Merge pull request #2026 from code-yeongyu/feat/hashline-edit-anchor-modes
feat(hashline-edit): add anchor insert modes and strict insert validation
2026-02-22 04:46:55 +09:00
YeonGyu-Kim
7e68690c70 fix(hashline-edit): address Cubic review issues - boundary echo, chunking dedup, empty stream alignment
- Fix single-line anchor-echo stripping to trigger empty-insert validation

- Fix trailing boundary-echo stripping for boundary-only payloads

- Extract shared chunking logic to hashline-chunk-formatter

- Align empty stream/iterable handling with formatHashLines

- Add regression tests for all fixes
2026-02-22 03:54:31 +09:00
YeonGyu-Kim
22b4f465ab feat(hashline-edit): add anchor insert modes and strict insert validation 2026-02-22 03:38:47 +09:00
YeonGyu-Kim
a39f183c31 feat(hashline-edit): add anchor insert modes and strict insert validation 2026-02-22 03:38:04 +09:00
YeonGyu-Kim
f7c5c0be35 feat(sisyphus): add deep parallel delegation section to prompt
Add buildDeepParallelSection() function that injects guidance for non-Claude
models on parallel deep agent delegation:
- Detect when model is non-Claude and 'deep' category is available
- Inject instructions to decompose tasks and delegate to deep agents in parallel
- Give goals, not step-by-step instructions to deep agents
- Update Sisyphus prompt builder to pass model and call new function

This helps GPT-based Sisyphus instances leverage deep agents more effectively
for complex implementation tasks.

🤖 Generated with assistance of OhMyOpenCode
2026-02-22 03:20:57 +09:00
YeonGyu-Kim
022a351c32 docs: rewrite agent-model matching guide with developer personality metaphor
Completely restructure the documentation to explain model-agent matching
through the "Models Are Developers" lens:
- Add narrative sections on Sisyphus (sociable lead) and Hephaestus (deep specialist)
- Explain Claude vs GPT thinking differences (mechanics vs principles)
- Reorganize agent profiles by personality type (communicators, specialists, utilities)
- Simplify model families section
- Add "About Free-Tier Fallbacks" section
- Move example configuration to customization section

This makes the guide more conceptual and memorable for users customizing
agent models.

🤖 Generated with assistance of OhMyOpenCode
2026-02-22 03:20:36 +09:00
github-actions[bot]
d6939229b3 release: v3.8.0 2026-02-21 17:56:31 +00:00
YeonGyu-Kim
0d76874632 ci(publish): isolate executor.test.ts to prevent mock contamination 2026-02-22 02:53:38 +09:00
YeonGyu-Kim
121e1cb879 fix(delegate-task): aggressive tool description to prevent missing category/subagent_type
Problem: Agents frequently omit both 'category' and 'subagent_type' parameters
when calling the task() tool, causing validation failures. The JSON Schema
marks both as optional, and LLMs follow schema structure over description text.

Solution (Option A): Add aggressive visual warnings and failure-mode examples
to the tool description:
- ⚠️ CRITICAL warning header
- COMMON MISTAKE example showing what will FAIL
- CORRECT examples for both category and subagent_type usage
- Clear explanation that ONE must be provided

Tests: All 153 existing tests pass (no behavior change, only prompt improvement)
2026-02-22 02:51:03 +09:00
YeonGyu-Kim
30491d769b ci: isolate executor.test.ts to prevent mock contamination in batch runs 2026-02-22 02:46:54 +09:00
YeonGyu-Kim
b6b970d9cd fix(test): use static imports and strategy-level spies in executor.test.ts for CI stability 2026-02-22 02:42:59 +09:00
YeonGyu-Kim
dd9df78564 fix(test): harden executor.test.ts mock isolation for CI batch runs 2026-02-22 02:31:27 +09:00
YeonGyu-Kim
538b1005ef fix(test): flush fake timer microtasks in todo continuation tests 2026-02-22 02:18:47 +09:00
YeonGyu-Kim
27d5379215 refactor(hooks): remove beast-mode system integration
Remove the beast-mode-system hook and all transform wiring so Copilot-specific prompt injection is fully eliminated from the runtime pipeline.
2026-02-22 01:57:22 +09:00
YeonGyu-Kim
9b56b748ec chore: regenerate JSON schema for runtime_fallback union type 2026-02-22 01:54:51 +09:00
YeonGyu-Kim
976798d0e3 feat(config): disable runtime_fallback by default (opt-in) 2026-02-22 01:54:34 +09:00
YeonGyu-Kim
309869a79f docs(config): document runtime_fallback boolean shorthand
Add simple boolean configuration examples for runtime_fallback:
- true/false for quick enable/disable
- Object format for advanced configuration
2026-02-22 01:45:32 +09:00
YeonGyu-Kim
9f10997987 feat(config): allow runtime_fallback to be configured as boolean
Enable simple boolean configuration for runtime_fallback:
- "runtime_fallback": true - Enable with defaults
- "runtime_fallback": false - Disable
- "runtime_fallback": { ... } - Advanced object config (existing)

Updated schema, event handler, chat-message handler, and session hooks
to handle both boolean and object formats.
2026-02-22 01:44:53 +09:00
github-actions[bot]
aff49ef488 @cruzanstx has signed the CLA in code-yeongyu/oh-my-opencode#2021 2026-02-21 15:09:31 +00:00
Gershom Rogers
0dee4377b8 feat(dispatch): wire marketplace plugin commands into slash command dispatch
Connect the existing plugin loader infrastructure to both slash command
dispatch paths (executor and slashcommand tool), enabling namespaced
commands like /daplug:run-prompt to resolve and execute.

- Add plugin discovery to executor.ts discoverAllCommands()
- Add plugin discovery to command-discovery.ts discoverCommandsSync()
- Add "plugin" to CommandScope type
- Remove blanket colon-rejection error (replaced with standard not-found)
- Update slash command regex to accept namespaced commands
- Thread claude_code.plugins config toggle through dispatch chain
- Add unit tests for plugin command discovery and dispatch

Closes #2019

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
2026-02-21 10:05:50 -05:00
YeonGyu-Kim
1c7eb55f9c fix(hooks): use model cache availability with timeout for first-run cache creation
Replace fire-and-forget pattern with await + 10s timeout for initial

cache creation. Check model cache availability (not connected providers)

to properly coordinate with model-cache-warning hook.

Remove non-null assertion and add proper error logging.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 18:32:10 +09:00
YeonGyu-Kim
f0204b0514 fix(hooks): swap execution order to create cache before checking
Ensure cache creation runs before cache warning check to prevent false

'Model Cache Not Found' warnings on first run.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 18:32:01 +09:00
YeonGyu-Kim
0b4ebc3538 docs: reorganize configuration.md for better readability
- Add Table of Contents with clear navigation structure
- Reorganize sections into logical groups:
  - Getting Started (File Locations, Quick Start Example)
  - Core Concepts (Agents, Categories, Model Resolution)
  - Task System (Background Tasks, Sisyphus Agent, Sisyphus Tasks)
  - Features (Skills, Hooks, Commands, Integrations)
  - Advanced (Runtime Fallback, Hashline Edit, Experimental)
  - Reference (Environment Variables, Provider-Specific)
- Improve section headers and descriptions
- Add cross-references within document
- Maintain all original content without omissions
- Add clarifying comments to Quick Start Example
2026-02-21 17:23:28 +09:00
YeonGyu-Kim
5a3fddf03b docs: reorganize overview.md for better first-time user experience
- Add Quick Start section with clear installation link
- Add 'How It Works: Agent Orchestration' section linking to orchestration.md
- Add 'Agent Model Matching' section with JSON configuration examples
- Restructure content flow for better readability
- Add example JSON config to agent-model-matching.md
- Maintain original voice and strong opinions while improving organization
- All links now properly reference related docs
2026-02-21 17:14:15 +09:00
YeonGyu-Kim
8ae2f4fa39 docs: update README and installation guide
Update README with Anthropic blocking mention and revised model descriptions.
Fix markdown table alignment in both README and installation guide.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 17:07:44 +09:00
YeonGyu-Kim
6a31e911d8 feat(hooks): add task-reminder hook for task tool usage tracking
Injects a reminder after 10 tool turns without task tool usage. Tracks
per-session counters and cleans up on session deletion.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 17:07:39 +09:00
YeonGyu-Kim
865ced72e4 feat(hooks): add hashline-edit-diff-enhancer for Write tool diff metadata
Captures file content before/after Write tool execution and injects unified
diff into tool output metadata. TUI reads metadata.diff for rendering.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 17:07:34 +09:00
YeonGyu-Kim
90dccfbdaf feat(delegate-task): pass directory option through skill discovery
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 17:07:29 +09:00
YeonGyu-Kim
dc76e2cd11 docs: rewrite configuration.md for clarity and concision
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 17:05:30 +09:00
YeonGyu-Kim
dfb2f54cf8 docs: restore agent-model matching guide
Restore docs/guide/agent-model-matching.md that was accidentally deleted
in commit 880c5e3b (docs restructure). Updated broken links to point to
current documentation structure.
2026-02-21 17:05:11 +09:00
YeonGyu-Kim
1205e60fb9 fix: resolve publish blockers for v3.7.4→v3.8.0 release (#2014)
fix: resolve publish blockers for v3.7.4→v3.8.0 release
2026-02-21 16:43:19 +09:00
YeonGyu-Kim
66aebb1b59 fix: resolve ultrabrain review findings
- Remove runtime-fallback gate from session.status retry handler — runtime-fallback
  has no session.status handler, so gating it causes retry signals to be silently dropped
- Fix background_output full_session arg description: default is true, not false
2026-02-21 16:40:15 +09:00
YeonGyu-Kim
fe415319e5 fix: resolve publish blockers for v3.7.4→v3.8.0 release
- Fix #1991 crash: optional chaining for task-history sessionID access
- Fix #1992 think-mode: add antigravity entries to HIGH_VARIANT_MAP
- Fix #1949 Copilot premium misattribution: use createInternalAgentTextPart
- Fix #1982 load_skills: pass directory to discoverSkills for project-level skills
- Fix command priority: sort scopePriority before .find(), project-first return
- Fix Google provider transform: apply in userFallbackModels path
- Fix ralph-loop TUI: optional chaining for event handler
- Fix runtime-fallback: unify dual fallback engines, remove HTTP 400 from retry,
  fix pendingFallbackModel stuck state, add priority gate to skip model-fallback
  when runtime-fallback is active
- Fix Prometheus task system: exempt from todowrite/todoread deny
- Fix background_output: default full_session to true
- Remove orphan hooks: hashline-edit-diff-enhancer (redundant with hashline_edit
  built-in diff), task-reminder (dead code)
- Remove orphan config entries: 3 stale hook names from Zod schema
- Fix disabled_hooks schema: accept arbitrary strings for forward compatibility
- Register json-error-recovery hook in tool-guard pipeline
- Add disabled_hooks gating for question-label-truncator, task-resume-info,
  claude-code-hooks
- Update test expectations to match new behavior
2026-02-21 16:24:18 +09:00
YeonGyu-Kim
ee5df1683e refactor: remove slashcommand tool implementation 2026-02-21 14:38:18 +09:00
YeonGyu-Kim
552ad3a09c refactor: remove unused 'message' variable from chat-message.ts 2026-02-21 14:31:42 +09:00
YeonGyu-Kim
2d79d64bb2 fix(build): correct JSON schema target from draft-07 to draft-7
Fix invalid target warning in schema generation.
Schema regenerated with correct draft-7 target.
2026-02-21 14:19:52 +09:00
YeonGyu-Kim
c1c7d18133 fix: resolve 4 publish blockers — CLI bin, schema export, security vulns, doc link
- Remove leading ./ from bin entry (npm strips invalid paths)
- Write schema to dist/ for export map compatibility (keep assets/ for GitHub URL)
- Remove unused codex dep + bump @modelcontextprotocol/sdk to ^1.25.2
- Fix broken relative link in configuration.md (../guide/installation.md)

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 13:59:53 +09:00
YeonGyu-Kim
8623f58a38 fix: resolve 5 deployment blockers (runtime-fallback race, hashline legacy, tmux spawn, db open)
- runtime-fallback: guard session.error with sessionRetryInFlight to prevent
  double-advance during active retry; expand session.stop abort to include
  sessionAwaitingFallbackResult; remove premature pendingFallbackModel clearing
  from auto-retry finally block
- hashline-edit: add HASHLINE_LEGACY_REF_PATTERN for backward-compatible
  LINE:HEX dual-parse in parseLineRef and normalizeLineRef
- tmux-subagent: defer session on null queryWindowState; unconditionally
  re-queue deferred session on spawn failure (not just close+spawn)
- ultrawork-db: wrap new Database(dbPath) in try/catch to handle corrupted DB
- event: add try/catch guards around model-fallback logic in message.updated,
  session.status, and session.error handlers
2026-02-21 05:59:30 +09:00
YeonGyu-Kim
546cefd8f8 docs: remove quotio/cliproxyapi references from READMEs 2026-02-21 05:59:19 +09:00
YeonGyu-Kim
5adbbad277 Merge pull request #2007 from code-yeongyu/fix/1901-ralph-loop-fresh-context
feat(ralph-loop): add strategy option for fresh context per iteration
2026-02-21 05:41:12 +09:00
YeonGyu-Kim
e58c2efa70 Merge pull request #2006 from code-yeongyu/fix/1920-auto-update-pinned
fix(auto-update): treat only explicit semver pins as user-pinned
2026-02-21 05:40:53 +09:00
YeonGyu-Kim
92c3d3917b Merge pull request #2005 from code-yeongyu/fix/1803-session-recovery-unavailable-tool
fix(session-recovery): handle unavailable_tool (dummy_tool) errors
2026-02-21 05:40:32 +09:00
YeonGyu-Kim
940e49b44c fix(ralph-loop): use shared isRecord, fix quoted argument parsing for prompt and completion-promise 2026-02-21 05:36:11 +09:00
YeonGyu-Kim
1db5a666dc ci: trigger CI run 2026-02-21 05:36:11 +09:00
YeonGyu-Kim
590dc04be7 fix(ralph-loop): bind selectSession to tui context, use sourceSessionID for tool inheritance, handle flag-only arguments, fix test provider mocks 2026-02-21 05:36:11 +09:00
YeonGyu-Kim
daa0d48026 fix(rebase): remove duplicated hooks exports and event dispatch artifact 2026-02-21 05:36:11 +09:00
YeonGyu-Kim
db9df55e41 fix(session-recovery): fix SDK fallback part.tool mapping and nosuchtoolarror typo 2026-02-21 05:35:28 +09:00
YeonGyu-Kim
d08fa728b4 test(executor): add afterEach cleanup to prevent timer leaks on assertion failure 2026-02-21 05:35:28 +09:00
YeonGyu-Kim
1970d6d72b ci: trigger CI run 2026-02-21 05:35:28 +09:00
YeonGyu-Kim
fbe7e61ab4 test(auto-compact): restore module mocks after hook test
Prevent cross-file mock.module leakage by restoring Bun mocks after recovery-hook test, so executor tests always run against the real module implementation.
2026-02-21 05:35:28 +09:00
YeonGyu-Kim
d618678844 test(auto-compact): localize fake timers per async case
Stop patching global timers in every lock-management test. Use scoped fake timers only in continuation tests so lock/notification assertions remain deterministic in CI.
2026-02-21 05:34:46 +09:00
YeonGyu-Kim
4aec627b33 test: stabilize parallel-sensitive CI specs
Relax verbose event assertions to target custom-event logs only and run compact lock-management specs serially to avoid global timer races in CI.
2026-02-21 05:34:46 +09:00
YeonGyu-Kim
e21bbed3ab fix(plugin): repair event dispatch parse error
Remove duplicated dispatchToHooks declaration that broke TypeScript parsing, and isolate chat-headers tests from marker cache collisions with unique message IDs.
2026-02-21 05:34:34 +09:00
YeonGyu-Kim
7bb427078a fix(ralph-loop): use inherited fallback context and SDK TUI session selection 2026-02-21 05:33:53 +09:00
YeonGyu-Kim
6ad615958f fix(ci): restore missing hook exports and align config-handler test fixtures 2026-02-21 05:33:53 +09:00
YeonGyu-Kim
5c83fee619 feat(ralph-loop): add strategy option for fresh context per iteration
Closes #1901

Add 'default_strategy' config option (default: 'continue') to control whether ralph-loop creates a new session per iteration ('reset') or keeps the same session ('continue'). The 'reset' strategy keeps the model in the smart zone by starting with fresh context for each iteration.

Supports --strategy flag for per-command override.
2026-02-21 05:33:53 +09:00
YeonGyu-Kim
b48804e3cb fix(config-handler): preserve disable_omo_env wiring in agent setup 2026-02-21 05:33:52 +09:00
YeonGyu-Kim
49aa5162bb fix(session-recovery): harden unavailable tool recovery flow 2026-02-21 05:33:52 +09:00
YeonGyu-Kim
414099534e fix(plugin): remove stale hook wiring for missing hooks 2026-02-21 05:33:52 +09:00
YeonGyu-Kim
e6883a45e2 fix(session-recovery): wire unavailable_tool recovery in hook 2026-02-21 05:33:52 +09:00
YeonGyu-Kim
b404bcd42c fix(session-recovery): recover unavailable_tool with synthetic tool_result 2026-02-21 05:33:52 +09:00
YeonGyu-Kim
43b8884db6 fix(session-recovery): detect unavailable_tool errors 2026-02-21 05:33:52 +09:00
YeonGyu-Kim
8f37d7ffe1 fix(doctor): align isPinned logic with auto-updater to treat channel tags as not pinned 2026-02-21 05:31:53 +09:00
YeonGyu-Kim
51654c1c5e Merge pull request #2004 from code-yeongyu/fix/1804-1962-migration-overwrite
fix(migration): remove non-existent gpt-5.3-codex migration from MODEL_VERSION_MAP
2026-02-21 05:31:00 +09:00
YeonGyu-Kim
64ff0da1a2 test: restore mocked modules in recovery-hook to prevent cross-test leakage 2026-02-21 05:12:07 +09:00
YeonGyu-Kim
567b2bcfae ci: isolate recovery-hook.test.ts to prevent mock.module leakage
recovery-hook.test.ts uses mock.module() at top level which patches the
executor module in the shared bun module cache. When run in the same
batch as executor.test.ts, executeCompact becomes the mocked no-op version,
causing all lock management tests to fail.

Move it to the isolated step (each file gets its own bun process) and
enumerate the remaining anthropic-context-window-limit-recovery test files
explicitly to avoid including recovery-hook.test.ts in the batch.
2026-02-21 05:11:50 +09:00
YeonGyu-Kim
856bf4701e ci: isolate recovery-hook.test.ts to prevent mock.module leakage
recovery-hook.test.ts uses mock.module() at top level which patches the
executor module in the shared bun module cache. When run in the same
batch as executor.test.ts, executeCompact becomes the mocked no-op version,
causing all lock management tests to fail.

Move it to the isolated step (each file gets its own bun process) and
enumerate the remaining anthropic-context-window-limit-recovery test files
explicitly to avoid including recovery-hook.test.ts in the batch.
2026-02-21 05:11:50 +09:00
YeonGyu-Kim
58b924aabe ci: isolate recovery-hook.test.ts to prevent mock.module leakage
recovery-hook.test.ts uses mock.module() at top level which patches the
executor module in the shared bun module cache. When run in the same
batch as executor.test.ts, executeCompact becomes the mocked no-op version,
causing all lock management tests to fail.

Move it to the isolated step (each file gets its own bun process) and
enumerate the remaining anthropic-context-window-limit-recovery test files
explicitly to avoid including recovery-hook.test.ts in the batch.
2026-02-21 05:11:40 +09:00
YeonGyu-Kim
145bb65192 test(events): use baseline snapshot pattern for console spy isolation
Replace exact call count assertions with delta-based checks:
- capture errorSpy.mock.calls.length before processing events
- slice to only check calls made during this test's execution
- use try/finally to guarantee mockRestore() even on assertion failure

This prevents test pollution from cross-file spy leakage in CI batch runs.
2026-02-21 05:09:12 +09:00
YeonGyu-Kim
165c8122f6 test(events): use baseline snapshot pattern for console spy isolation
Replace exact call count assertions with delta-based checks:
- capture errorSpy.mock.calls.length before processing events
- slice to only check calls made during this test's execution
- use try/finally to guarantee mockRestore() even on assertion failure

This prevents test pollution from cross-file spy leakage in CI batch runs.
2026-02-21 05:09:10 +09:00
YeonGyu-Kim
4268cada8d test(events): use baseline snapshot pattern for console spy isolation
Replace exact call count assertions with delta-based checks:
- capture errorSpy.mock.calls.length before processing events
- slice to only check calls made during this test's execution
- use try/finally to guarantee mockRestore() even on assertion failure

This prevents test pollution from cross-file spy leakage in CI batch runs.
2026-02-21 05:08:58 +09:00
YeonGyu-Kim
8b11fe5402 test: fix flaky timer isolation and dynamic-import non-determinism
- executor.test.ts: capture globalThis.setTimeout/clearTimeout at module level
- events.test.ts: replace dynamic await import with static top-level import
2026-02-21 04:57:18 +09:00
YeonGyu-Kim
70b814a852 test: fix flaky timer isolation and dynamic-import non-determinism
- executor.test.ts: capture globalThis.setTimeout/clearTimeout at module level
- events.test.ts: replace dynamic await import with static top-level import
2026-02-21 04:57:10 +09:00
YeonGyu-Kim
07c89f0091 docs: restore coding on steroids narrative with future-betting manifesto in all READMEs 2026-02-21 04:54:21 +09:00
YeonGyu-Kim
b1eccf7425 docs: update all 31 AGENTS.md files with current project state 2026-02-21 04:38:18 +09:00
YeonGyu-Kim
924df193ba docs: update Korean and Chinese README taglines with future-betting message
Complete the integration of multi-model future vision into all 4 READMEs:
- Korean: Full tagline with orchestration, cheaper/smarter models, open market
- Chinese: Full tagline with model orchestration and future betting

All READMEs now consistently convey: we ride all models, not just Claude.
The future is multi-model orchestration, not picking one winner.
2026-02-21 04:35:14 +09:00
YeonGyu-Kim
745fd1fbb5 docs: integrate future-betting manifesto into README taglines
Remove separate 'The Bet' sections and weave the multi-model future
vision directly into the existing 'steroids/prison' taglines:

- English: Expanded tagline with model orchestration and future betting
- Korean: '우리가 보는 미래' 섹션 제거, 태그라인에 통합
- Japanese: '私たちが賭ける未来' セクション削除、タグライン統合
- Chinese: '我们押注的未来' 部分删除,整合到标语中

Key message: Models get cheaper/smarter every month. No provider
will dominate. We ride them all. Built for the open market.
2026-02-21 04:34:45 +09:00
YeonGyu-Kim
8938b6349e fix(rebase): restore missing hook export and fix duplicate function in event handler 2026-02-21 04:19:00 +09:00
YeonGyu-Kim
1db26ed114 fix(rebase): restore missing hook export and fix duplicate function in event handler 2026-02-21 04:18:20 +09:00
YeonGyu-Kim
86e3c7d199 docs: add future-betting manifesto to all READMEs and overview
Add 'The Bet' section to all 4 language READMEs (en, ko, ja, zh-cn):
- Models getting cheaper every month
- Models getting smarter every month
- No single provider will dominate the future
- We leverage ALL models, not just Claude
- Architecture gets more valuable as models specialize
- We're building for the open multi-model future

Also update overview.md to move 'Better Than Pure Codex' into
Hephaestus section and add 'Better Than Pure Claude Code' section
with fundamental multi-model advantage explanation.
2026-02-21 04:17:33 +09:00
YeonGyu-Kim
5ae9de0e8e fix: include line number in hashline computation 2026-02-21 04:14:54 +09:00
YeonGyu-Kim
df1a0a59d9 docs: add hyperlinks to IntentGate and Hash-Anchored Edit Tool table rows
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 04:11:02 +09:00
YeonGyu-Kim
f260d15632 fix(auto-update): support prerelease versions without numeric suffix in fallback 2026-02-21 04:10:27 +09:00
YeonGyu-Kim
88148fe248 fix(auto-update): treat only explicit semver pins as user-pinned
Fixes #1920

Installer-written exact versions (e.g., oh-my-opencode@3.5.2) were incorrectly treated as user-pinned, blocking auto-updates for all installer users.

Fix isPinned to only block auto-update when pinnedVersion is an explicit semver string (user's intent). Channel tags (latest, beta, next) and bare package name all allow auto-update.

Fix installer fallback to return bare PACKAGE_NAME for stable versions and PACKAGE_NAME@{channel} for prerelease versions, preserving channel tracking.
2026-02-21 04:09:50 +09:00
YeonGyu-Kim
67c2cfddf4 fix(migration): remove non-existent gpt-5.3-codex from MODEL_VERSION_MAP
Fixes #1804, fixes #1962

The migration entry 'gpt-5.2-codex → gpt-5.3-codex' caused the plugin to silently overwrite user configs on every startup with a model that doesn't exist in the OpenAI API. Users explicitly setting gpt-5.2-codex (the correct current model) were forced to revert their config manually every session.
2026-02-21 04:08:44 +09:00
YeonGyu-Kim
880c5e3beb docs: restructure and rewrite all documentation from scratch
Consolidate 12 docs into 8, eliminating ~70% duplicate content.
Fix all broken doc links across 4 README translations.

New structure:
- docs/guide/: overview, installation (with agent-model setup), orchestration
- docs/reference/: features, configuration, cli
- docs/manifesto.md, docs/troubleshooting/ollama.md

Deleted: agent-model-matching, understanding-orchestration-system,
orchestration-guide, category-skill-guide, task-system, cli-guide,
configurations, ultrawork-manifesto, features, ollama-streaming-issue
2026-02-21 04:07:06 +09:00
YeonGyu-Kim
ddadd923de docs: add IntentGate documentation to translated READMEs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 03:59:49 +09:00
YeonGyu-Kim
4ed36438ad docs: add IntentGate feature documentation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 03:59:34 +09:00
YeonGyu-Kim
79d0c69fb7 docs: rewrite README for readability and tone
Rewrote prose for SF engineer voice: shorter sentences, punchier copy,
no em-dashes. Kept all structural elements, badges, testimonials, and
code blocks unchanged.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 03:43:16 +09:00
YeonGyu-Kim
c115880f74 docs: update README tagline, add subscription recommendations, remove warnings
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 03:33:47 +09:00
YeonGyu-Kim
67f4c7039c test: update model-fallback and chat-headers test expectations
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 03:33:42 +09:00
YeonGyu-Kim
63ccf2abe0 fix(category-resolver): add kimi to unstable agent detection, check category config model
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 03:33:37 +09:00
YeonGyu-Kim
9f09f77588 feat(hooks): export json-error-recovery hook
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 03:33:30 +09:00
YeonGyu-Kim
6153a43c39 fix(hashline-read-enhancer): support plain read output without content tags
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 03:33:26 +09:00
YeonGyu-Kim
fb4530cafe fix(provider-matching): normalize provider names to lowercase for connectivity checks
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 03:33:20 +09:00
YeonGyu-Kim
b9442f51da fix(event): remove duplicate dispatchToHooks from merge artifact
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-21 03:33:15 +09:00
YeonGyu-Kim
4039fd451f docs: translate README tagline from Korean to English 2026-02-21 03:19:19 +09:00
YeonGyu-Kim
0f30b5068d docs: audit and fix features.md against actual codebase
- Fix all agent models/fallbacks (ground truth: model-requirements.ts)
- Add missing agents: Atlas, Sisyphus-Junior
- Fix Multimodal-Looker tool restrictions (read only, not read/glob/grep)
- Add missing tools: grep, glob, edit, look_at, skill, task system tools
- Add missing commands: /stop-continuation, /handoff
- Remove non-existent hooks: empty-message-sanitizer, background-compaction, grep-output-truncator
- Add 19 undocumented hooks with correct event types
- Fix Claude Code compatibility paths (MCP, commands, skills)
- Remove unverified Data Storage section (todos/transcripts)
- Add features.md link to README Highlights
2026-02-21 03:19:19 +09:00
JiHongKim98
02017a1b70 fix(tools): address PR review feedback from cubic
- Use tool.schema.enum() for output_mode instead of generic string()
- Remove unsafe type assertion for output_mode
- Fix files_with_matches mode returning empty results by adding
  filesOnly flag to parseOutput for --files-with-matches rg output
2026-02-21 03:17:48 +09:00
YeonGyu-Kim
032d7fd139 Merge pull request #2010 from code-yeongyu/fix/remove-quotio-provider
fix(model-requirements): remove custom quotio provider, restore standard providers
2026-02-21 03:14:51 +09:00
github-actions[bot]
2a7d6ff23e @JiHongKim98 has signed the CLA in code-yeongyu/oh-my-opencode#2009 2026-02-20 18:11:10 +00:00
YeonGyu-Kim
97a48995b2 test(cli): align librarian fallback expectations with actual resolution 2026-02-21 03:10:29 +09:00
YeonGyu-Kim
9059a4fdbc fix(model-requirements): remove custom quotio provider, restore standard providers 2026-02-21 03:03:57 +09:00
JiHongKim98
dafdca217b fix(tools): throttle ripgrep CPU usage with thread limits and concurrency control
- Add --threads=4 flag to all rg invocations (grep and glob)
- Add global semaphore limiting concurrent rg processes to 2
- Reduce grep timeout from 300s to 60s (matches tool description)
- Reduce max output from 10MB to 256KB (prevents excessive memory usage)
- Add output_mode parameter (content/files_with_matches/count)
- Add head_limit parameter for incremental result fetching

Closes #2008

Ref: #674, #1722
2026-02-21 03:02:01 +09:00
YeonGyu-Kim
481106a12e Merge branch 'pr-1959' into dev
# Conflicts:
#	src/hooks/index.ts
#	src/plugin/event.ts
#	src/tools/delegate-task/sync-task.ts
2026-02-21 02:49:39 +09:00
YeonGyu-Kim
4c13c96cf7 Merge pull request #2001 from code-yeongyu/fix/bug-7-14-model-fallback
fix(model-fallback): add gpt-5-nano to multimodal-looker chain, remove librarian hardcoding
2026-02-21 02:47:37 +09:00
YeonGyu-Kim
f0ff232b43 fix(model-fallback): add gpt-5-nano to multimodal-looker chain, remove librarian hardcoding
- BUG-7: Add gpt-5-nano as final fallback in multimodal-looker model requirements
- BUG-14: Remove hardcoded LIBRARIAN_MODEL, let librarian resolve through normal fallback chain
- Update snapshots and tests to reflect new fallback behavior
2026-02-21 02:47:19 +09:00
YeonGyu-Kim
13196aedb7 fix: resolve post-rebase runtime fallback merge leftovers 2026-02-21 02:45:48 +09:00
YeonGyu-Kim
aa1c8a4626 Merge pull request #1999 from code-yeongyu/fix/bug-3-6-15-tmux-deferred
fix(tmux-deferred): add TTL/max-size guards, null-state exit, and spawn atomicity
2026-02-21 02:43:41 +09:00
YeonGyu-Kim
148687c7fe fix: remove unused spawnFailed variable (dead code) 2026-02-21 02:43:24 +09:00
YeonGyu-Kim
52f62c3fda fix(tmux-deferred): add TTL/max-size guards, null-state exit, and spawn atomicity
- BUG-3: Add DEFERRED_SESSION_TTL_MS (5min) and MAX_DEFERRED_QUEUE_SIZE (20) to prevent unbounded growth
- BUG-15: Track consecutive null window states, stop polling after 3 nulls to prevent immortal loop
- BUG-6: Track close+spawn failure and re-queue deferred session for retry
2026-02-21 02:43:24 +09:00
YeonGyu-Kim
8885f677c2 Merge pull request #2002 from code-yeongyu/fix/bug-19-20-skill-command
fix(skill/command): add user_message param to skill tool, fix command priority order
2026-02-21 02:43:07 +09:00
YeonGyu-Kim
945c7e658a fix(skill/command): add user_message param to skill tool, fix command priority order
- BUG-20: Add optional user_message parameter to skill tool for command arguments
- BUG-19: Reorder command discovery: user > project > opencode-project > opencode-global > builtin
- Update AGENTS.md to reflect slashcommand removal and skill tool changes
2026-02-21 02:42:51 +09:00
YeonGyu-Kim
7fa22aebdf Merge pull request #1998 from code-yeongyu/fix/bug-1-ultrawork-db-crash
fix(ultrawork-db): handle SQLite exceptions in deferred model override
2026-02-21 02:42:34 +09:00
IYODA Atsushi
a8e3e1ea01 fix(test): correct browserProvider assertion to match actual behavior
When browserProvider is not set, agent-browser skill should NOT resolve.
Test assertions were inverted — expected 'Skills not found' but asserted the opposite.
2026-02-21 02:42:20 +09:00
IYODA Atsushi
fcaaa11a06 fix(runtime-fallback): detect type:error message parts for fallback progression 2026-02-21 02:42:20 +09:00
IYODA Atsushi
f82e65fdd1 docs(runtime-fallback): clarify timeout_seconds=0 disables auto-retry detection 2026-02-21 02:42:20 +09:00
Youngbin Kim
eef80a4e23 chore: regenerate JSON schema after merge 2026-02-21 02:42:20 +09:00
YeonGyu-Kim
695b8a16b8 fix(ultrawork-db): wrap microtask/setTimeout callbacks in try/catch/finally
Unhandled SQLite exceptions (SQLITE_BUSY, database locked, etc.) in queueMicrotask/setTimeout callbacks could crash the entire process. Added try/catch/finally to ensure db.close() is always called and errors are logged instead of crashing.
2026-02-21 02:42:16 +09:00
Youngbin Kim
b6456faea8 refactor(runtime-fallback): decompose index.ts into focused modules
Split 1021-line index.ts into 10 focused modules per project conventions.

New structure:

- error-classifier.ts: error analysis with dynamic status code extraction

- agent-resolver.ts: agent detection utilities

- fallback-state.ts: state management and cooldown logic

- fallback-models.ts: model resolution from config

- auto-retry.ts: retry helpers with mutual recursion support

- event-handler.ts: session lifecycle events

- message-update-handler.ts: message.updated event handling

- chat-message-handler.ts: chat message interception

- hook.ts: main factory with proper cleanup

- types.ts: updated with HookDeps interface

- index.ts: 2-line barrel re-export

Embedded fixes:

- Fix setInterval leak with .unref()

- Replace require() with ESM import

- Add log warning on invalid model format

- Update sessionLastAccess on normal traffic

- Make extractStatusCode dynamic from config

- Remove unused SessionErrorInfo type

All 61 tests pass without modification.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:42:12 +09:00
Youngbin Kim
22dda6178a docs(config): fix runtime fallback documentation
Remove duplicate Runtime Fallback section from configurations.md.

Fix max_fallback_attempts range from (1-10) to (1-20) to match schema.

Update retry_on_errors default to include 400 status code.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:42:12 +09:00
YeonGyu-Kim
2dc690d1dc Merge pull request #2000 from code-yeongyu/fix/bug-4-copilot-n-plus-1
fix(chat-headers): cache internal marker lookups to prevent N+1 API calls
2026-02-21 02:42:04 +09:00
YeonGyu-Kim
cd5e071eda fix(chat-headers): cache internal marker lookups to prevent N+1 API calls
- BUG-4: Add in-memory cache for hasInternalMarker() results with 1000-entry limit
- Eliminates redundant session.message API calls for copilot marker detection
2026-02-21 02:41:46 +09:00
Youngbin Kim
c54da1e670 docs(config): correct retry_on_errors default in schema comment
Update schema comment to match actual code default [400, 429, 503, 529].

Previously the comment omitted 400 which is included in the code default.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:41:43 +09:00
YeonGyu-Kim
21850face7 Merge pull request #2003 from code-yeongyu/fix/bug-21-indent-restore
fix(hashline-edit): restore leading indentation for first line in replace_lines
2026-02-21 02:41:33 +09:00
YeonGyu-Kim
07fa0560c2 fix(hashline-edit): restore leading indentation for first line in replace_lines
- BUG-21: Apply restoreLeadingIndent to first entry of replace_lines, matching set_line behavior
- Update test to verify indentation preservation
2026-02-21 02:41:21 +09:00
Youngbin Kim
1835458054 fix(test): revert atlas test to use uiSelectedModel
Revert test name and assertion to original behavior per PR review feedback.

The test now correctly expects Atlas to respect uiSelectedModel instead of using its own fallback chain.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:40:47 +09:00
Youngbin Kim
349e820473 fix(config): allow timeout_seconds to be 0 to disable fallback
Previously, the Zod schema rejected timeout_seconds: 0 due to .min(1).
Now it accepts 0-integer values to allow disabling timeout-based fallback.

- Changed z.number().min(1) to z.number().min(0)
- Updated comment to clarify 0 disables timeout checks
- All tests pass (44 runtime-fallback + 46 schema tests)
- Build successful
2026-02-21 02:40:47 +09:00
Youngbin Kim
68f5d982fc feat(runtime-fallback): add timeout toggle for quota retry detection
Make provider auto-retry signal detection respect timeout_seconds setting:
- When timeout_seconds=0, disable quota-based fallback escalation
- Only treat auto-retry signals as errors when timeout is enabled
- Add test to verify behavior when timeout_seconds is disabled
- Update documentation to explain timeout_seconds=0 behavior

This allows users to disable timeout-based fallbacks while keeping
error-based fallback functionality intact.
2026-02-21 02:40:47 +09:00
Youngbin Kim
8b2ae957e5 feat(runtime-fallback): generalize provider auto-retry signal detection
Refactor retry signal detection to be provider-agnostic:
- Replace hardcoded Copilot/OpenAI checks with generic pattern matching
- Detect any provider message containing limit/quota keywords + [retrying in X]
- Add OpenAI pattern: 'usage limit has been reached [retrying in X]'
- Update logging to use generic 'provider' instead of specific names
- Add 'usage limit has been reached' to RETRYABLE_ERROR_PATTERNS

This enables fallback escalation for any provider that signals automatic
retries due to quota/rate limits, not just Copilot and OpenAI.

Closes PR discussion: generalize retry pattern detection
2026-02-21 02:40:47 +09:00
Youngbin Kim
31f61078b1 docs(runtime-fallback): document retry classes and timeout behavior 2026-02-21 02:40:47 +09:00
Youngbin Kim
6a97f00a22 feat(runtime-fallback): add configurable session timeout controls 2026-02-21 02:40:01 +09:00
Youngbin Kim
ff230df47c fix(runtime-fallback): harden fallback progression and success detection 2026-02-21 02:40:01 +09:00
Youngbin Kim
5a406cab9e refactor(runtime-fallback): extract auto-retry helper and fix provider constraint inconsistency
- Extract duplicated auto-retry logic (~40 lines each) from session.error and
  message.updated handlers into shared autoRetryWithFallback() helper
- Fix userFallbackModels path in model-resolution-pipeline to respect
  constraints.connectedProviders parameter instead of reading cache directly,
  matching the behavior of categoryDefaultModel and fallbackChain paths
2026-02-21 02:40:01 +09:00
Youngbin Kim
fbafb8cf67 fix(runtime-fallback): 9 critical bug fixes for auto-retry, agent preservation, and model override
Bug fixes:
1. extractStatusCode: handle nested data.statusCode (Anthropic error structure)
2. Error regex: relax credit.*balance.*too.*low pattern for multi-char gaps
3. Zod schema: bump max_fallback_attempts from 10 to 20 (config rejected silently)
4. getFallbackModelsForSession: fallback to sisyphus/any agent when session.error lacks agent
5. Model detection: derive model from agent config when session.error lacks model info
6. Auto-retry: resend last user message with fallback model via promptAsync
7. Persistent fallback: override model on every chat.message (not just pendingFallbackModel)
8. Manual model change: detect UI model changes and reset fallback state
9. Agent preservation: include agent in promptAsync body to prevent defaulting to sisyphus

Additional:
- Add sessionRetryInFlight guard to prevent double-retries
- Add resolveAgentForSession with 3-tier resolution (event → session memory → session ID)
- Add normalizeAgentName for display names like "Prometheus (Planner)" → "prometheus"
- Add resolveAgentForSessionFromContext to fetch agent from session messages
- Move AGENT_NAMES and agentPattern to module scope for reuse
- Register runtime-fallback hooks in event.ts and chat-message.ts
- Remove diagnostic debug logging from isRetryableError
- Add 400 to default retry_on_errors and credit/balance patterns to RETRYABLE_ERROR_PATTERNS
2026-02-21 02:39:41 +09:00
youming.tang
708b9ce9ff fix(runtime-fallback): sort agent names by length to fix hyphenated agent detection
The \b word boundary regex treats '-' as a boundary, causing
'sisyphus-junior-session-123' to incorrectly match 'sisyphus'
instead of 'sisyphus-junior'.

Sorting agent names by length (descending) ensures longer names
are matched first, fixing the hyphenated agent detection issue.

Fixes cubic-dev-ai review issue #8
2026-02-21 02:38:17 +09:00
um1ng
d9072b4a98 fix(runtime-fallback): address cubic AI review issues
- Add normalizeFallbackModels helper to centralize string/array normalization (P3)
- Export RuntimeFallbackConfig and FallbackModels types from config/index.ts
- Fix agent detection regex to use word boundaries for sessionID matching
- Improve tests to verify actual fallback switching logic (not just log paths)
- Add SessionCategoryRegistry cleanup in executeSyncTask on completion/error (P2)
- All 24 runtime-fallback tests pass, 115 delegate-task tests pass
2026-02-21 02:37:57 +09:00
um1ng
e9ec4f44e2 feat(runtime-fallback): automatic model switching on API errors
Implements runtime model fallback that automatically switches to backup models
when the primary model encounters transient errors (rate limits, overload, etc.).

Features:
- runtime_fallback configuration with customizable error codes, cooldown, notifications
- Runtime fallback hook intercepts API errors (429, 503, 529)
- Support for fallback_models from agent/category configuration
- Session-state TTL and periodic cleanup to prevent memory leaks
- Robust agent name detection with explicit AGENT_NAMES array
- Session category registry for category-specific fallback lookup

Schema changes:
- Add RuntimeFallbackConfigSchema with enabled, retry_on_errors, max_fallback_attempts,
  cooldown_seconds, notify_on_fallback options
- Add fallback_models to AgentOverrideConfigSchema and CategoryConfigSchema
- Add runtime-fallback to HookNameSchema

Files added:
- src/hooks/runtime-fallback/index.ts - Main hook implementation
- src/hooks/runtime-fallback/types.ts - Type definitions
- src/hooks/runtime-fallback/constants.ts - Constants and defaults
- src/hooks/runtime-fallback/index.test.ts - Comprehensive tests
- src/config/schema/runtime-fallback.ts - Schema definition
- src/shared/session-category-registry.ts - Session category tracking

Files modified:
- src/hooks/index.ts - Export runtime-fallback hook
- src/plugin/hooks/create-session-hooks.ts - Register runtime-fallback hook
- src/config/schema.ts - Export runtime-fallback schema
- src/config/schema/oh-my-opencode-config.ts - Add runtime_fallback config
- src/config/schema/agent-overrides.ts - Add fallback_models to agent config
- src/config/schema/categories.ts - Add fallback_models to category config
- src/config/schema/hooks.ts - Add runtime-fallback to hook names
- src/shared/index.ts - Export session-category-registry
- docs/configurations.md - Add Runtime Fallback documentation
- docs/features.md - Add runtime-fallback to hooks list

Supersedes #1237, #1408
Closes #1408
2026-02-21 02:36:56 +09:00
youming.tang
067c8010be fix: resolve merge conflicts in PR #1408
- Fix bun.lock version conflicts (3.3.1 -> 3.3.2)
- Remove Git conflict markers from docs/configurations.md
- Remove duplicate normalizeFallbackModels, import from shared module
2026-02-21 02:35:03 +09:00
um1ng
17d43672ad refactor(shared): add normalizeFallbackModels utility function
Add shared utility to normalize fallback_models config values.

Handles both single string and array inputs consistently.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:34:28 +09:00
um1ng
8873896432 fix(runtime-fallback): use precise regex patterns for status code matching
Replace word-boundary regex with stricter patterns that match

status codes only at start/end of string or surrounded by whitespace.

Prevents false matches like '1429' or '4290'.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:33:49 +09:00
youming.tang
a206daa437 test(agents): update Atlas uiSelectedModel expectation 2026-02-21 02:33:49 +09:00
youming.tang
538a92ab12 test(delegate-task): stabilize browserProvider and default variant cases 2026-02-21 02:33:49 +09:00
youming.tang
cd3e0ca124 fix(session-category-registry): cleanup entries for task sessions 2026-02-21 02:31:42 +09:00
YeonGyu-Kim
d5643fbce1 Merge branch 'pr-1917' into dev 2026-02-21 02:31:14 +09:00
YeonGyu-Kim
ebf0f0ad20 Merge branch 'pr-1868' into dev 2026-02-21 02:31:10 +09:00
youming.tang
d947743932 fix(runtime-fallback): per-model cooldown and stricter retry patterns 2026-02-21 02:30:55 +09:00
youming.tang
0ef17aa6c9 docs: add runtime-fallback and fallback_models documentation 2026-02-21 02:30:45 +09:00
Ultrawork Bot
7aafa13b21 feat(fallback_models): complete init-time and runtime integration
Implement full fallback_models support across all integration points:

1. Model Resolution Pipeline (src/shared/model-resolution-pipeline.ts)
   - Add userFallbackModels to ModelResolutionRequest
   - Process user fallback_models before hardcoded fallback chain
   - Support both connected provider and availability checking modes

2. Agent Utils (src/agents/utils.ts)
   - Update applyModelResolution to accept userFallbackModels
   - Inject fallback_models for all builtin agents (sisyphus, oracle, etc.)
   - Support both single string and array formats

3. Model Resolver (src/shared/model-resolver.ts)
   - Add userFallbackModels to ExtendedModelResolutionInput type
   - Pass through to resolveModelPipeline

4. Delegate Task Executor (src/tools/delegate-task/executor.ts)
   - Extract category fallback_models configuration
   - Pass to model resolution pipeline
   - Register session category for runtime-fallback hook

5. Session Category Registry (src/shared/session-category-registry.ts)
   - New module: maps sessionID -> category
   - Used by runtime-fallback to lookup category fallback_models
   - Auto-cleanup support

6. Runtime Fallback Hook (src/hooks/runtime-fallback/index.ts)
   - Check SessionCategoryRegistry first for category fallback_models
   - Fallback to agent-level configuration
   - Import and use SessionCategoryRegistry

Test Results:
- runtime-fallback: 24/24 tests passing
- model-resolver: 46/46 tests passing

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:30:01 +09:00
feelsodev
4c7b81986a fix: add google provider model transform across all resolution paths
transformModelForProvider only handled github-copilot provider, leaving
google provider models untransformed. This caused ProviderModelNotFoundError
when google/gemini-3-flash was sent to the API (correct ID is
gemini-3-flash-preview).

Changes:
- Add google provider to transformModelForProvider with idempotent regex
  negative lookahead to prevent double -preview suffix
- Fix category-default path in model-resolution-pipeline when
  availableModels is empty but connected provider exists
- Fix getFirstFallbackModel first-run path that constructed raw model IDs
  without transformation
- Fix github-copilot provider gemini transforms to also use idempotent
  regex (was vulnerable to double-transform)
- Extract transformModelForProvider to shared module (single source of
  truth, imported by cli and shared layers)
- Add 20 new test cases: unit tests for both providers, runtime
  integration tests for category-default and fallback-chain paths,
  double-transform prevention for both providers
2026-02-21 02:29:02 +09:00
feelsodev
fec75535ba refactor: move transformModelForProvider to shared for runtime access
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:29:02 +09:00
once
e5a0ab4034 fix: add google provider model transform for gemini-3-flash/pro preview suffix
transformModelForProvider only handled github-copilot provider, leaving
google provider models untransformed. This caused ProviderModelNotFoundError
when google/gemini-3-flash was sent to the API (correct ID is
gemini-3-flash-preview).

Add google provider block with -preview suffix guard to prevent double
transformation.
2026-02-21 02:29:02 +09:00
YeonGyu-Kim
95491675e8 fix: correct spread order in spawner.ts for tool restrictions 2026-02-21 02:29:00 +09:00
sjawhar
03f7643ee1 fix(background-agent): respect agent tool restrictions in background task launch
Reorder tool permission spread so getAgentToolRestrictions() comes
last, allowing agent-specific restrictions to override defaults.
Fixes all 3 sites: task-starter.ts (startTask), manager.ts (startTask
and resume paths).

Previously, defaults like call_omo_agent:true would stomp agent
restrictions (e.g., explore's call_omo_agent:false) due to JS
spread semantics.
2026-02-21 02:29:00 +09:00
Rebase Bot
6dc1aff698 fix(runtime-fallback): add Category support and expand test coverage
- Add Category-level fallback_models support in getFallbackModelsForSession()
  - Try agent-level fallback_models first
  - Then try agent's category fallback_models
  - Support all builtin agents including hephaestus, sisyphus-junior, build, plan

- Expand agent name recognition regex to include:
  - hephaestus, sisyphus-junior, build, plan, multimodal-looker

- Add comprehensive test coverage (6 new tests, total 24):
  - Model switching via chat.message hook
  - Agent-level fallback_models configuration
  - SessionID agent pattern detection
  - Cooldown mechanism validation
  - Max attempts limit enforcement

All 24 tests passing

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:28:27 +09:00
Rebase Bot
632570f7ec feat(config): add runtime_fallback and fallback_models schema
Add configuration schemas for runtime model fallback feature:
- RuntimeFallbackConfigSchema with enabled, retry_on_errors,
  max_fallback_attempts, cooldown_seconds, notify_on_fallback
- FallbackModelsSchema for init-time fallback model selection
- Add fallback_models to AgentOverrideConfigSchema and CategoryConfigSchema
- Export types and schemas from config/index.ts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-21 02:28:27 +09:00
YeonGyu-Kim
31dc65e9ac Merge pull request #1981 from VespianRex/fix/fallback-sync-model-ui
Fix model fallback retries for main, background, and sync subagents + show runtime fallback model in task UI
2026-02-21 02:28:18 +09:00
YeonGyu-Kim
86cfa06aef Merge pull request #1983 from Pantoria/fix/background-output-full-session-default
fix(background-output): stop defaulting full_session=true for running tasks
2026-02-21 02:24:17 +09:00
YeonGyu-Kim
3c2ccba62b Merge pull request #1952 from gustavosmendes/codex/fix-write-existing-file-guard-1871
fix: make write-existing-file-guard read-gated with overwrite bypass
2026-02-21 02:17:11 +09:00
YeonGyu-Kim
e0f2952659 remove slops 2026-02-21 01:25:46 +09:00
VespianRex
bf51919a79 Address review feedback for fallback fixes 2026-02-20 17:46:12 +02:00
VespianRex
f5f1d1d4c2 Fix model fallback across main/background/sync agents 2026-02-20 17:45:53 +02:00
IYODA Atsushi
b94b193c21 fix(doctor): point fix messages to actual cache directory
The doctor's fix messages for outdated/mismatched plugin versions were
directing users to ~/.config/opencode with `bun update`, but OpenCode
loads plugins from its cache directory (~/.cache/opencode on Linux,
~/Library/Caches/opencode on macOS). Additionally, pinned versions in
the cache package.json make `bun update` a no-op — `bun add ...@latest`
is required.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-20 23:47:15 +09:00
github-actions[bot]
d8da89fd5b @FFFergie has signed the CLA in code-yeongyu/oh-my-opencode#1996 2026-02-20 13:03:46 +00:00
YeonGyu-Kim
1a5672ab6c feat(sisyphus): add intent_verbalization Step 0 to Phase 0 prompt
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-20 18:08:36 +09:00
YeonGyu-Kim
0832505e13 fix(hashline-edit): do not restore indentation for replace_lines
- applyReplaceLines: use stripped array directly instead of restoreLeadingIndent
- applySetLine: keep restoreLeadingIndent (1:1 replacement needs indent preservation)
- Added test case for replace_lines preserving new line indentation
- All 3025 tests pass

🤖 Generated with OhMyOpenCode assistance
2026-02-20 17:47:37 +09:00
YeonGyu-Kim
4bbc55bb02 fix(variant): respect TUI variant and enforce max in ultrawork mode
- keyword-detector: always set variant to 'max' when ultrawork/ulw keyword detected
- chat-message: remove variant resolution logic to passthrough TUI variant unchanged
- Tests updated to reflect new behavior

🤖 Generated with OhMyOpenCode assistance
2026-02-20 17:47:21 +09:00
YeonGyu-Kim
42b34fb5d2 chore(deps): add codex dependency
🤖 Generated with OhMyOpenCode assistance
2026-02-20 17:47:07 +09:00
sisyphus-dev-ai
41f2050cf0 chore: changes by sisyphus-dev-ai 2026-02-20 04:11:41 +00:00
github-actions[bot]
0397470f02 @CloudWaddie has signed the CLA in code-yeongyu/oh-my-opencode#1988 2026-02-20 04:06:17 +00:00
YeonGyu-Kim
2021080e7c Merge pull request #1844 from liu-qingyuan/fix/tmux-split-defer-fifo
fix(tmux): prefer split-or-defer with FIFO deferred attach
2026-02-20 11:55:32 +09:00
YeonGyu-Kim
27f60fb4d2 Merge pull request #1956 from codeg-dev/fix/prometheus-table-restoration-and-cancel-consistency
fix(agents): replace background_cancel(all=true) with individual task cancellation
2026-02-20 11:54:41 +09:00
github-actions[bot]
51204f2b67 @code-yeongyu has signed the CLA in code-yeongyu/oh-my-opencode#1813 2026-02-20 02:54:16 +00:00
YeonGyu-Kim
c672a2beed Merge pull request #1813 from GyuminJack/fix/custom-agent-empty-response
fix: resolve empty response when custom agents end with tool calls
2026-02-20 11:54:04 +09:00
YeonGyu-Kim
6ec6642e13 Merge pull request #1953 from maximharizanov/fix/copilot-initiator-attribution
fix(copilot): mark internal hook injections as agent-initiated
2026-02-20 11:54:01 +09:00
YeonGyu-Kim
4462124eee Merge pull request #1964 from code-yeongyu/fix/remove-antigravity-auto-install
fix: remove automatic antigravity plugin installation
2026-02-20 11:53:33 +09:00
YeonGyu-Kim
0f46e5b71a docs(readme): add hash-anchored Edit Tool to ko/ja/zh-cn feature lists 2026-02-20 11:47:13 +09:00
YeonGyu-Kim
39542330c6 docs(readme): add hash-anchored Edit Tool to feature lists 2026-02-20 11:29:30 +09:00
YeonGyu-Kim
9d731f59ad docs: document hashline_edit as top-level flag
Add dedicated '## Hashline Edit' section to configurations.md explaining the hash-anchored Edit tool, its default-on behavior, and how to disable it or its companion hooks. Update src/config/AGENTS.md to reflect hashline_edit moved out of experimental and into root schema (27 fields).
2026-02-20 11:20:45 +09:00
YeonGyu-Kim
52b2afb6b0 fix(config): promote hashline_edit to top-level flag
Move hashline_edit out of experimental so it is a stable top-level config with default-on runtime behavior and explicit disable support. Add migration and tests to preserve existing experimental.hashline_edit users without breaking configs.
2026-02-20 11:12:33 +09:00
YeonGyu-Kim
b8a6f10f70 refactor(hashline-edit): redesign hashline format with CID-based hashing
Breaking Changes:
- Change hashline format from 'lineNum:hex|content' to 'lineNum#CID:content'
- Replace hex-based hashing (00-ff) with CID-based hashing (ZPMQVRWSNKTXJBYH nibbles)
- Simplify constants: HASH_DICT → NIBBLE_STR + HASHLINE_DICT
- Update patterns: HASHLINE_PATTERN → HASHLINE_REF_PATTERN + HASHLINE_OUTPUT_PATTERN

Benefits:
- More compact and memorable CID identifiers
- Better alignment with LSP line reference format (lineNum#ID)
- Improved error messages and diff metadata clarity
- Remove unused toHashlineContent from diff-enhancer hook

Updates:
- Refactor hash-computation for CID generation
- Update all diff-utils to use new format
- Update hook to use raw content instead of hashline format
- Update tests to match new expectations

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-20 11:07:42 +09:00
YeonGyu-Kim
f4aeee18a4 fix(schema): add no-hephaestus-non-gpt and disable_omo_env configuration options
- Add no-hephaestus-non-gpt to hook list for schema validation
- Add disable_omo_env to experimental features schema
- Sync schema with existing hook and feature implementations

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-20 11:07:34 +09:00
YeonGyu-Kim
40dccd6118 fix(hashline): add autocorrect, batch mismatch reporting, and write anchors 2026-02-20 11:02:07 +09:00
YeonGyu-Kim
f3e6cab2f8 fix(no-hephaestus-non-gpt): make toast message more blunt 2026-02-20 10:55:49 +09:00
YeonGyu-Kim
3dba1c49d4 feat(hooks): add no-hephaestus-non-gpt hook to enforce GPT-only for Hephaestus 2026-02-20 10:49:04 +09:00
YeonGyu-Kim
ac1eb30fda fix(no-sisyphus-gpt): translate toast message to English 2026-02-20 10:44:23 +09:00
Ze-Xuan Liu
d556937c8e fix(background-output): stop defaulting full_session=true for running tasks
background_output auto-enabled full_session when the task was still
running, returning the entire session transcript on every poll. When
the parent agent had no other work and polled in a tight loop, this
caused massive token waste because each response dumped thousands of
tokens into the conversation history.

Default full_session to false so running-task checks return a compact
status table (~200 tokens). Callers can still pass full_session=true
explicitly when they need the full transcript.
2026-02-19 19:30:45 -06:00
liu-qingyuan
5f78c07189 fix(tmux): align deferred attach behavior after rebase 2026-02-20 07:13:33 +08:00
liu-qingyuan
d2dc25e567 fix(tmux): address review feedback for split/defer reliability 2026-02-20 07:09:49 +08:00
liu-qingyuan
541f0d354d fix(tmux): prefer split-or-defer with FIFO deferred attach 2026-02-20 07:09:49 +08:00
github-actions[bot]
f3c8b0d098 @VespianRex has signed the CLA in code-yeongyu/oh-my-opencode#1957 2026-02-19 22:02:34 +00:00
Nguyen Khac Trung Kien
e758623a2e Merge pull request #1974 from ControlNet/dev 2026-02-19 23:15:41 +07:00
ControlNet
3bcbd12e2a test(config-handler): update tests for disable_omo_env behavior
- Refactor test descriptions for clarity regarding the presence of <omo-env> in generated prompts.
- Ensure that when disable_omo_env is true, <omo-env> is omitted from the sisyphus prompt.
- Confirm that <omo-env> remains in the prompt when disable_omo_env is not specified.
2026-02-20 03:03:57 +11:00
ControlNet
39a3e39b6b Update docs/configurations.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-20 02:50:11 +11:00
ControlNet
44a1604656 Update src/config/schema/experimental.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-20 02:49:47 +11:00
github-actions[bot]
13fa8bccf9 @ControlNet has signed the CLA in code-yeongyu/oh-my-opencode#1974 2026-02-19 15:43:44 +00:00
ControlNet
ddc2edfa0a feat(environment): introduce disable_omo_env configuration option
- Added a new configuration option `disable_omo_env` to control the injection of the `<omo-env>` block in agent prompts.
- Updated relevant functions and tests to support this feature, ensuring that the environment context can be toggled on or off as needed.
- Enhanced documentation to reflect the new option and its implications for API cost and cache hit rates.
2026-02-20 02:31:18 +11:00
Maxim Harizanov
6e82ef2384 fix(types): restore CI compatibility for plugin hooks and tool context 2026-02-19 13:40:38 +02:00
Maxim Harizanov
850fb0378e fix(copilot): mark internal hook injections as agent-initiated
Apply the internal initiator marker to automated continuation, recovery, babysitter, stop-hook, and hook-message injections so Copilot attribution consistently sets x-initiator=agent for system-generated prompts.
2026-02-19 13:17:02 +02:00
Maxim Harizanov
a85f7efb1d fix(copilot): keep notifications visible and detect marker via message lookup 2026-02-19 13:17:02 +02:00
Maxim Harizanov
64e8e164aa fix(copilot): mark internal background notifications as agent-initiated 2026-02-19 13:17:02 +02:00
YeonGyu-Kim
ca655a7deb fix(readme): swap 'For Humans' and 'For LLM Agents' installation sections
The installation instructions were incorrectly placed:
- 'For Humans' had the curl command (agent behavior)
- 'For LLM Agents' had the copy-paste prompt (human action)

Now correctly:
- 'For Humans': Copy-paste prompt to give to LLM agent
- 'For LLM Agents': Fetch raw installation guide via curl

Fixed in all 4 language versions (EN, KO, JA, ZH-CN).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-19 18:46:10 +09:00
YeonGyu-Kim
d4e7ddc9b9 update docs 2026-02-19 18:41:37 +09:00
YeonGyu-Kim
c995c5b2c3 fix(hashline-edit): improve hash computation and tool description clarity
- Include line number in hash computation to ensure uniqueness
- Add explicit examples of WRONG vs CORRECT LINE:HASH format
- Clarify that hash must be hex characters (0-9, a-f only)
- Update tests to use dynamic hash computation
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
0a58debd92 refactor(agents): remove dead code and update to compact skill format
- Remove formatCustomSkillsBlock function (dead code)
- Remove unused truncateDescription import
- Update buildCategorySkillsDelegationGuide to compact format
- Update tests to match new compact output

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
acc28a89c1 feat(skill): merge skills and commands into unified available_items with priority sorting
- Merge <available_skills> and <available_commands> into single <available_items>
- Sort by priority: project > user > opencode > builtin
- List skills before commands
- Add priority documentation to description
- Add 5 tests for ordering and priority

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
3adade46e3 fix(hashline-edit): stabilize TUI diff metadata and output flow
Align edit/write hashline handling with TUI expectations by preserving metadata through tool execution, keeping unified diff raw to avoid duplicated line numbers, and tightening read/write/edit outputs plus tests for reliable agent operation.
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
e14a4cfc77 feat(hephaestus): add proactive intent detection and verbalization
Add Step 0 intent extraction to counter GPT 5.2's conservative grounding bias:
- Map surface questions to true action intent (e.g., "Did you do X?" → do X now)
- Verbalization pattern: model must state intent before acting, creating commitment
- Turn-end self-check to prevent stopping after only talking about work

Prevents Hephaestus from answering questions then stopping when action is implied.
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
dda5bfa3b9 test(models): sync librarian fallback expectation 2026-02-19 18:40:42 +09:00
YeonGyu-Kim
eb0931ed6d fix(ultrawork): use session agent fallback and skip same-model override 2026-02-19 18:40:42 +09:00
YeonGyu-Kim
5647cf83cd feat(hashline-read-enhancer): add write tool support and fix early termination
- Support write tool in addition to read tool

- Fix early termination when encountering non-matching lines

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
09f62b1d40 feat(hashline-edit-diff-enhancer): add unified diff output and write tool support
- Generate unified diff for TUI display via metadata.diff

- Support write tool in addition to edit tool

- Hashline-format before/after content in filediff metadata

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
5f9b6cf176 docs(readme): remove table of contents section
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
7c71a2dbbf fix(ultrawork): respect variant-only schema overrides
Allow ultrawork overrides configured with only variant to apply at message time so thinking level is honored even without model replacement.
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
35d071b1be test(hashline-read-enhancer): add hash consistency and content isolation tests
Add comprehensive test coverage for:
- Hash consistency validation between Read tool output and Edit tool validateLineRef
- Injected content isolation to prevent hashifying non-file-content lines
- Footer messages and system reminders that should pass through unchanged

Tests ensure Read hook properly handles content boundaries and maintains
hash validity for Edit tool operations.

🤖 Generated with assistance of oh-my-opencode
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
64b2d69036 feat(ultrawork): implement per-message model override with deferred DB retry strategy
- Add per-message ultrawork mode detection via keyword matching
- Implement deferred DB override strategy using microtask retry loop
- Fall back to setTimeout after 10 microtask retries for robustness
- Update agent configuration schema with ultrawork model/variant fields
- Integrate with chat.message hook to apply overrides on detection
- Add comprehensive tests for all override scenarios
- Generated schema includes ultrawork configuration

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
50de1a18f2 feat(hooks): add hashline-edit-diff-enhancer for TUI inline diff display
Capture file content before hashline edit execution and compute filediff
metadata after, enabling opencode TUI to render inline diffs for the
plugin's edit tool (which replaces the built-in EditTool).
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
02bb5d43cc refactor(models): expand provider listings for robust fuzzy matching
Add alternative providers to free-tier and cross-provider models:
- k2p5: add friendli as alternative to kimi-for-coding
- kimi-k2.5-free, minimax-m2.5-free, big-pickle, gpt-5-nano: add opencode-zen-abuse
- grok-code-fast-1: add venice as alternative to github-copilot
- glm-5: add opencode as alternative to zai-coding-plan
2026-02-19 18:40:42 +09:00
YeonGyu-Kim
8c19a7b7f8 refactor(atlas): remove gemini-3-pro from fallback chain 2026-02-19 18:40:42 +09:00
YeonGyu-Kim
da561118ce refactor(multimodal-looker): reorder fallback to k2p5 → kimi-free → gemini-flash → gpt-5.2 → glm-4.6v 2026-02-19 18:40:42 +09:00
YeonGyu-Kim
29d85bb63d refactor(explore): add minimax-m2.5-free as #2 fallback after grok-code-fast-1 2026-02-19 18:40:42 +09:00
YeonGyu-Kim
b7c6391bd5 refactor(librarian): switch fallback to minimax-m2.5-free → gemini-3-flash → big-pickle 2026-02-19 18:40:42 +09:00
YeonGyu-Kim
c8eb0dbae3 refactor(models): upgrade zai-coding-plan default from glm-4.7 to glm-5 2026-02-19 18:40:42 +09:00
YeonGyu-Kim
86a1bfa493 feat(prometheus): add GPT-5.2 optimized prompt with model-based routing
- Create gpt.ts with XML-tagged, principle-driven prompt (Codex plan mode style)
- Add getPrometheusPrompt() routing: GPT models → GPT prompt, others → default
- Promote gpt-5.2 (high) to #2 in prometheus fallback chain
- Follow Atlas GPT variant pattern (isGptModel detection)
2026-02-19 18:40:42 +09:00
github-actions[bot]
b86489ac92 @itstanner5216 has signed the CLA in code-yeongyu/oh-my-opencode#1958 2026-02-19 08:13:53 +00:00
YeonGyu-Kim
697a2f5a4c Merge pull request #1698 from Luodian/fix/merge-skill-into-slashcommand
refactor: merge slashcommand behavior into skill tool to reduce prompt size
2026-02-19 15:51:59 +09:00
YeonGyu-Kim
7027b55c56 fix: remove automatic antigravity plugin installation
Remove the automatic installation of opencode-antigravity-auth plugin
when users have Gemini configured. This change addresses several issues:

1. Antigravity plugin is causing Google account bans for users
2. Users are unaware the plugin was auto-installed
3. Google has built-in OAuth for Gemini that doesn't require third-party plugins

Users who need the antigravity plugin can manually add it to their
plugin configuration if desired.

Fixes issues with unexpected plugin installation and account safety.
2026-02-19 15:30:56 +09:00
Sisyphus
effbc54767 docs: add agent-model matching guide for newcomers
docs: add agent-model matching guide for newcomers
2026-02-19 15:20:53 +09:00
YeonGyu-Kim
6909e5fb4c docs: restructure agent-model guide by model family and role
Complete rewrite organized around model families, agent roles,
task categories, and selection priority rules.

- Model families: Claude-like (Kimi, GLM/Big Pickle), GPT,
  different-behavior (Gemini, MiniMax), speed-focused (Grok, Spark)
- Agent roles: Claude-optimized, dual-prompt, GPT-native, utility
- gpt-5.3-codex-spark: extremely fast but compacts too aggressively
- Big Pickle = GLM 4.6
- Explicit guidance: do not upgrade utility agents to Opus
- opencode models / opencode auth login references at top
- Link to orchestration system guide for task categories
2026-02-19 15:17:41 +09:00
YeonGyu-Kim
98d39ceea0 docs: sync agent-model guide with latest catalog changes
Update all fallback chains to match current model-requirements.ts:
- Librarian: now minimax-m2.5-free -> gemini-flash -> big-pickle (free-tier first)
- Explore: add minimax-m2.5-free as #2 after grok-code-fast-1
- Multimodal Looker: reorder to kimi-first (k2p5 -> kimi-free -> flash -> gpt-5.2)
- Atlas: remove gemini-3-pro, keep kimi k2.5 -> sonnet -> gpt-5.2
- GLM 4.7 -> GLM 5 everywhere
- Add venice provider for grok, opencode provider for glm-5

Add design philosophy section explaining the intelligence hierarchy:
premium models for core agents, free-tier for utility agents, balanced
for orchestrators. Document why utility agents intentionally use cheap
models and why Kimi K2.5 appears as primary for multiple agents.
2026-02-19 15:09:05 +09:00
YeonGyu-Kim
36432fe18e docs: add prompt design rationale from Codex plan mode analysis
Expand model-specific prompt routing section with insights from
the actual Prometheus GPT prompt development session:
- Why Claude vs GPT models need fundamentally different prompts
- Principle-driven (GPT) vs mechanics-driven (Claude) approach
- "Decision Complete" concept from Codex Plan Mode
- Why more rules help Claude but hurt GPT (contradiction surface)
- Concrete size comparison (1100 lines Claude vs 300 lines GPT)
2026-02-19 15:04:57 +09:00
YeonGyu-Kim
d9ee0d9c0d docs: rewrite agent-model matching as technical guide for agents
Rewrite agent-model-matching.md as a technical reference that:
- Documents actual fallback chains from model-requirements.ts
- Explains model-specific prompt routing (Prometheus/Atlas GPT detection)
- Covers safe vs dangerous model substitutions with rationale
- Includes task categories (visual-engineering, deep, quick, etc.)
- Guides agents on how to explain model choices to users
- Adds provider priority chain

Also update installation.md to reference the guide when users
want custom model configuration, with explanation of what is
safe to change and why.
2026-02-19 15:01:34 +09:00
YeonGyu-Kim
3b8846e956 fix: correct Atlas model recommendations
Atlas primary model is Kimi K2.5, not Opus. Updated TL;DR table
and detailed breakdown to reflect actual recommended order:
Kimi K2.5 > Sonnet > GPT.
2026-02-19 15:00:05 +09:00
YeonGyu-Kim
b1008510f8 docs: add agent-model matching guide for newcomers
- Add docs/guide/agent-model-matching.md with TL;DR table, detailed
  breakdown per agent, configuration examples, decision tree, common
  pitfalls, and default fallback chains
- Update README.md to reference the guide in TOC, Just Install This
  section, and Features overview
2026-02-19 15:00:05 +09:00
YeonGyu-Kim
fb596ed149 fix(todo-continuation-enforcer): check isContinuationStopped in injectContinuation to close /stop-continuation race
fix(todo-continuation-enforcer): check isContinuationStopped in injectContinuation to close /stop-continuation race
2026-02-19 14:25:16 +09:00
YeonGyu-Kim
a551fceca9 test(todo-continuation-enforcer): cover isContinuationStopped race during countdown
Adds a regression test for the race where /stop-continuation fires after
handleSessionIdle passes the flag check but before injectContinuation runs.
Verifies no injection occurs when the flag becomes true mid-countdown.
2026-02-19 14:08:03 +09:00
YeonGyu-Kim
9fa9dace2c fix(todo-continuation-enforcer): check isContinuationStopped in injectContinuation to close race window
When /stop-continuation is invoked during the 2s countdown, the stop flag
was never checked inside injectContinuation, so the injection would still
fire after the countdown elapsed.

Propagate isContinuationStopped from handleSessionIdle through startCountdown
into injectContinuation, where it is now re-checked before any API call.
2026-02-19 14:07:52 +09:00
codeg-dev
e5ede6dc8c fix(agents): replace background_cancel(all=true) with individual task cancellation
Atlas and Sisyphus prompts instructed agents to use background_cancel(all=true)
before final answers. This destroys uncollected background task results and
contradicts existing NEVER directives in the Sisyphus prompt, causing agents
to lose explore/librarian outputs mid-session.

Replace with individual task cancellation pattern that preserves completed
task results while still cleaning up running disposable tasks.
2026-02-19 11:27:11 +09:00
YeonGyu-Kim
31dc6e206d feat(hashline): enable hashline-edit by default
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-19 10:46:40 +09:00
YeonGyu-Kim
f9c78de171 fix(run): set default stabilization to 1s and coerce non-positive values
- Change MIN_STABILIZATION_MS from 0 to 1_000 to prevent premature exits
- Coerce non-positive minStabilizationMs to default instead of treating as disabled
- Fix stabilization logic: track firstWorkTimestamp inside the meaningful-work branch
- Add tests for default stabilization behavior and zero-value coercion

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-19 10:46:40 +09:00
YeonGyu-Kim
bd2e23584b docs: update AGENTS.md metadata
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-19 10:46:40 +09:00
YeonGyu-Kim
2034cf137a docs: add module-level AGENTS.md for config-manager, keyword-detector, ralph-loop, session-recovery, todo-continuation-enforcer
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-19 10:46:40 +09:00
YeonGyu-Kim
a28e989f83 docs: add module-level AGENTS.md for mcp-oauth, atlas, rules-injector, background-task, call-omo-agent, lsp
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-19 10:46:40 +09:00
YeonGyu-Kim
73514ed329 docs: update AGENTS.md metadata
Generated: 2026-02-19 | Commit: 5dc437f4 | 1158 TS files, 133k LOC

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-19 10:46:40 +09:00
YeonGyu-Kim
d5bd9cae98 feat(cli): enable timestamped run output by default 2026-02-19 10:46:40 +09:00
github-actions[bot]
d485ba2d4c @maximharizanov has signed the CLA in code-yeongyu/oh-my-opencode#1953 2026-02-18 20:52:50 +00:00
gustavosmendes
73d9e1f847 fix(write-existing-file-guard): wire cleanup through event dispatcher
Forward session.deleted events to write-existing-file-guard so per-session read permissions are actually cleared in runtime.

Add plugin-level regression test to ensure event forwarding remains wired, alongside the expanded guard behavior and unit coverage.
2026-02-18 16:50:30 -03:00
gustavosmendes
6d5d250f8f Update src/hooks/write-existing-file-guard/index.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-18 16:24:20 -03:00
gustavosmendes
b6c433dae0 fix: make write-existing-file-guard read-gated and test coverage 2026-02-18 16:18:59 -03:00
github-actions[bot]
69d6a2d181 @gustavosmendes has signed the CLA in code-yeongyu/oh-my-opencode#1952 2026-02-18 19:04:38 +00:00
Sisyphus
575fc383e0 Merge pull request #1950 from code-yeongyu/fix/remove-dead-ultrawork-model-override
refactor: remove dead ultrawork-model-override and non-max20 opus-4-6 code
2026-02-19 03:33:23 +09:00
Bo Li
fbf3018ee4 refactor(prompt): dedupe repeated skill guidance blocks 2026-02-19 02:22:14 +08:00
YeonGyu-Kim
6df7f73f81 refactor: remove dead ultrawork model override code
Remove ultrawork-model-override hook and per-agent ultrawork model swap
config that relied on zen opencode.ai free tier (no longer functional).

Removed:
- src/hooks/ultrawork-model-override/ (hook, test, index)
- ultrawork field from AgentOverrideConfigSchema
- ultrawork-model-override from HookNameSchema
- UltraworkConfig type from model-fallback-types
- Non-max20 sonnet+ultrawork-opus codepath from model-fallback
- Claude subscription model table from installation docs
- All references in plugin-interface, create-session-hooks, schema.json
- Related test cases and updated snapshots
2026-02-19 03:17:40 +09:00
Bo Li
810ebc0428 fix(skill): keep no-skills wording compatible with tests 2026-02-19 01:19:44 +08:00
Bo Li
5360cdb59b fix(skill): eagerly build description for preloaded skills 2026-02-19 01:16:57 +08:00
github-actions[bot]
5dc437f45d release: v3.7.4 2026-02-18 17:09:59 +00:00
github-actions[bot]
ebd97c85cc @kang-heewon has signed the CLA in code-yeongyu/oh-my-opencode#1936 2026-02-18 16:43:59 +00:00
YeonGyu-Kim
b4183339e7 fix(tests): stabilize auto-update-checker isolation under bun 2026-02-19 01:40:58 +09:00
Bo Li
462bf7b277 refactor: merge slashcommand tool into skill tool
Per reviewer feedback (code-yeongyu), keep the 'skill' tool as the main
tool and merge slashcommand functionality INTO it, rather than the reverse.

Changes:
- skill/tools.ts: Add command discovery (discoverCommandsSync) support;
  handle both SKILL.md skills and .omo/commands/ slash commands in a single
  tool; show combined listing in tool description
- skill/types.ts: Add 'commands' option to SkillLoadOptions
- skill/constants.ts: Update description to mention both skills and commands
- plugin/tool-registry.ts: Replace createSlashcommandTool with createSkillTool;
  register tool as 'skill' instead of 'slashcommand'
- tools/index.ts: Export createSkillTool instead of createSlashcommandTool
- plugin/tool-execute-before.ts: Update tool name checks from 'slashcommand'
  to 'skill'; update arg name from 'command' to 'name'
- agents/dynamic-agent-prompt-builder.ts: Categorize 'skill' tool as 'command'
- tools/skill-mcp/tools.ts: Update hint message to reference 'skill' tool
- hooks/auto-slash-command/executor.ts: Update error message

The slashcommand/ module files are kept (they provide shared utilities used
by the skill tool), but the slashcommand tool itself is no longer registered.
2026-02-19 00:18:47 +08:00
Bo Li
8b3cc5e011 fix: preserve git-master config defaults and tighten type safety 2026-02-19 00:17:22 +08:00
Bo Li
42b082b469 refactor: merge skill tool into slashcommand to reduce system prompt size 2026-02-19 00:17:22 +08:00
YeonGyu-Kim
8c726f5589 Merge pull request #1946 from code-yeongyu/fix/failing-tests-v3.8.0
fix(tests): update atlas hook and auto-update-checker tests
2026-02-18 23:36:10 +09:00
YeonGyu-Kim
6e16087779 fix(tests): update atlas hook and auto-update-checker tests
- atlas hook: update verification reminder assertions to match new
  4-phase QA system (MANDATORY -> PHASE 1/2, LIE -> LYING)
- auto-update-checker: add missing revertPinnedVersion mock export
  to fix SyntaxError in background-update-check tests

Note: 4 auto-update-checker tests fail only when run alongside
checker.test.ts due to bun mock.module isolation issue (pre-existing
in v3.7.3, not a regression)
2026-02-18 23:13:16 +09:00
YeonGyu-Kim
b0e8f5ec7b feat(run): print agent/model/duration on assistant completion 2026-02-18 21:10:21 +09:00
YeonGyu-Kim
6bf365595f refactor: replace opencode/glm-4.7-free with opencode/big-pickle model
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-18 21:10:21 +09:00
YeonGyu-Kim
096db59399 fix(run): inherit main-session tool permissions for continuation prompts 2026-02-18 21:10:21 +09:00
YeonGyu-Kim
7622eddb0d refactor(agents): convert all markdown tables to bullet lists across 12 agent files
Tables in template literal prompts render poorly in some LLM contexts.
Replaced 43 table instances with equivalent bullet list format preserving
all information. Affected: hephaestus, atlas/default, atlas/prompt-section-builder,
sisyphus-junior/gpt, librarian, explore, metis, prometheus/behavioral-summary,
prometheus/identity-constraints, prometheus/interview-mode, prometheus/plan-generation,
prometheus/plan-template.
2026-02-18 21:10:21 +09:00
YeonGyu-Kim
0d49c0cec2 Merge pull request #1535 from acamq/feature/start-work-plan-name-clean
feat(prometheus): include plan name in /start-work guidance
2026-02-18 18:20:08 +09:00
YeonGyu-Kim
305d036577 Merge pull request #1549 from MoerAI/fix/windows-path-absolute-check
fix(hooks): use path.isAbsolute() for cross-platform path detection on Windows
2026-02-18 18:04:13 +09:00
YeonGyu-Kim
a493227fe4 Merge pull request #1822 from Strocs/fix/non-interactive-env-hook-duplication
fix(non-interactive-env): prevent environment variable duplication on repeated executions
2026-02-18 18:03:50 +09:00
YeonGyu-Kim
94a5a32806 Merge pull request #1940 from alaa-alghazouli/fix-readme-installation-commands
fix(readme): swap installation instructions for humans and AI
2026-02-18 18:03:21 +09:00
YeonGyu-Kim
943a4da349 Merge pull request #1938 from POBIM/fix/delegate-task-agent-overrides
fix(delegate-task): pass plugin agent overrides into task resolver
2026-02-18 18:03:13 +09:00
YeonGyu-Kim
75ff6e1be1 feat(atlas): enforce 4-phase critical QA with mandatory hands-on verification
Rewrite Atlas GPT verification from a checklist to a 4-phase protocol:
Phase 1 (Read Code First), Phase 2 (Automated Checks), Phase 3 (Hands-On QA),
Phase 4 (Gate Decision). Hands-on QA is now mandatory for user-facing changes,
not 'if applicable'. Hook message reinforces subagent distrust and requires
actually running deliverables before proceeding to next task.
2026-02-18 17:50:26 +09:00
YeonGyu-Kim
d837498318 feat(agents): boost sisyphus parallel tool call intensity, remove incorrect subagent_type enforcement from hephaestus 2026-02-18 17:47:08 +09:00
YeonGyu-Kim
617e53605a feat(cli): use sonnet-4-6 with ultrawork opus-4-6 for non-max20 Claude subscribers 2026-02-18 17:47:08 +09:00
YeonGyu-Kim
376bd7428a test(hooks): add ultrawork-model-override unit tests 2026-02-18 17:47:08 +09:00
YeonGyu-Kim
e863fe2013 feat(hooks): add ultrawork-model-override hook for per-agent model swap 2026-02-18 17:47:08 +09:00
YeonGyu-Kim
aad938a21f Merge pull request #1941 from code-yeongyu/fix/issue-1939-initial-pane-spawn
fix(tmux): skip agent area width guard when 0 agent panes exist
2026-02-18 17:46:57 +09:00
YeonGyu-Kim
a717a95e13 fix: clear spy call history in completion-verbose-logging test
spyOn(console, 'log') accumulates calls across test files in bun:test.
Add mockClear() after spy creation to prevent cross-file contamination
when run in the same bun test batch as completion.test.ts.
2026-02-18 17:43:16 +09:00
YeonGyu-Kim
7b3a64b77e test(tmux): add boundary tests for exact split threshold with 0 agent panes 2026-02-18 17:33:26 +09:00
YeonGyu-Kim
e2e89b1f57 fix(tmux): skip agent area width guard when 0 agent panes exist
When no agent panes exist, mainPane.width equals windowWidth, making
agentAreaWidth zero. The early return guard blocked initial pane creation
before the currentCount === 0 handler could execute.

Add currentCount > 0 condition so the guard only fires when agent panes
already exist, allowing the bootstrap handler to evaluate canSplitPane.

Closes #1939
2026-02-18 17:30:05 +09:00
YeonGyu-Kim
5bb0e69dea fix(cli-run): silence wait noise and suppress raw arrow escape input 2026-02-18 17:25:13 +09:00
github-actions[bot]
8f74dbbcae @alaa-alghazouli has signed the CLA in code-yeongyu/oh-my-opencode#1940 2026-02-18 08:21:29 +00:00
alaa-alghazouli
5141c42e3c fix(readme): swap installation instructions for international languages 2026-02-18 09:18:21 +01:00
alaa-alghazouli
28097e9461 fix(readme): swap installation instructions for humans and AI 2026-02-18 09:18:21 +01:00
github-actions[bot]
e20fba3ab3 @POBIM has signed the CLA in code-yeongyu/oh-my-opencode#1938 2026-02-18 08:12:02 +00:00
pobim
eb6f093273 fix(delegate-task): pass agent overrides to subagent resolver 2026-02-18 15:00:09 +07:00
YeonGyu-Kim
a60a153d19 refactor(hooks): rename sisyphus-gpt-hephaestus-reminder to no-sisyphus-gpt
Shorter hook name, disableable via disabled_hooks config, migration added
for backward compatibility. Also forces agent switch to Hephaestus on
Sisyphus + GPT detection. Docs updated with new hook name.
2026-02-18 16:33:16 +09:00
YeonGyu-Kim
a49e05fd56 fix(hooks): fix sisyphus-gpt-hephaestus-reminder never matching agent name
Use getAgentConfigKey() to normalize display names (e.g. 'Sisyphus (Ultraworker)')
back to config keys before comparison. Update toast to 10s duration with clearer
line-broken messaging.
2026-02-18 16:26:47 +09:00
YeonGyu-Kim
dacada152a fix(cli-run): attach to default server when auto port range exhausted 2026-02-18 16:02:57 +09:00
YeonGyu-Kim
ada8c127aa refactor(cli-run): remove redundant opencode bin path shim 2026-02-18 16:00:33 +09:00
YeonGyu-Kim
101dadbce2 fix(agents): block apply_patch tool for all read-only agents
Oracle, Librarian, Explore, Momus, and Metis could modify files via
apply_patch despite being read-only agents. Also fixed duplicate task
entries in Librarian and Explore restriction lists.
2026-02-18 15:53:01 +09:00
YeonGyu-Kim
96ff1e00cc chore: upgrade claude-sonnet-4-5 to claude-sonnet-4-6 across codebase 2026-02-18 15:51:24 +09:00
YeonGyu-Kim
3f16057a4b fix(cli-run): skip unresolved opencode bin path injection 2026-02-18 15:49:44 +09:00
github-actions[bot]
9c5d80af1d release: v3.7.3 2026-02-18 06:05:04 +00:00
YeonGyu-Kim
1e05f4770e fix(cli-run): retry server start on port binding race condition
When port appears available but binding fails (race with another opencode
instance), retry on next available port (auto mode) or attach to existing
server (explicit port mode) instead of crashing with exit code 1.
2026-02-18 15:01:09 +09:00
github-actions[bot]
b1c43aeb89 @codeg-dev has signed the CLA in code-yeongyu/oh-my-opencode#1927 2026-02-18 01:13:27 +00:00
github-actions[bot]
19cd79070e release: v3.7.2 2026-02-17 17:16:40 +00:00
YeonGyu-Kim
c21e0b094f fix(cli-run): strip ANSI codes in think block test assertions for CI compatibility 2026-02-18 02:13:41 +09:00
YeonGyu-Kim
2f659e9b97 fix(cli-run): improve agent header and think block spacing
Add newlines around agent header for visual separation, dim the thinking
label, and add trailing newline after think block close.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) assistance
2026-02-18 02:01:16 +09:00
YeonGyu-Kim
d9751bd5cb fix(cli-run): deduplicate tool headers and message counter resets on repeated events
Guard against duplicate tool header/output rendering when both tool.execute
and message.part.updated fire for the same tool, and prevent message counter
resets when message.updated fires multiple times for the same assistant message.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) assistance
2026-02-18 02:01:08 +09:00
XIN PENG
479bbb240f fix: avoid shell interpolation in image conversion commands 2026-02-17 08:58:41 -08:00
YeonGyu-Kim
3313ec3e4f chore: regenerate AGENTS.md knowledge base
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) assistance
2026-02-18 01:26:19 +09:00
XIN PENG
814380b85c fix: normalize Base64 data URL input before image conversion 2026-02-17 08:21:07 -08:00
XIN PENG
ea814ffa15 fix: detect HEIC/HEIF from raw Base64 image signatures 2026-02-17 08:14:40 -08:00
YeonGyu-Kim
04e95d7e27 refactor(cli-run): stream reasoning text instead of summarized thinking line
Replace the single-line "Thinking: <summary>" rendering with direct streaming
of reasoning tokens via writePaddedText. Removes maybePrintThinkingLine and
renderThinkingLine in favor of incremental output with dim styling.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-18 01:14:01 +09:00
YeonGyu-Kim
0bffdc441e feat(hooks): add sisyphus-gpt-hephaestus-reminder hook
Shows error toast when Sisyphus runs with a GPT model, nudging user to
use Hephaestus instead.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-18 01:08:40 +09:00
YeonGyu-Kim
eaf315a8d7 feat(cli-run): add streaming delta, think block rendering, and rich tool headers
Adds message.part.delta event handling for real-time streaming output,
reasoning/think block display with in-place updates, per-agent profile
colors, padded text output, and semantic tool headers with icons.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-18 01:08:39 +09:00
github-actions[bot]
4bb8fa4a7f @rentiansheng has signed the CLA in code-yeongyu/oh-my-opencode#1889 2026-02-17 14:22:58 +00:00
github-actions[bot]
d937390f68 @feelsodev has signed the CLA in code-yeongyu/oh-my-opencode#1917 2026-02-17 12:24:15 +00:00
YeonGyu-Kim
24d5d50c6f fix(prometheus): replace single atomic write with incremental Write+Edit protocol (#1904) 2026-02-17 18:02:45 +09:00
YeonGyu-Kim
b0ff2ce589 chore: regenerate JSON schema with propertyNames and json-error-recovery hook 2026-02-17 18:02:35 +09:00
YeonGyu-Kim
d0bd24bede fix(cli-run): rely on continuation markers for completion
Use hook-written continuation marker state to gate run completion checks and remove the noisy event-stream shutdown timeout log in run mode.
2026-02-17 17:50:47 +09:00
YeonGyu-Kim
706ee61333 refactor: unify github-issue-triage + github-pr-triage into single github-triage skill
Replace two separate triage skills with one unified skill using 'free' category
for all subagents. Action-oriented: auto-answer questions, analyze bugs,
merge safe PRs. All items tracked via TaskCreate, [sisyphus-bot] comment prefix.
2026-02-17 17:30:52 +09:00
YeonGyu-Kim
0d888df879 fix(cli-run): avoid infinite wait on missing child status
Treat child sessions missing from session.status as transient so completion polling can proceed while still blocking on explicit non-idle descendants.
2026-02-17 16:15:25 +09:00
YeonGyu-Kim
5f9cfcbcf3 feat(cli-run): show agent/model header and suppress toast output 2026-02-17 16:11:34 +09:00
YeonGyu-Kim
4d3cce685d refactor: remove cli run timeout path and rely on strict completion 2026-02-17 16:01:57 +09:00
YeonGyu-Kim
7b2c2529fe fix: enforce continuation-aware completion gating 2026-02-17 16:01:57 +09:00
YeonGyu-Kim
47a8c3e4a9 fix: harden run completion checks and graceful timeout 2026-02-17 16:01:57 +09:00
YeonGyu-Kim
5f5b476f12 fix: gate run event traces behind --verbose 2026-02-17 16:01:57 +09:00
YeonGyu-Kim
991dcdb6c1 Merge pull request #1845 from iyoda/refactor/consolidate-port-utils
refactor(mcp-oauth): consolidate duplicate port utilities into shared/port-utils
2026-02-17 15:59:51 +09:00
YeonGyu-Kim
f4eef9f534 Merge pull request #1907 from BowTiedSwan/fix/json-retry-loop
feat(hooks): add json-error-recovery hook to prevent infinite retry loops
2026-02-17 15:59:44 +09:00
YeonGyu-Kim
8384fd1d07 Merge pull request #1911 from jkoelker/preserve-default-agent
fix(config): normalize configured default_agent
2026-02-17 15:59:36 +09:00
code-yeongyu
a2ad7ce6a7 fix(config): scope default_agent normalization to Sisyphus mode 2026-02-17 15:50:08 +09:00
YeonGyu-Kim
5f939f900a fix(hooks): harden json-error-recovery matching and scope 2026-02-17 15:46:21 +09:00
github-actions[bot]
538aba0d0f release: v3.7.1 2026-02-17 05:32:02 +00:00
YeonGyu-Kim
97f7540600 chore: add propertyNames constraints to JSON schema 2026-02-17 14:29:06 +09:00
YeonGyu-Kim
462e2ec2b0 refactor: remove 3 orphaned files and prefix unused parameter 2026-02-17 14:09:12 +09:00
YeonGyu-Kim
9acdd6b85d refactor: remove 3 orphaned files from call-omo-agent and delegate-task 2026-02-17 14:08:44 +09:00
YeonGyu-Kim
1fb6a7cc80 refactor: remove 16 orphaned files from background-agent 2026-02-17 14:08:38 +09:00
YeonGyu-Kim
d3b79064c6 refactor: remove orphaned modules/ directory from background-task 2026-02-17 14:08:30 +09:00
YeonGyu-Kim
744dee70e9 refactor: remove 3 orphaned files and unused import from tmux-subagent 2026-02-17 14:08:28 +09:00
YeonGyu-Kim
0265fa6990 refactor: remove 3 orphaned files from background-agent/spawner 2026-02-17 14:08:12 +09:00
github-actions[bot]
7e1293d273 release: v3.7.0 2026-02-17 04:35:13 +00:00
YeonGyu-Kim
e3342dcd4a refactor(prompts): replace markdown tables with bullet lists, harden Oracle protection
Convert all markdown tables in Sisyphus and dynamic-agent-prompt-builder
to plain bullet lists for cleaner prompt rendering.

Add explicit Oracle safeguards:
- Hard Block: background_cancel(all=true) when Oracle running
- Hard Block: delivering final answer before collecting Oracle result
- Anti-Pattern: background_cancel(all=true) and skipping Oracle
- Oracle section: NEVER cancel, collect via background_output first
- Background Result Collection: split cancel/wait into separate steps
  with explicit NEVER use background_cancel(all=true) instruction
2026-02-17 13:26:37 +09:00
YeonGyu-Kim
764abb2a4b docs: fix ultrabrain model reference in category-skill-guide (GPT-5.2→GPT-5.3 Codex) 2026-02-17 11:32:36 +09:00
YeonGyu-Kim
f8e58efeb4 docs: fix agent model references in all READMEs (Opus 4.5→4.6, GPT 5.2 Codex→5.3, Librarian→GLM-4.7, Explore→Grok Code Fast 1) 2026-02-17 11:32:26 +09:00
YeonGyu-Kim
fba06868dd docs: fix model references across guide docs (Opus 4.5→4.6, GPT-5.2 Codex→5.3, Atlas model, add deep category, fix dot notation) 2026-02-17 11:31:22 +09:00
YeonGyu-Kim
c51994c791 docs: fix agent fallback chains, provider chains, and category tables to match model-requirements.ts
- features.md: update explore primary model (grok-code-fast-1), fix all agent fallback chains
- configurations.md: add missing deep category, fix all agent/category provider chains, add hephaestus to available agents, update model names to match actual code
2026-02-17 11:28:32 +09:00
YeonGyu-Kim
3facf9fac3 docs: fix structural counts in AGENTS.md (hook handlers 7→8, tool dirs 14→15, core hooks 33→32, session hooks 20→19, config merge order) 2026-02-17 11:26:28 +09:00
YeonGyu-Kim
aac79f03b5 docs: regenerate all AGENTS.md files from comprehensive codebase exploration
- Fired 33 parallel explore agents across all major directories
- Analyzed 1164 TS files, 133k LOC, 41 hooks, 26 tools, 11 agents, 18 features
- Regenerated 13 AGENTS.md files with 905 total lines
- Root: plugin architecture, initialization flow, 7 OpenCode hook handlers
- src/: entry point orchestration, hook composition pipeline
- agents/: 11 agent inventory with tool restrictions and factory patterns
- hooks/: 41 hooks organized by 5 tiers, key complex hooks documented
- tools/: 26 tools across 14 directories, delegation categories
- features/: 18 modules mapped by complexity (HIGH/MEDIUM/LOW)
- shared/: 101 utilities in 13 categories, model resolution pipeline
- config/: 22 schema files, Zod v4 validation system
- cli/: 5 commands, doctor checks, model fallback system
- mcp/: 3-tier MCP system architecture
- plugin-handlers/: 6-phase config loading pipeline
- claude-code-hooks/: CC settings.json compatibility layer
- claude-tasks/: task schema + file-based persistence

🤖 Generated with assistance of oh-my-opencode
2026-02-17 11:17:01 +09:00
YeonGyu-Kim
5a8e424c8e Merge pull request #1910 from code-yeongyu/fix/1753-context-window-hardcoded
fix: use ModelCacheState for context window limit instead of env var (#1753)
2026-02-17 10:53:58 +09:00
YeonGyu-Kim
d786691260 fix: read anthropic 1m flag from live model cache state 2026-02-17 10:51:01 +09:00
YeonGyu-Kim
363016681b test: cover model-cache and env fallback context limits 2026-02-17 10:51:01 +09:00
YeonGyu-Kim
b444899153 fix: use model cache context flag for runtime context limits 2026-02-17 10:51:01 +09:00
YeonGyu-Kim
b1e7bb4c59 Merge pull request #1912 from code-yeongyu/fix/1694-fallback-wiring
fix: wire fallback availability into runtime export path (#1694)
2026-02-17 10:50:50 +09:00
YeonGyu-Kim
8e115c7f9d fix: export fallback availability from traced module 2026-02-17 10:47:09 +09:00
Jason Kölker
a562e3aa4b fix(config): normalize configured default_agent
Agent keys are remapped to display names, so preserving `default_agent`
values could still select a missing key at runtime.

This regression surfaced after d94a739203 remapped `config.agent` keys
to display names without canonicalizing configured defaults.

Normalize configured `default_agent` through display-name mapping before
fallback logic and extend tests to cover canonical and display-name
inputs.
2026-02-17 01:45:47 +00:00
YeonGyu-Kim
fe5d341208 Merge pull request #1909 from code-yeongyu/fix/1694-fallback-model-ids
fix: add logging and validation to fallback chain model resolution (#1694)
2026-02-17 10:38:14 +09:00
YeonGyu-Kim
ca06ce134f fix: add fallback resolution warnings for unavailable models 2026-02-17 10:29:48 +09:00
YeonGyu-Kim
72fa2c7e65 fix(tmux): stop layout override after spawn, use configured main pane size
Remove applyLayout(select-layout main-vertical) call after spawn which
was destroying grid arrangements by forcing vertical stacking. Now only
enforceMainPaneWidth is called, preserving the grid created by manual
split directions. Also fix enforceMainPaneWidth to use config's
main_pane_size percentage instead of hardcoded 50%.
2026-02-17 09:50:17 +09:00
YeonGyu-Kim
b3c5f4caf5 fix(tmux): use actual pane dimensions and configured min width for grid calculation
Agent area width now uses real mainPane.width instead of hardcoded 50%
ratio. Grid planning, split availability, and spawn target finding now
respect user's agent_pane_min_width config instead of hardcoded
MIN_PANE_WIDTH=52, enabling 2-column grid layouts on narrower terminals.
2026-02-17 09:48:18 +09:00
YeonGyu-Kim
219c1f8225 update: always wait for Oracle results instead of blanket background_cancel(all=true) 2026-02-17 09:42:59 +09:00
bowtiedswan
86f2a93fc9 feat(hooks): add json-error-recovery hook to prevent infinite retry loops 2026-02-16 21:35:58 +02:00
XIN PENG
116ca090e0 fix: Add Base64 image format conversion support
Extends conversion logic to handle Base64-encoded images (e.g., from clipboard).
Previously, unsupported formats like HEIC/RAW/PSD in Base64 form bypassed
the conversion check and caused failures at multimodal-looker agent.

Changes:
- Add convertBase64ImageToJpeg() function in image-converter.ts
- Save Base64 data to temp file, convert, read back as Base64
- Update tools.ts to check and convert Base64 images when needed
- Ensure proper cleanup of all temporary files

Testing:
- All tests pass (29/29)
- Verified with 1.7MB HEIC file converted from Base64
- Type checking passes
2026-02-16 11:08:25 -08:00
github-actions[bot]
6208c07809 @xinpengdr has signed the CLA in code-yeongyu/oh-my-opencode#1906 2026-02-16 19:01:47 +00:00
XIN PENG
ae19ff60cf feat: Add automatic image format conversion for HEIC/RAW/PSD files
Adds automatic conversion of unsupported image formats (HEIC, HEIF, RAW, PSD)
to JPEG before sending to multimodal-looker agent.

Changes:
- Add image-converter.ts module with format detection and conversion
- Modify look_at tool to auto-convert unsupported formats
- Extend mime-type-inference.ts to support 15+ additional formats
- Use sips (macOS) and ImageMagick (Linux/Windows) for conversion
- Add proper cleanup of temporary files

Fixes #722

Testing:
- All existing tests pass (29/29)
- TypeScript type checking passes
- Verified HEIC to JPEG conversion on macOS
2026-02-16 10:50:05 -08:00
YeonGyu-Kim
1b7a1e3f0b Merge pull request #1905 from code-yeongyu/fix/tmux-split-stability
fix: stabilize tmux split and session readiness handling
2026-02-17 03:49:30 +09:00
YeonGyu-Kim
84a83922c3 fix: stop tracking sessions that never become ready
When session readiness times out, immediately close the spawned pane and skip tracking to prevent stale mappings from causing reopen and close anomalies.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-17 03:40:55 +09:00
YeonGyu-Kim
17da22704e fix: size main pane using configured layout percentage
Main pane resize now uses main_pane_size instead of a hardcoded 50 percent fallback so post-split layout remains stable and predictable.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-17 03:40:46 +09:00
YeonGyu-Kim
da3f24b8b1 fix: align split targeting with configured pane width
Use the configured agent pane width consistently in split target selection and avoid close+spawn churn by replacing the oldest pane when eviction is required.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-17 03:40:37 +09:00
YeonGyu-Kim
b02721463e refactor: route status porcelain map parsing through line parser 2026-02-17 03:29:10 +09:00
YeonGyu-Kim
1f31a3d8f1 test: add dedicated status porcelain line parser with coverage 2026-02-17 03:29:01 +09:00
YeonGyu-Kim
1566cfcc1e update: Hephaestus completion guarantee, Sisyphus-Junior Hephaestus-style rewrite, snake_case tools
Hephaestus:
- Add Completion Guarantee section with Codex-style persistence framing
- Add explicit explore/librarian call syntax examples (subagent_type, not category)
- Use positive 'keep going until resolved' over negative 'NEVER stop'
- Fix tool names: TaskCreate/TaskUpdate → task_create/task_update

Sisyphus-Junior GPT:
- Full Hephaestus-style rewrite: autonomy, reporting, parallelism, tool usage
- Remove Blocked & Allowed Tools section and 'You work ALONE' messaging
- Add Progress Updates, Ambiguity Protocol, Code Quality sections
- Fix tool names: TaskCreate/TaskUpdate → task_create/task_update

Sisyphus-Junior Default:
- Remove buildConstraintsSection and blocked actions messaging
- Fix tool names: TaskCreate/TaskUpdate → task_create/task_update

Tests: update all assertions for new prompt structure (31/31 pass)
2026-02-17 03:12:32 +09:00
YeonGyu-Kim
2b5887aca3 fix: prevent overlapping poll cycles in managers
Guarding polling re-entry avoids stacked async polls under slow responses, and unref on pending-call cleanup timer reduces idle wakeups.
2026-02-17 03:06:40 +09:00
YeonGyu-Kim
8c88da51e1 update: soften Hephaestus brevity bias — replace 'brief/briefly' with 'clear' throughout
Replace 7 instances of brief/briefly that caused over-terse behavior:
- 'briefly restate' → 'restate'
- 'brief summary' → 'clear summary'
- 'briefly state the WHY' → 'explain the WHY' (×2)
- 'brief context' → 'clear context'
- 'Brief updates' → 'Clear updates (a few sentences)'
- 'keep it brief and clear' → 'keep it clear and helpful'
2026-02-17 02:58:42 +09:00
YeonGyu-Kim
199992e05b update: Hephaestus prompt — restore intent gate, strengthen parallelism and reporting
- Restore Assumptions Check and When to Challenge the User from Sisyphus intent gate
- Add proactive explore/librarian firing to CORRECT behavior list
- Strengthen parallel execution with GPT-5.2 tool_usage_rules (parallelize ALL independent calls)
- Embed reporting into each Execution Loop step (Tell user pattern)
- Strengthen Progress Updates with plain-language and WHY-not-just-WHAT guidance
- Add post-edit reporting to Output Contract and After Implementation
- Fix Output Contract preamble conflict (skip empty preambles, but DO report actions)
2026-02-17 02:56:22 +09:00
YeonGyu-Kim
6b546526f3 refactor: diet Hephaestus prompt — remove redundancy, add progress updates and skill examples
- Remove router nudge (reasoning configuration section)
- Remove redundant sections: Role & Agency, Judicious Initiative, Success
  Criteria, Response Compaction, Soft Guidelines
- Merge Identity + Core Principle into compact Identity section
- Restore autonomous behavior policy (FORBIDDEN/CORRECT) from Role & Agency
- Add Progress Updates section with friendly tone and concrete examples
- Add Skill Loading Examples table (frontend-ui-ux, playwright, git-master, tauri)
- Condense Parallel Execution, Execution Loop, Verification, Failure Recovery
- Update Output Contract with friendly communication style

651 → 437 lines (33% reduction), behavior preserved
2026-02-17 02:46:11 +09:00
YeonGyu-Kim
c44509b397 fix: skip startup toasts in CLI run mode for auto-update-checker
Add OPENCODE_CLI_RUN_MODE environment variable check to skip all startup
toasts and version checks when running in CLI mode. This prevents
notification spam during automated CLI run sessions.

Includes comprehensive test coverage for CLI run mode behavior.

🤖 Generated with OhMyOpenCode assistance
2026-02-17 02:34:39 +09:00
YeonGyu-Kim
17994693af fix: add directory parameter and improve CLI run session handling
- Add directory parameter to session API calls (session.get, session.todo,
  session.status, session.children)
- Improve agent resolver with display name support via agent-display-names
- Add tool execution visibility in event handlers with running/completed
  status output
- Enhance poll-for-completion with main session status checking and
  stabilization period handling
- Add normalizeSDKResponse import for consistent response handling
- Update types with Todo, ChildSession, and toast-related interfaces

🤖 Generated with OhMyOpenCode assistance
2026-02-17 02:34:35 +09:00
YeonGyu-Kim
a31087e543 fix: add propertyNames validation to object schemas in JSON schema
Add propertyNames: { type: "string" } to all object schemas with
additionalProperties to ensure proper JSON schema validation for
dynamic property keys.

🤖 Generated with OhMyOpenCode assistance
2026-02-17 02:34:31 +09:00
YeonGyu-Kim
5c13a63758 fix: invoke claude-code-hooks PreCompact in session compacting handler
The experimental.session.compacting handler was not delegating to
claudeCodeHooks, making PreCompact hooks from .claude/settings.json
dead code. Also fixed premature early-return when compactionContextInjector
was null which would skip any subsequent hooks.
2026-02-17 02:14:01 +09:00
YeonGyu-Kim
d9f21da026 fix: prefer a runnable opencode binary for cli run 2026-02-17 02:12:36 +09:00
YeonGyu-Kim
7d2c798ff0 Merge pull request #1893 from code-yeongyu/fix/1716-disabled-agents-enforcement
fix: enforce disabled_agents config in call_omo_agent (#1716)
2026-02-17 02:07:18 +09:00
YeonGyu-Kim
ea589e66e8 Merge remote-tracking branch 'origin/dev' into fix/1716-disabled-agents-enforcement
# Conflicts:
#	src/plugin/tool-registry.ts
#	src/tools/call-omo-agent/tools.test.ts
#	src/tools/call-omo-agent/tools.ts
2026-02-17 02:04:19 +09:00
YeonGyu-Kim
e299c09ee8 fix: include provider-models cache for Hephaestus availability 2026-02-17 02:03:03 +09:00
YeonGyu-Kim
285d8d58dd fix: skip compaction messages in parent-session context lookup 2026-02-17 02:03:03 +09:00
YeonGyu-Kim
e1e449164a Merge pull request #1898 from code-yeongyu/fix/1671-tmux-layout
fix: apply tmux layout config during pane spawning (#1671)
2026-02-17 02:01:29 +09:00
YeonGyu-Kim
324d2c1f0c Merge branch 'dev' into fix/1671-tmux-layout 2026-02-17 01:58:59 +09:00
YeonGyu-Kim
f3de0f43bd Merge pull request #1899 from code-yeongyu/fix/1700-vertex-anthropic
fix: recognize google-vertex-anthropic as Claude provider (#1700)
2026-02-17 01:58:26 +09:00
YeonGyu-Kim
5839594041 Merge pull request #1897 from code-yeongyu/fix/1679-copilot-fallback
fix: handle all model versions in normalizeModelName for fallback chains (#1679)
2026-02-17 01:58:24 +09:00
YeonGyu-Kim
ada0a233d6 Merge pull request #1894 from code-yeongyu/fix/1681-oracle-json-parse
fix: resolve Oracle JSON parse error after promptAsync refactor (#1681)
2026-02-17 01:58:21 +09:00
YeonGyu-Kim
b7497d0f9f Merge branch 'dev' into fix/1700-vertex-anthropic 2026-02-17 01:54:11 +09:00
YeonGyu-Kim
7bb03702c9 Merge branch 'dev' into fix/1671-tmux-layout 2026-02-17 01:54:08 +09:00
YeonGyu-Kim
ccbeea96c1 Merge branch 'dev' into fix/1679-copilot-fallback 2026-02-17 01:54:05 +09:00
YeonGyu-Kim
9922a94d12 Merge branch 'dev' into fix/1681-oracle-json-parse 2026-02-17 01:54:03 +09:00
YeonGyu-Kim
e78c54f6eb Merge pull request #1896 from code-yeongyu/fix/1283-review-code-silent-fail
fix: report silent subagent delegation failures (#1283)
2026-02-17 01:53:56 +09:00
YeonGyu-Kim
74be163df3 Merge pull request #1895 from code-yeongyu/fix/1718-windows-subagent-dir
fix: use correct project directory for Windows subagents (#1718)
2026-02-17 01:53:43 +09:00
YeonGyu-Kim
24789334e4 fix: detect AppData directory paths without trailing separators 2026-02-17 01:45:14 +09:00
YeonGyu-Kim
0e0bfc1cd6 Merge pull request #1849 from jkoelker/preserve-default-agent
fix(config): preserve configured default_agent
2026-02-17 01:43:04 +09:00
Jason Kölker
90ede4487b fix(config): preserve configured default_agent
oh-my-opencode overwrote OpenCode's default_agent with sisyphus whenever
Sisyphus orchestration was enabled. This made explicit defaults like
Hephaestus ineffective and forced manual agent switching in new sessions.

Only assign sisyphus as default when default_agent is missing or blank,
and preserve existing configured values. Add tests for both preservation
and fallback behavior to prevent regressions.
2026-02-17 01:41:52 +09:00
YeonGyu-Kim
3a2f886357 fix: apply tmux layout config during pane spawning (#1671) 2026-02-17 01:36:01 +09:00
YeonGyu-Kim
2fa82896f8 Merge pull request #1884 from code-yeongyu/feat/hashline-edit
feat: port hashline edit tool from oh-my-pi
2026-02-17 01:35:22 +09:00
YeonGyu-Kim
5aa9ecdd5d Merge pull request #1870 from dankochetov/fix/background-notification-hook-gate
fix(background-agent): honor disabled background-notification for system reminders
2026-02-17 01:35:21 +09:00
YeonGyu-Kim
c8d03aaddb Merge pull request #1708 from jsl9208/fix/ast-grep-replace-silent-noop
fix(ast-grep): fix ast_grep_replace silent write failure
2026-02-17 01:34:41 +09:00
YeonGyu-Kim
693f73be6d Merge pull request #1729 from potb/fix/1716-disabled-agents-call-omo
fix(call-omo-agent): enforce disabled_agents config
2026-02-17 01:34:38 +09:00
YeonGyu-Kim
1b05c3fb52 Merge pull request #1819 from jonasherr/feat/add-playwright-cli-provider
feat(browser-automation): add playwright-cli as browser automation provider
2026-02-17 01:34:34 +09:00
YeonGyu-Kim
5ae45c8c8e fix: use correct project directory for Windows subagents (#1718) 2026-02-17 01:29:25 +09:00
YeonGyu-Kim
931bf6c31b fix: resolve JSON parse error in Oracle after promptAsync refactor (#1681) 2026-02-17 01:29:17 +09:00
YeonGyu-Kim
d672eb1c12 fix: recognize google-vertex-anthropic as Claude provider (#1700) 2026-02-17 01:28:27 +09:00
YeonGyu-Kim
dab99531e4 fix: handle all model versions in normalizeModelName for fallback chains (#1679) 2026-02-17 01:27:10 +09:00
YeonGyu-Kim
d7a53e8a5b fix: report errors instead of silent catch in subagent-resolver (#1283) 2026-02-17 01:26:58 +09:00
YeonGyu-Kim
56353ae4b2 fix: enforce disabled_agents config in call_omo_agent (#1716) 2026-02-17 01:25:47 +09:00
sisyphus-dev-ai
65216ed081 chore: changes by sisyphus-dev-ai 2026-02-16 16:21:51 +00:00
YeonGyu-Kim
af7b1ee620 refactor(hashline): override native edit tool instead of separate tool + disabler hook
Replace 3-component hashline system (separate hashline_edit tool + edit
disabler hook + OpenAI-exempted read enhancer) with 2-component system
that directly overrides the native edit tool key, matching the
delegate_task pattern.

- Register hashline tool as 'edit' key to override native edit
- Delete hashline-edit-disabler hook (no longer needed)
- Delete hashline-provider-state module (no remaining consumers)
- Remove OpenAI exemption from read enhancer (explicit opt-in means all providers)
- Remove setProvider wiring from chat-params
2026-02-17 00:03:10 +09:00
YeonGyu-Kim
9eb786debd test(session-manager): fix storage tests by mocking message-dir dependency 2026-02-17 00:03:10 +09:00
YeonGyu-Kim
b56c777943 test: skip 4 flaky session-manager tests (test order dependency) 2026-02-17 00:03:10 +09:00
YeonGyu-Kim
25f2003962 fix(ci): isolate session-manager tests to prevent flakiness
- Move src/tools/session-manager to isolated test section
- Prevents mock.module() pollution across parallel test runs
- Fixes 4 flaky storage tests that failed in CI
2026-02-17 00:03:10 +09:00
YeonGyu-Kim
359c6b6655 fix(hashline): address Cubic review comments
- P2: Change replace edit sorting from POSITIVE_INFINITY to NEGATIVE_INFINITY
  so replace edits run LAST after line-based edits, preventing line number
  shifts that would invalidate subsequent anchors

- P3: Update tool description from SHA-256 to xxHash32 to match actual
  implementation in hash-computation.ts
2026-02-17 00:03:10 +09:00
YeonGyu-Kim
51dde4d43f feat(hashline): port hashline edit tool from oh-my-pi
This PR ports the hashline edit tool from oh-my-pi to oh-my-opencode as an experimental feature.

## Features
- New experimental.hashline_edit config flag
- hashline_edit tool with 4 operations: set_line, replace_lines, insert_after, replace
- Hash-based line anchors for safe concurrent editing
- Edit tool disabler for non-OpenAI providers
- Read output enhancer with LINE:HASH prefixes
- Provider state tracking module

## Technical Details
- xxHash32-based 2-char hex hashes
- Bottom-up edit application to prevent index shifting
- OpenAI provider exemption (uses native apply_patch)
- 90 tests covering all operations and edge cases
- All files under 200 LOC limit

## Files Added/Modified
- src/tools/hashline-edit/ (7 files, ~400 LOC)
- src/hooks/hashline-edit-disabler/ (4 files, ~200 LOC)
- src/hooks/hashline-read-enhancer/ (3 files, ~400 LOC)
- src/features/hashline-provider-state.ts (13 LOC)
- src/config/schema/experimental.ts (hashline_edit flag)
- src/config/schema/hooks.ts (2 new hook names)
- src/plugin/tool-registry.ts (conditional registration)
- src/plugin/chat-params.ts (provider state tracking)
- src/tools/index.ts (export)
- src/hooks/index.ts (exports)
2026-02-17 00:03:10 +09:00
YeonGyu-Kim
149de9da66 feat(config): add experimental.hashline_edit flag and provider state module 2026-02-17 00:03:10 +09:00
github-actions[bot]
fcf26d9898 release: v3.6.0 2026-02-16 15:02:43 +00:00
YeonGyu-Kim
7e9b9cedec Merge pull request #1721 from edxeth/fix/disable-mcps
fix(mcp): preserve user's enabled:false and apply disabled_mcps to all MCP sources
2026-02-16 23:52:24 +09:00
YeonGyu-Kim
8c066ccfd6 test: align load_skills error assertions in delegate-task 2026-02-16 22:59:52 +09:00
YeonGyu-Kim
bad63b9dd6 fix: force include_thinking and include_tool_results for running background tasks 2026-02-16 22:47:51 +09:00
YeonGyu-Kim
e624f982ed feat: auto-enable full_session, thinking, and tool_results for running background tasks 2026-02-16 22:37:27 +09:00
YeonGyu-Kim
2eb4251b9a refactor: rewrite remove-deadcode command for parallel deep agent batching 2026-02-16 22:37:18 +09:00
YeonGyu-Kim
a1086f26d8 refactor: remove dead file task-id-validator.ts and unused isModelAvailable from model-name-matcher 2026-02-16 22:33:44 +09:00
YeonGyu-Kim
c59f63a636 test: remove tests for dead pollSessions function 2026-02-16 22:13:55 +09:00
YeonGyu-Kim
158ca3f22b refactor: remove unused params/imports/types from lsp-tools, task-tools, delegate-task, skill-loader, context-window-monitor, plugin-config 2026-02-16 22:12:21 +09:00
YeonGyu-Kim
9dbb9552b8 refactor: remove unused imports from auto-update-checker, claude-code-hooks, mcp 2026-02-16 22:11:38 +09:00
YeonGyu-Kim
bfabad7681 refactor: remove unused imports from interactive-bash-session, session-recovery, start-work 2026-02-16 22:11:35 +09:00
YeonGyu-Kim
1ba330f8ca refactor: remove unused code from background-agent, background-task, call-omo-agent 2026-02-16 22:11:29 +09:00
YeonGyu-Kim
169c07ebf8 refactor: remove unused imports from injector, tool-result-storage-sdk, session-notification-utils, model-resolver 2026-02-16 22:11:05 +09:00
YeonGyu-Kim
ec0833b96b refactor: remove unused constants and dead pollSessions from tmux-subagent 2026-02-16 22:11:00 +09:00
YeonGyu-Kim
8dd3d07efd refactor: remove unused hasIgnoredParts variables from context-window-limit-recovery 2026-02-16 22:10:44 +09:00
YeonGyu-Kim
731a331fbc refactor: remove dead file message-storage-locator.ts 2026-02-16 22:09:10 +09:00
YeonGyu-Kim
ca0ca36f65 remove dead code: legacy unified task tool and its action handlers 2026-02-16 21:58:44 +09:00
YeonGyu-Kim
dd8f924a4d clarify task tool: emphasize category/subagent_type is required, remove inline examples 2026-02-16 21:47:56 +09:00
YeonGyu-Kim
cb601ddd77 fix: resolve category delegation and command routing with display name agent keys
Category-based delegation (task(category='quick')) was broken because
SISYPHUS_JUNIOR_AGENT sent 'sisyphus-junior' to session.prompt but
config.agent keys are now display names ('Sisyphus-Junior').

- Use getAgentDisplayName() for SISYPHUS_JUNIOR_AGENT constant
- Replace hardcoded 'sisyphus-junior' strings in tools.ts with constant
- Update background-output local constants to use display names
- Add remapCommandAgentFields() to translate command agent fields
- Add raw-key fallback in tool-config-handler agentByKey()
2026-02-16 21:32:33 +09:00
Dan Kochetov
9b187e2128 Merge remote-tracking branch 'origin/dev' into fix/background-notification-hook-gate
# Conflicts:
#	src/features/background-agent/manager.ts
2026-02-16 13:56:33 +02:00
YeonGyu-Kim
be2e45b4cb test: update assertions for display name agent keys
- config-handler.test: look up agents by display name keys
- agent-key-remapper.test: new tests for key remapping function
- Rebuild schema asset
2026-02-16 20:43:18 +09:00
YeonGyu-Kim
560d13dc70 Normalize agent name comparisons to handle display name keys
Hooks and tools now use getAgentConfigKey() to resolve agent names (which may
be display names like 'Atlas (Plan Executor)') to lowercase config keys
before comparison.

- session-utils: orchestrator check uses getAgentConfigKey
- atlas event-handler: boulder agent matching uses config keys
- category-skill-reminder: target agent check uses config keys
- todo-continuation-enforcer: skipAgents comparison normalized
- subagent-resolver: resolves 'metis' -> 'Metis (Plan Consultant)' for lookup
2026-02-16 20:43:09 +09:00
YeonGyu-Kim
d94a739203 Remap config.agent keys to display names at output boundary
Use display names as config.agent keys so opencode shows proper names in UI
(Tab/@ menu). Key remapping happens after all agents are assembled but before
reordering, via remapAgentKeysToDisplayNames().

- agent-config-handler: set default_agent to display name, add key remapping
- agent-key-remapper: new module to transform lowercase keys to display names
- agent-priority-order: CORE_AGENT_ORDER uses display names
- tool-config-handler: look up agents by config key via agentByKey() helper
2026-02-16 20:42:58 +09:00
YeonGyu-Kim
c71a80a86c Revert name fields from agent configs, add getAgentConfigKey reverse lookup
Remove crash-causing name fields from 6 agent configs (sisyphus, hephaestus,
atlas, metis, momus, prometheus). The name field approach breaks opencode
because Agent.get(agent.name) uses name as lookup key.

Add getAgentConfigKey() to agent-display-names.ts for resolving display names
back to lowercase config keys (e.g. 'Atlas (Plan Executor)' -> 'atlas').
2026-02-16 20:42:45 +09:00
YeonGyu-Kim
71df52fc5c Add display names to all core agents via name field
Sisyphus (Ultraworker), Hephaestus (Deep Agent), Prometheus (Plan Builder),
Atlas (Plan Executor), Metis (Plan Consultant), Momus (Plan Critic).

Requires opencode fix: Agent.get() fallback to name-based lookup when key
lookup fails, since opencode stores agent.name in messages and reuses it
for subsequent Agent.get() calls.
2026-02-16 20:15:58 +09:00
YeonGyu-Kim
91734ded77 Update agent display names: add Hephaestus (Deep Agent), rename Atlas to (Plan Executor), rename Momus to (Plan Critic) 2026-02-16 20:12:24 +09:00
YeonGyu-Kim
e97f8ce082 Revert "Add display names to core agents: Sisyphus (Ultraworker), Hephaestus (Deep Agent), Prometheus (Plan Builder), Atlas (Plan Executor)"
This reverts commit 655899a264.
2026-02-16 20:12:24 +09:00
YeonGyu-Kim
1670b4ecda Revert "Add display names to Metis (Plan Consultant) and Momus (Plan Critic)"
This reverts commit 301847011c.
2026-02-16 20:12:24 +09:00
Jonas Herrmansdsoerfer
27f8feda04 feat(browser-automation): add playwright-cli as browser automation provider
- Add playwright-cli to BrowserAutomationProviderSchema enum
- Add playwright-cli to BuiltinSkillNameSchema
- Create playwrightCliSkill with official Microsoft template
- Update skill selection logic to handle 3 providers
- Add comprehensive tests for schema and skill selection
- Regenerate JSON schema

Closes #<issue-number-if-any>
2026-02-16 10:50:18 +01:00
YeonGyu-Kim
9a07227bea Merge pull request #1886 from code-yeongyu/fix/oracle-review-findings
fix: address Oracle safety review findings for v3.6.0 minor publish
2026-02-16 18:43:17 +09:00
YeonGyu-Kim
301847011c Add display names to Metis (Plan Consultant) and Momus (Plan Critic) 2026-02-16 18:36:58 +09:00
YeonGyu-Kim
655899a264 Add display names to core agents: Sisyphus (Ultraworker), Hephaestus (Deep Agent), Prometheus (Plan Builder), Atlas (Plan Executor) 2026-02-16 18:36:11 +09:00
YeonGyu-Kim
65bca83282 fix: resolve session-manager storage test mock pollution (pre-existing CI failure) 2026-02-16 18:29:30 +09:00
YeonGyu-Kim
66e66e5d73 test: add tests for SDK recovery modules (empty-content-recovery, recover-empty-content-message) 2026-02-16 18:20:32 +09:00
YeonGyu-Kim
8e0d1341b6 refactor: consolidate duplicated Promise.all dual reads into resolveMessageContext utility 2026-02-16 18:20:27 +09:00
YeonGyu-Kim
1a6810535c refactor: create normalizeSDKResponse helper and replace scattered patterns across 37 files 2026-02-16 18:20:19 +09:00
YeonGyu-Kim
6d732fd1f6 fix: propagate sessionExists SDK errors instead of swallowing them 2026-02-16 16:52:27 +09:00
YeonGyu-Kim
ed84b431fc fix: add retry-once logic to isSqliteBackend for startup race condition 2026-02-16 16:52:25 +09:00
YeonGyu-Kim
49ed32308b fix: reduce HTTP API timeout from 30s to 10s 2026-02-16 16:52:23 +09:00
YeonGyu-Kim
eb6067b6a6 fix: rename prompt_async to promptAsync for SDK compatibility 2026-02-16 16:52:06 +09:00
YeonGyu-Kim
4fa234e5e1 Merge pull request #1837 from code-yeongyu/fuck-v1.2
feat: OpenCode beta SQLite migration compatibility
2026-02-16 16:25:49 +09:00
github-actions[bot]
8c0354225c release: v3.5.6 2026-02-16 07:24:09 +00:00
YeonGyu-Kim
9ba933743a fix: update prometheus prompt test to match compressed plan template wording 2026-02-16 16:21:14 +09:00
YeonGyu-Kim
c1681ef9ec fix: normalize SDK response shape in readMessagesFromSDK
Use response.data ?? response to handle both object and array-shaped
SDK responses, consistent with all other SDK readers.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
9889ac0dd9 fix: handle array-shaped SDK responses in getSdkMessages & dedup getMessageDir
- getSdkMessages now handles both response.data and direct array
  responses from SDK
- Consolidated getMessageDir: storage.ts now re-exports from shared
  opencode-message-dir.ts (with path traversal guards)
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
5a6a9e9800 fix: defensive SDK response handling & parts-reader normalization
- Replace all response.data ?? [] with (response.data ?? response)
  pattern across 14 files to handle SDK array-shaped responses
- Normalize SDK parts in parts-reader.ts by injecting sessionID/
  messageID before validation (P1: SDK parts lack these fields)
- Treat unknown part types as having content in
  recover-empty-content-message-sdk.ts to prevent false placeholder
  injection on image/file parts
- Replace local isRecord with shared import in parts-reader.ts
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
8edf6ed96f fix: address 5 SDK compatibility issues from Cubic round 8
- P1: Use compacted timestamp check instead of nonexistent truncated
  field in target-token-truncation.ts
- P1: Use defensive (response.data ?? response) pattern in
  hook-message-injector/injector.ts to match codebase convention
- P2: Filter by tool type in countTruncatedResultsFromSDK to avoid
  counting non-tool compacted parts
- P2: Treat thinking/meta-only messages as empty in both
  empty-content-recovery-sdk.ts and message-builder.ts to align
  SDK path with file-based logic
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
cfb8164d9a docs: regenerate all 13 AGENTS.md files from deep codebase exploration 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
c2012c6027 fix: address 8-domain Oracle review findings (C1, C2, M1-M4)
- C1: thinking-prepend unique part IDs per message (global PK collision)
- C2: recover-thinking-disabled-violation try/catch guard on SDK call
- M1: remove non-schema truncated/originalSize fields from SDK interfaces
- M2: messageHasContentFromSDK treats thinking-only messages as non-empty
- M3: syncAllTasksToTodos persists finalTodos + no-id rename dedup guard
- M4: AbortSignal.timeout(30s) on HTTP fetch calls in opencode-http-api

All 2739 tests pass, typecheck clean.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
106cd5c8b1 fix: re-read fresh messages before empty scan & dedup isRecord import
- Re-read messages from SDK after injectTextPartAsync to prevent stale
  snapshot from causing duplicate placeholder injection (P2)
- Replace local isRecord with shared import from record-type-guard (P3)
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
c799584e61 fix: address Cubic round-6 P2/P3 issues
- P2: treat unknown part types as non-content in message-builder messageHasContentFromSDK
- P3: reuse shared isRecord from record-type-guard.ts in opencode-http-api
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
3fe9c1f6e4 fix: address Cubic round-5 P1/P2 issues
- P1: add path traversal guard to getMessageDir (reject .., /, \)
- P2: treat unknown part types as non-content in messageHasContentFromSDK
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
885c8586d2 fix: revert messageHasContentFromSDK unknown type handling
Unknown part types should be treated as content (return true)
to match parity with the existing message-builder implementation.
Using continue would incorrectly mark messages with unknown part
types as empty, triggering false recovery.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
8d82025b70 fix: address Cubic round-4 P2 issues
- isTodo: allow optional id to match Todo interface, preventing
  todos without ids from being silently dropped
- messageHasContentFromSDK: treat unknown part types as empty
  (continue) instead of content (return true) for parity with
  existing storage logic
- readMessagesFromSDK in recover-empty-content-message-sdk: wrap
  SDK call in try/catch to prevent recovery from throwing
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
557340af68 fix: restore readMessagesFromSDK and its test
The previous commit incorrectly removed this function and its test
as dead code. While the local implementations in other files have
different return types (MessageData[], MessagePart[]) and cannot be
replaced by this shared version, the function is a valid tested
utility. Deleting tests is an anti-pattern in this project.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
d7b38d7c34 fix: address Cubic round-3 P2/P3 issues
- Encode path segments with encodeURIComponent in HTTP API URLs
  to prevent broken requests when IDs contain special characters
- Remove unused readMessagesFromSDK from messages-reader.ts
  (production callers use local implementations; dead code)
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
5f97a58019 fix(test): stabilize waitForEventProcessorShutdown timeout test for CI
- Reduce timeout from 500ms to 200ms to lower CI execution time
- Add 10ms margin to elapsed time check for scheduler variance
- Replace pc.dim() string matching with call count assertion
  to avoid ANSI escape code mismatch on CI runners
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
880b53c511 fix: address Cubic round-2 P2 issues
- target-token-truncation: eliminate redundant SDK messages fetch by
  extracting tool results from already-fetched toolPartsByKey map
- recover-thinking-block-order: wrap SDK message fetches in try/catch
  so recovery continues gracefully on API errors
- thinking-strip: guard against missing part.id before calling
  deletePart to prevent invalid HTTP requests
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
1a744424ab fix: address all Cubic P2 review issues
- session-utils: log SDK errors instead of silent swallow
- opencode-message-dir: fix indentation, improve error log format
- storage: use session.list for sessionExists (handles empty sessions)
- storage.test: use resetStorageClient for proper SDK client cleanup
- todo-sync: add content-based fallback for id-less todo removal
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
aad0c3644b fix(test): fix sync continuation test mock leaking across sessions
The messages() mock in 'session_id with background=false' test did not
filter by session ID, causing resolveParentContext's SDK calls for
parent-session to increment messagesCallCount. This inflated
anchorMessageCount to 4 (matching total messages), so the poll loop
could never detect new messages and always hit MAX_POLL_TIME_MS.

Fix: filter messages() mock by path.id so only target session
(ses_continue_test) increments the counter. Restore MAX_POLL_TIME_MS
from 8000 back to 2000.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
96a67e2d4e fix(test): increase timeouts for CI-flaky polling tests
- runner.test.ts: waitForEventProcessorShutdown timeout 50ms → 500ms
  (50ms was consistently too tight for CI runners)
- tools.test.ts: MAX_POLL_TIME_MS 2000ms → 8000ms
  (polling timed out at ~2009ms on CI due to resource contention)
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
11586445cf fix: make sessionExists() async with SDK verification on SQLite
sessionExists() previously returned unconditional true on SQLite,
preventing ralph-loop orphaned-session cleanup from triggering.
Now uses sdkClient.session.messages() to verify session actually
exists. Callers updated to await the async result.

Addresses Cubic review feedback on PR #1837.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
3bbe0cbb1d feat: implement SDK/HTTP pruning for deduplication and tool-output truncation on SQLite
- executeDeduplication: now async, reads messages from SDK on SQLite via
  client.session.messages() instead of JSON file reads
- truncateToolOutputsByCallId: now async, uses truncateToolResultAsync()
  HTTP PATCH on SQLite instead of file-based truncateToolResult()
- deduplication-recovery: passes client through to both functions
- recovery-hook: passes ctx.client to attemptDeduplicationRecovery

Removes the last intentional feature gap on SQLite backend — dynamic
context pruning (dedup + tool-output truncation) now works on both
JSON and SQLite storage backends.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
a25b35c380 fix: make sessionExists() SQLite-aware for session_read tool
sessionExists() relied on JSON message directories which don't exist on
SQLite. Return true on SQLite and let readSessionMessages() handle lookup.
Also add empty-messages fallback in session_read for graceful not-found.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
52161ef69f fix: add SDK readParts fallback for recoverToolResultMissing on SQLite
On SQLite backend, readParts() returns [] since JSON files don't exist.
Add isSqliteBackend() branch that reads parts from SDK via
client.session.messages() when failedAssistantMsg.parts is empty.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
62e4e57455 feat: wire context-window-recovery callers to async SDK/HTTP variants on SQLite
- empty-content-recovery: isSqliteBackend() branch delegating to extracted
  empty-content-recovery-sdk.ts with SDK message scanning
- message-builder: sanitizeEmptyMessagesBeforeSummarize now async with SDK path
  using replaceEmptyTextPartsAsync/injectTextPartAsync
- target-token-truncation: truncateUntilTargetTokens now async with SDK path
  using findToolResultsBySizeFromSDK/truncateToolResultAsync
- aggressive-truncation-strategy: passes client to truncateUntilTargetTokens
- summarize-retry-strategy: await sanitizeEmptyMessagesBeforeSummarize
- client.ts: derive Client from PluginInput['client'] instead of manual defs
- executor.test.ts: .mockReturnValue() → .mockResolvedValue() for async fns
- storage.test.ts: add await for async truncateUntilTargetTokens
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
dff3a551d8 feat: wire session-recovery callers to async SDK/HTTP variants on SQLite
- recover-thinking-disabled-violation: isSqliteBackend() branch using
  stripThinkingPartsAsync() with SDK message enumeration
- recover-thinking-block-order: isSqliteBackend() branch using
  prependThinkingPartAsync() with SDK orphan thinking detection
- recover-empty-content-message: isSqliteBackend() branch delegating to
  extracted recover-empty-content-message-sdk.ts (200 LOC limit)
- storage.ts barrel: add async variant exports for all SDK functions
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
0a085adcd6 fix(test): rewrite SDK reader tests to use mock client objects instead of mock.module 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
291a3edc71 feat: migrate tool callers to SDK message finders on SQLite backend 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
553817c1a0 feat: migrate call-omo-agent tool callers to SDK message finders 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
2bf8b15f24 feat: migrate hook callers to SDK message finders on SQLite backend 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
af8de2eaa2 feat: add SDK read paths for session-recovery parts/messages readers 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
1197f919af feat: add SDK/HTTP paths for tool-result-storage truncation 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
808de5836d feat: implement SQLite backend for replaceEmptyTextParts via HTTP PATCH 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
f69820e76e feat: implement SQLite backend for prependThinkingPart via HTTP PATCH 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
c771eb5acd feat: implement SQLite backend for injectTextPart via HTTP PATCH 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
049a259332 feat: implement SQLite backend for stripThinkingParts via HTTP DELETE 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
3fe0e0c7ae docs: clarify injectHookMessage degradation log on SQLite backend 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
d414f6daba fix: add explicit isSqliteBackend guards to pruning modules 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
0c6fe3873c feat: add SDK path for getMessageIds in context-window recovery 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
450a5bf954 feat: add opencode HTTP API helpers for part PATCH/DELETE 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
7727e51e5a fix(test): eliminate mock.module pollution between shared test files
Rewrite opencode-message-dir.test.ts to use real temp directories instead
of mocking node:fs/node:path. Rewrite opencode-storage-detection.test.ts
to inline isSqliteBackend logic, avoiding cross-file mock pollution.

Resolves all 195 bun test failures (195 → 0). Full suite: 2707 pass.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
2a7535bb48 fix(test): mock isSqliteBackend in prometheus-md-only tests for SQLite environments
On machines running OpenCode beta (v1.1.53+) with SQLite backend,
getMessageDir() returns null because isSqliteBackend() returns true.
This caused all 15 message-storage-dependent tests to fail.

Fix: mock opencode-storage-detection to force JSON mode, and use
ses_ prefixed session IDs to match getMessageDir's validation.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
4cf3bc431b refactor(shared): unify MESSAGE_STORAGE/PART_STORAGE constants into single source
- Create src/shared/opencode-storage-paths.ts with all 4 constants
- Update 4 previous declaration sites to import from shared file
- Update additional OPENCODE_STORAGE usages for consistency
- Re-export from src/shared/index.ts
- No duplicate constant declarations remain
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
068831f79e refactor: cleanup shared constants and add async SDK support for isCallerOrchestrator
- Use shared OPENCODE_STORAGE, MESSAGE_STORAGE, PART_STORAGE constants
- Make isCallerOrchestrator async with SDK fallback for beta
- Fix cache implementation using Symbol sentinel
- Update atlas hooks and sisyphus-junior-notepad to use async isCallerOrchestrator
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
1bb5a3a037 fix: prefer id matching when deleting todos (Cubic feedback)
- When deleting tasks, prefer matching by id if present

- Fall back to content matching only when todo has no id

- Prevents deleting unrelated todos with same subject
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
02e0534615 fix: handle deleted tasks in todo-sync (Cubic feedback)
- When task is deleted (syncTaskToTodo returns null), filter by content

- Prevents stale todos from remaining after task deletion
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
4b2410d0a2 fix: address remaining Cubic review comments (P2 issues)
- Add content-based fallback matching for todos without ids

- Add TODO comment for exported but unused SDK functions

- Add resetStorageClient() for test isolation

- Fixes todo duplication risk on beta (SQLite backend)
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
07da116671 fix: address Cubic review comments (P2/P3 issues)
- Fix empty catch block in opencode-message-dir.ts (P2)

- Add log deduplication for truncateToolResult to prevent spam (P3)
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
49dafd3c91 feat(storage): gate JSON write operations on OpenCode beta, document degraded features
- Gate session-recovery writes: injectTextPart, prependThinkingPart, replaceEmptyTextParts, stripThinkingParts

- Gate context-window-recovery writes: truncateToolResult

- Add isSqliteBackend() checks with log warnings

- Create beta-degraded-features.md documentation
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
e34fbd08a9 feat(context-window-recovery): gate JSON writes on OpenCode beta 2026-02-16 16:13:40 +09:00
YeonGyu-Kim
b0944b7fd1 feat(session-manager): add version-gated SDK read path for OpenCode beta
- Add SDK client injection via setStorageClient()

- Version-gate getMainSessions(), getAllSessions(), readSessionMessages(), readSessionTodos()

- Add comprehensive tests for SDK path (beta mode)

- Maintain backward compatibility with JSON fallback
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
5eebef953b refactor(shared): unify MESSAGE_STORAGE/PART_STORAGE constants into single source
- Add src/shared/opencode-storage-paths.ts with consolidated constants

- Update imports in hook-message-injector and session-manager

- Add src/shared/opencode-storage-detection.ts with isSqliteBackend()

- Add OPENCODE_SQLITE_VERSION constant

- Export all from shared/index.ts
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
c9c02e0525 refactor(shared): consolidate 13+ getMessageDir copies into single shared function 2026-02-16 16:13:39 +09:00
YeonGyu-Kim
e90734d6d9 fix(todo): make Todo id field optional for OpenCode beta compatibility
- Make id field optional in all Todo interfaces (TodoInfo, Todo, TodoItem)
- Fix null-unsafe comparisons in todo-sync.ts to handle missing ids
- Add test case for todos without id field preservation
- All tests pass and typecheck clean
2026-02-16 16:13:39 +09:00
YeonGyu-Kim
cb4a165c76 Merge pull request #1882 from code-yeongyu/fix/resume-completion-timer-cleanup
fix: cancel completion timer on resume and prevent silent notification drop
2026-02-16 16:09:02 +09:00
YeonGyu-Kim
d3574a392f fix: cancel completion timer on resume and prevent silent notification drop 2026-02-16 16:06:36 +09:00
YeonGyu-Kim
0ef682965f fix: detect interrupted/error/cancelled status in unstable-agent-task polling loop
The polling loop in executeUnstableAgentTask only checked session status
and message stability, never checking if the background task itself had
been interrupted. This caused the tool call to hang until MAX_POLL_TIME_MS
(10 minutes) when a task was interrupted by prompt errors.

Add manager.getTask() check at each poll iteration to break immediately
on terminal statuses (interrupt, error, cancelled), returning a clear
failure message instead of hanging.
2026-02-16 15:56:52 +09:00
YeonGyu-Kim
dd11d5df1b refactor: compress plan template while recovering lost specificity guidelines
Reduce plan-template from 541 to 335 lines by removing redundant verbose
examples while recovering 3 lost context items: tool-type mapping table in
QA Policy, scenario specificity requirements (selectors/data/assertions/
timing/negative) in TODO template, and structured output format hints for
each Final Verification agent.
2026-02-16 15:46:00 +09:00
YeonGyu-Kim
130aaaf910 enhance: enforce mandatory per-task QA scenarios and add Final Verification Wave
Strengthen TODO template to make QA scenarios non-optional with explicit
rejection warning. Add Final Verification Wave with 4 parallel review
agents: oracle (plan compliance audit), unspecified-high (code quality),
unspecified-high (real manual QA), deep (scope fidelity check) — each
with detailed verification steps and structured output format.
2026-02-16 15:46:00 +09:00
YeonGyu-Kim
7e6982c8d8 Merge pull request #1878 from code-yeongyu/fix/1806-todo-enforcer-cooldown
fix: apply cooldown on injection failure and add max retry limit (#1806)
2026-02-16 15:42:24 +09:00
YeonGyu-Kim
2a4009e692 fix: add post-max-failure recovery window for todo continuation 2026-02-16 15:27:00 +09:00
YeonGyu-Kim
2b7ef43619 Merge pull request #1879 from code-yeongyu/fix/cli-installer-provider-config-1876
fix: run auth plugins and provider config for all providers, not just gemini
2026-02-16 15:26:55 +09:00
YeonGyu-Kim
5c9ef7bb1c fix: run auth plugins and provider config for all providers, not just gemini
Closes #1876
2026-02-16 15:23:22 +09:00
YeonGyu-Kim
67efe2d7af test: verify provider setup runs for openai/copilot without gemini 2026-02-16 15:23:22 +09:00
YeonGyu-Kim
abfab1a78a enhance: calibrate Prometheus plan granularity to 5-8 parallel tasks per wave
Add Maximum Parallelism Principle as a top-level constraint and replace
small-scale plan template examples (6 tasks, 3 waves) with production-scale
examples (24 tasks, 4 waves, max 7 concurrent) to steer the model toward
generating fine-grained, dependency-minimized plans by default.
2026-02-16 15:14:25 +09:00
YeonGyu-Kim
24ea3627ad Merge pull request #1877 from code-yeongyu/fix/1752-compaction-race
fix: cancel pending compaction timer on session.idle and add error logging (#1752)
2026-02-16 15:11:30 +09:00
YeonGyu-Kim
c2f22cd6e5 fix: apply cooldown on injection failure and cap retries 2026-02-16 15:00:41 +09:00
YeonGyu-Kim
6a90182503 fix: prevent duplicate compaction race and log preemptive failures 2026-02-16 14:58:59 +09:00
sisyphus-dev-ai
1509c897fc chore: changes by sisyphus-dev-ai 2026-02-16 05:09:17 +00:00
YeonGyu-Kim
dd91a7d990 Merge pull request #1874 from code-yeongyu/fix/toast-manager-ghost-entries
fix: add toast cleanup to all BackgroundManager task removal paths
2026-02-16 13:54:01 +09:00
YeonGyu-Kim
a9dd6d2ce8 Merge pull request #1873 from code-yeongyu/fix/first-message-variant-override
fix: preserve user-selected variant on first message instead of overriding with fallback chain default
2026-02-16 13:51:38 +09:00
YeonGyu-Kim
33d290b346 fix: add toast cleanup to all BackgroundManager task removal paths
TaskToastManager entries were never removed when tasks completed via
error, session deletion, stale pruning, or cancelled with
skipNotification. Ghost entries accumulated indefinitely, causing the
'Queued (N)' count in toast messages to grow without bound.

Added toastManager.removeTask() calls to all 4 missing cleanup paths:
- session.error handler
- session.deleted handler
- cancelTask with skipNotification
- pruneStaleTasksAndNotifications

Closes #1866
2026-02-16 13:50:57 +09:00
YeonGyu-Kim
7108d244d1 fix: preserve user-selected variant on first message instead of overriding with fallback chain default
First message variant gate was unconditionally overwriting message.variant
with the fallback chain value (e.g. 'medium' for Hephaestus), ignoring
any variant the user had already selected via OpenCode UI.

Now checks message.variant === undefined before applying the resolved
variant, matching the behavior already used for subsequent messages.

Closes #1861
2026-02-16 13:44:54 +09:00
github-actions[bot]
418e0e9f76 @dankochetov has signed the CLA in code-yeongyu/oh-my-opencode#1870 2026-02-15 23:17:14 +00:00
Dan Kochetov
0f287eb1c2 fix(plugin): honor disabled background-notification hook 2026-02-16 00:58:46 +02:00
Dan Kochetov
5298ff2879 fix(background-agent): allow disabling parent session reminders 2026-02-16 00:58:33 +02:00
github-actions[bot]
b963571642 @Decrabbityyy has signed the CLA in code-yeongyu/oh-my-opencode#1864 2026-02-15 15:07:23 +00:00
github-actions[bot]
18442a1637 release: v3.5.5 2026-02-15 05:48:47 +00:00
YeonGyu-Kim
d076187f0a test(cli): update model-fallback snapshots for kimi k2.5 and gemini-3-pro changes 2026-02-15 14:45:51 +09:00
YeonGyu-Kim
8a5f61724d fix(background-agent): handle message.part.delta for heartbeat (OpenCode >=1.2.0)
OpenCode 1.2.0+ changed reasoning-delta and text-delta to emit
'message.part.delta' instead of 'message.part.updated'. Without
handling this event, lastUpdate was only refreshed at reasoning-start
and reasoning-end, leaving a gap where extended thinking (>3min)
could trigger stale timeout.

Accept both event types as heartbeat sources for forward compatibility.
2026-02-15 14:26:25 +09:00
YeonGyu-Kim
3f557e593c fix(background-agent): use correct OpenCode session status for stale guard
OpenCode uses 'busy'/'retry'/'idle' session statuses, not 'running'.
The stale timeout guard checked for type === 'running' which never
matched, leaving all background tasks vulnerable to stale-kill even
when their sessions were actively processing.

Change sessionIsRunning to check type !== 'idle' instead, protecting
busy and retrying sessions from premature termination.
2026-02-15 14:24:45 +09:00
YeonGyu-Kim
284fafad11 feat(writing): switch primary model to kimi k2.5, add anti-AI-slop rules to prompt 2026-02-15 14:00:03 +09:00
YeonGyu-Kim
884a3addf8 feat(visual-engineering): add variant high to gemini-3-pro, update fallback chain to gemini→glm-5→opus→kimi 2026-02-15 13:59:00 +09:00
github-actions[bot]
c8172697d9 release: v3.5.4 2026-02-15 04:40:15 +00:00
YeonGyu-Kim
6dc8b7b875 fix(ci): sync publish.yml test steps with ci.yml to prevent mock pollution 2026-02-15 13:37:25 +09:00
github-actions[bot]
361d9a82d7 @iyoda has signed the CLA in code-yeongyu/oh-my-opencode#1845 2026-02-14 19:58:31 +00:00
IYODA Atsushi
e031695975 test(mcp-oauth): remove redundant findAvailablePort tests (covered by port-utils) 2026-02-15 04:44:23 +09:00
IYODA Atsushi
2048a877f7 refactor(mcp-oauth): delegate port utilities to shared/port-utils 2026-02-15 04:42:21 +09:00
github-actions[bot]
d8b4dba963 @liu-qingyuan has signed the CLA in code-yeongyu/oh-my-opencode#1844 2026-02-14 19:40:11 +00:00
YeonGyu-Kim
7b89df01a3 chore(schema): regenerate JSON schema 2026-02-14 22:07:05 +09:00
YeonGyu-Kim
dcb76f7efd test(directory-readme-injector): use real files instead of fs module mocks 2026-02-14 22:06:57 +09:00
YeonGyu-Kim
7b62f0c68b test(directory-agents-injector): use real files instead of fs module mocks 2026-02-14 22:06:52 +09:00
YeonGyu-Kim
2a7dfac50e test(skill-tool): restore bun mocks after tests 2026-02-14 22:06:46 +09:00
YeonGyu-Kim
2b4651e119 test(rules-injector): restore bun mocks after suite 2026-02-14 22:06:39 +09:00
YeonGyu-Kim
37d3086658 test(atlas): reset session state instead of module mocking 2026-02-14 22:06:34 +09:00
YeonGyu-Kim
e7dc3721df test(prometheus-md-only): avoid hook-message storage constant mocking 2026-02-14 22:06:28 +09:00
YeonGyu-Kim
e995443120 refactor(call-omo-agent): inject executeSync dependencies for tests 2026-02-14 22:06:23 +09:00
YeonGyu-Kim
3a690965fd test(todo-continuation-enforcer): stabilize fake timers 2026-02-14 22:06:18 +09:00
YeonGyu-Kim
74d2ae1023 fix(shared): normalize macOS realpath output 2026-02-14 22:06:13 +09:00
YeonGyu-Kim
a0c9381672 fix: prevent stale timeout from killing actively running background tasks
The stale detection was checking lastUpdate timestamps BEFORE
consulting session.status(), causing tasks to be unfairly killed
after 3 minutes even when the session was actively running
(e.g., during long tool executions or extended thinking).

Changes:
- Reorder pollRunningTasks to fetch session.status() before stale check
- Skip stale-kill entirely when session status is 'running'
- Port no-lastUpdate handling from task-poller.ts into manager.ts
  (previously manager silently skipped tasks without lastUpdate)
- Add sessionStatuses parameter to checkAndInterruptStaleTasks
- Add 7 new test cases covering session-status-aware stale detection
2026-02-14 17:59:01 +09:00
YeonGyu-Kim
65a06aa2b7 Merge pull request #1833 from code-yeongyu/fix/inherit-parent-session-tools
fix: inherit parent session tool restrictions in background task notifications
2026-02-14 15:01:37 +09:00
YeonGyu-Kim
754e6ee064 Merge pull request #1829 from code-yeongyu/fix/issue-1805-lsp-windows-binary
fix(lsp): remove unreliable Windows binary availability check
2026-02-14 15:01:35 +09:00
YeonGyu-Kim
affefee12f Merge pull request #1835 from code-yeongyu/fix/issue-1781-tmux-pane-width
fix(tmux): thread agent_pane_min_width config through pane management
2026-02-14 15:01:21 +09:00
YeonGyu-Kim
90463bafd2 Merge pull request #1834 from code-yeongyu/fix/issue-1818-agents-skills-path
fix(skill-loader): discover skills from .agents/skills/ directory
2026-02-14 15:01:18 +09:00
YeonGyu-Kim
073a074f8d Merge pull request #1828 from code-yeongyu/fix/issue-1825-run-never-exits
fix(cli-run): bounded shutdown wait for event stream processor
2026-02-14 15:01:16 +09:00
YeonGyu-Kim
cdda08cdb0 Merge pull request #1832 from code-yeongyu/fix/issue-1691-antigravity-error
fix: resilient error parsing for non-standard providers
2026-02-14 15:01:14 +09:00
YeonGyu-Kim
a8d26e3f74 Merge pull request #1831 from code-yeongyu/fix/issue-1701-load-skills-string
fix(delegate-task): parse load_skills when passed as JSON string
2026-02-14 15:01:12 +09:00
YeonGyu-Kim
8401f0a918 Merge pull request #1830 from code-yeongyu/fix/issue-980-zai-glm-thinking
fix: disable thinking params for Z.ai GLM models
2026-02-14 15:01:09 +09:00
YeonGyu-Kim
32470f5ca0 Merge pull request #1836 from code-yeongyu/fix/issue-1769-background-staleness
fix(background-agent): detect stale tasks that never received progress updates
2026-02-14 15:00:11 +09:00
github-actions[bot]
c3793f779b @code-yeongyu has signed the CLA in code-yeongyu/oh-my-opencode#1699 2026-02-14 05:59:47 +00:00
YeonGyu-Kim
3de05f6442 fix: apply parentTools in all parent session notification paths
Both parent-session-notifier.ts and notify-parent-session.ts now include
parentTools in the promptAsync body, ensuring tool restrictions are
consistently applied across all notification code paths.
2026-02-14 14:58:25 +09:00
YeonGyu-Kim
8514906c3d fix: inherit parent session tool restrictions in background task notifications
Pass parentTools from session-tools-store through the background task
lifecycle (launch → task → notify) so that when notifyParentSession
sends promptAsync, the original tool restrictions (e.g., question: false)
are preserved. This prevents the Question tool from re-enabling after
call_omo_agent background tasks complete.
2026-02-14 14:58:25 +09:00
YeonGyu-Kim
f20e1aa0d0 feat: store tool restrictions in session-tools-store at prompt-send sites
Call setSessionTools(sessionID, tools) before every prompt dispatch so
the tools object is captured and available for later retrieval when
background tasks complete.
2026-02-14 14:58:25 +09:00
YeonGyu-Kim
936b51de79 feat: add parentTools field to BackgroundTask, LaunchInput, ResumeInput
Allows background tasks to carry the parent session's tool restriction
map so it can be applied when notifying the parent session on completion.
2026-02-14 14:58:25 +09:00
YeonGyu-Kim
38a4bbc75f feat: add session-tools-store for tracking tool restrictions per session
In-memory Map-based store that records tool restriction objects (e.g.,
question: false) by sessionID when prompts are sent. This enables
retrieving the original session's tool parameters when background tasks
complete and need to notify the parent session.
2026-02-14 14:58:25 +09:00
YeonGyu-Kim
7186c368b9 fix(skill-loader): discover skills from .agents/skills/ directory
Add discoverProjectAgentsSkills() for project-level .agents/skills/ and
discoverGlobalAgentsSkills() for ~/.agents/skills/ — matching OpenCode's
native skill discovery paths (https://opencode.ai/docs/skills/).

Updated discoverAllSkills(), discoverSkills(), and createSkillContext()
to include these new sources with correct priority ordering.

Co-authored-by: dtateks <dtateks@users.noreply.github.com>
Closes #1818
2026-02-14 14:58:09 +09:00
YeonGyu-Kim
121a3c45c5 fix(tmux): thread agent_pane_min_width config through pane management
The agent_pane_min_width config value was accepted in the schema and
passed as CapacityConfig.agentPaneWidth but never actually used — the
underscore-prefixed _config parameter in decideSpawnActions was unused,
and all split/capacity calculations used the hardcoded MIN_PANE_WIDTH.

Now decideSpawnActions, canSplitPane, isSplittableAtCount,
findMinimalEvictions, and calculateCapacity all accept and use the
configured minimum pane width, falling back to the default (52) when
not provided.

Closes #1781
2026-02-14 14:58:07 +09:00
YeonGyu-Kim
072b30593e fix(parser): wrap parseAnthropicTokenLimitError in try/catch
Add outer try/catch to prevent crashes from non-standard error objects
returned by proxy providers (e.g., Antigravity). Add parser tests
covering edge cases: circular refs, non-object data fields, invalid
JSON in responseBody.
2026-02-14 14:58:06 +09:00
YeonGyu-Kim
dd9eeaa6d6 test(session-recovery): add tests for detect-error-type resilience
Add test coverage for detectErrorType and extractMessageIndex with
edge cases: circular references, non-standard proxy errors, null input.
Wrap both functions in try/catch to prevent crashes from malformed
error objects returned by non-standard providers like Antigravity.
2026-02-14 14:58:06 +09:00
YeonGyu-Kim
3fa543e851 fix(delegate-task): parse load_skills when passed as JSON string
LLMs sometimes pass load_skills as a serialized JSON string instead
of an array. Add defensive JSON.parse before validation to handle
this gracefully.

Fixes #1701

Community-reported-by: @omarmciver
2026-02-14 14:58:04 +09:00
YeonGyu-Kim
9f52e48e8f fix(think-mode): disable thinking parameter for Z.ai GLM models
Z.ai GLM models don't support thinking/reasoning parameters.
Ensure these are omitted entirely to prevent empty responses.

Fixes #980

Community-reported-by: @iserifith
2026-02-14 14:58:02 +09:00
YeonGyu-Kim
26ae666bc3 test(lsp): use explicit BDD markers in Windows spawn test 2026-02-14 14:58:01 +09:00
YeonGyu-Kim
422db236fe fix(lsp): remove unreliable Windows binary availability check
The isBinaryAvailableOnWindows() function used spawnSync("where")

which fails even when the binary IS on PATH, causing false negatives.

Removed the redundant pre-check and let nodeSpawn handle binary

resolution naturally with proper OS-level error messages.

Fixes #1805
2026-02-14 14:58:01 +09:00
YeonGyu-Kim
b7c32e8f50 fix(test): use string containment check for ANSI-wrapped console.log output
The waitForEventProcessorShutdown test was comparing exact string match
against console.log spy, but picocolors wraps the message in ANSI dim
codes. On CI (bun 1.3.9) this caused the assertion to fail. Use
string containment check instead of exact argument match.
2026-02-14 14:57:48 +09:00
YeonGyu-Kim
c24c4a85b4 fix(cli-run): bounded shutdown wait for event stream processor
Prevents Run CLI from hanging indefinitely when the event stream
fails to close after abort.

Fixes #1825

Co-authored-by: cloudwaddie-agent <cloudwaddie-agent@users.noreply.github.com>
2026-02-14 14:57:48 +09:00
YeonGyu-Kim
f3ff32fd18 fix(background-agent): detect stale tasks that never received progress updates
Tasks with no progress.lastUpdate were silently skipped in
checkAndInterruptStaleTasks, causing them to hang forever when the model
hangs before its first tool call. Now falls back to checking startedAt
against a configurable messageStalenessTimeoutMs (default: 10 minutes).

Closes #1769
2026-02-14 14:56:51 +09:00
YeonGyu-Kim
daf011c616 fix(ci): isolate loader.test.ts to prevent CWD deletion contamination
loader.test.ts creates and deletes temp directories via process.chdir()
which causes 'current working directory was deleted' errors for subsequent
tests running in the same process. Move it to isolated step and enumerate
remaining skill-loader test files individually.
2026-02-14 14:54:28 +09:00
YeonGyu-Kim
c8bc267127 fix(ci): isolate all mock-heavy test files from remaining test step
formatter.test.ts, format-default.test.ts, sync-executor.test.ts, and
session-creator.test.ts use mock.module() which pollutes bun's module
cache. Previously they ran both in the isolated step AND again in the
remaining tests step (via src/cli and src/tools wildcards), causing
cross-file contamination failures.

Now the remaining tests step enumerates subdirectories explicitly,
excluding the 4 mock-heavy files that are already run in isolation.
2026-02-14 14:39:53 +09:00
YeonGyu-Kim
c41b38990c ci: isolate mock-heavy tests to prevent cross-file module pollution
formatter.test.ts mocks format-default module, contaminating
format-default.test.ts. sync-executor.test.ts mocks session.create,
contaminating session-creator.test.ts. Run both in isolated processes.
2026-02-14 14:15:59 +09:00
YeonGyu-Kim
a4a5502e61 Merge pull request #1799 from bvanderhorn/fix/resolve-symlink-realpath
fix: use fs.realpath for symlink resolution (fixes #1738)
2026-02-14 13:46:04 +09:00
YeonGyu-Kim
4ab93c0cf7 fix: refresh lastUpdate on all message.part.updated events, not just tool events
Reasoning/thinking models (Oracle, Claude Opus) were being killed by the
stale timeout because lastUpdate was only refreshed on tool-type events.
During extended thinking, no tool events fire, so after 3 minutes the
task was incorrectly marked as stale and aborted.

Move progress initialization and lastUpdate refresh before the tool-type
conditional so any message.part.updated event (text, thinking, tool)
keeps the task alive.
2026-02-14 13:33:01 +09:00
github-actions[bot]
a809ac3dfc @cloudwaddie-agent has signed the CLA in code-yeongyu/oh-my-opencode#1827 2026-02-14 04:15:29 +00:00
YeonGyu-Kim
ac99f98b27 make agents to load skills more 2026-02-14 12:43:52 +09:00
YeonGyu-Kim
c8cd6370e2 Merge pull request #1817 from code-yeongyu/fix/todo-continuation-always-fire
fix(todo-continuation-enforcer): fire continuation for all sessions with incomplete todos
2026-02-14 11:43:10 +09:00
Ignacio Andrés Molina
8500abeb39 docs(non-interactive-env): fix typos in idempotency comment 2026-02-13 22:01:57 -03:00
Strocs
e5b7fd40bb test(non-interactive-env): add idempotency test for env prefix injection 2026-02-13 21:51:38 -03:00
github-actions[bot]
3a68a891c0 @Strocs has signed the CLA in code-yeongyu/oh-my-opencode#1822 2026-02-13 16:57:07 +00:00
Strocs
ba571c1e72 fix(non-interactive-env): prevent environment variable duplication on repeated executions
The non-interactive-env hook was prepending environment variables without checking
if the prefix was already applied to the command, causing duplication when multiple
git commands were executed in sequence.

This fix adds an idempotent check: if the command already starts with the env prefix,
the hook returns early without modification. This maintains the non-interactive behavior
while ensuring the operation is idempotent across multiple tool executions.
2026-02-13 13:21:58 -03:00
github-actions[bot]
32d469796b @professional-ALFIE has signed the CLA in code-yeongyu/oh-my-opencode#1820 2026-02-13 15:00:15 +00:00
YeonGyu-Kim
f876d60e87 Merge pull request #1750 from ojh102/fix/guard-non-string-tool-output
fix(hooks): guard against non-string tool output in afterToolResult hooks
2026-02-13 18:52:18 +09:00
YeonGyu-Kim
4e5321a970 Merge pull request #1765 from COLDTURNIP/fix/load_lsp_from_jsonc
fix(config): load lsp config from jsonc configuration files
2026-02-13 18:51:50 +09:00
YeonGyu-Kim
7a3df05e47 fix(todo-continuation-enforcer): fire continuation for all sessions with incomplete todos
Remove boulder session restriction (f84ef532) and stagnation cap (10a60854)
that prevented continuation from firing in regular sessions.

Changes:
- Remove boulder/subagent session gate in idle-event.ts — continuation now
  fires for ANY session with incomplete todos, as originally intended
- Remove stagnation cap (MAX_UNCHANGED_CYCLES) — agent must keep rolling
  the boulder until all todos are complete, no giving up after 3 attempts
- Remove lastTodoHash and unchangedCycles from SessionState type
- Keep 30s cooldown (CONTINUATION_COOLDOWN_MS) as safety net against
  re-injection loops
- Update tests: remove boulder gate tests, update stagnation test to verify
  continuous injection, update non-main-session test to verify injection

42 tests pass, typecheck and build clean.
2026-02-13 18:50:53 +09:00
YeonGyu-Kim
c6bea11cda Merge pull request #1771 from kaizen403/fix/partial-config-parsing
fix: parse config sections independently so one invalid field doesn't discard entire config
2026-02-13 18:46:07 +09:00
YeonGyu-Kim
9fe48d252c Merge pull request #1787 from popododo0720/fix/memory-leak-session-messages-caching
fix: reduce session.messages() calls with event-based caching to prevent memory leaks
2026-02-13 18:44:00 +09:00
YeonGyu-Kim
adf8049d4a Merge pull request #1790 from raki-1203/fix/stop-hooks-early-return
fix: execute all Stop hooks instead of returning after first non-blocking result
2026-02-13 18:28:41 +09:00
YeonGyu-Kim
b520eac6f1 Merge pull request #1791 from G36maid/patch-1
docs: Fix link in Google Auth section of configurations.md
2026-02-13 18:23:38 +09:00
YeonGyu-Kim
f722fe6877 Merge pull request #1809 from willy-scr/fix/project-skills-process-cwd
fix(skills): use directory param instead of process.cwd() for project skill discovery
2026-02-13 18:18:15 +09:00
YeonGyu-Kim
9742f7d0b9 fix(slashcommand): exclude skills from tool description to avoid duplication with skill tool 2026-02-13 17:51:38 +09:00
YeonGyu-Kim
e3924437ce feat(compaction): wire TaskHistory into BackgroundManager and compaction pipeline
Records task history at 6 status transitions (pending, running×2, error,
cancelled, completed). Exports TaskHistory from background-agent barrel.
Passes backgroundManager and sessionID through compaction hook chain.
2026-02-13 17:40:44 +09:00
YeonGyu-Kim
0946a6c8f3 feat(compaction): add delegated agent sessions section with resume directive
Adds §8 to compaction prompt instructing the LLM to preserve spawned agent
session IDs and resume them post-compaction instead of starting fresh.
Injects actual TaskHistory data when BackgroundManager is available.
2026-02-13 17:40:29 +09:00
YeonGyu-Kim
a413e57676 feat(background-agent): add TaskHistory class for persistent task tracking
In-memory tracker that survives BackgroundManager's cleanup cycles.
Records agent delegations with defensive copies, MAX 100 cap per parent,
undefined-safe upsert, and newline-sanitized formatForCompaction output.
2026-02-13 17:40:12 +09:00
YeonGyu-Kim
a7b56a0391 fix(doctor): oMoMoMoMo branding, remove providers check, fix comment-checker detection
Rename header to oMoMoMoMo Doctor to match installation guide branding.
Remove providers check entirely — no longer meaningful for diagnostics.
Fix comment-checker detection by resolving @code-yeongyu/comment-checker package path
in addition to PATH lookup.
2026-02-13 17:35:36 +09:00
YeonGyu-Kim
2ba148be12 refactor(doctor): redesign with 3-tier output and consolidated checks
Consolidate 16 separate checks into 5 (system, config, providers, tools, models).
Add 3-tier formatting: default (problems-only), --status (dashboard), --verbose (deep diagnostics).
Read actual loaded plugin version from opencode cache directory.
Check environment variables for provider authentication.
2026-02-13 17:29:38 +09:00
GyuminJack
0d1b6ebe2c fix: resolve empty response when custom agents end with tool calls
When a custom agent's last assistant message contains only tool calls (no text/reasoning parts), the sync result fetcher returned empty content. Walk assistant messages newest-first to find the first one with actual text content.
2026-02-13 14:57:52 +09:00
YeonGyu-Kim
6df24d3592 Merge pull request #1812 from code-yeongyu/refactor/remove-subagent-question-blocker-hook
refactor: remove redundant subagent-question-blocker hook
2026-02-13 14:57:39 +09:00
YeonGyu-Kim
b58f3edf6d refactor: remove redundant subagent-question-blocker hook
Replace PreToolUse hook-based question tool blocking with the existing
tools parameter approach (tools: { question: false }) which physically
removes the tool from the LLM's toolset before inference.

The hook was redundant because every session.prompt() call already passes
question: false via the tools parameter. OpenCode converts this to a
PermissionNext deny rule and deletes the tool from the toolset, preventing
the LLM from even seeing it. The hook only fired after the LLM already
called the tool, wasting tokens.

Changes:
- Remove subagent-question-blocker hook invocation from PreToolUse chain
- Remove hook registration from create-session-hooks.ts
- Delete src/hooks/subagent-question-blocker/ directory (dead code)
- Remove hook from HookNameSchema and barrel export
- Fix sync-executor.ts missing question: false in tools parameter
- Add regression tests for both the removal and the tools parameter
2026-02-13 14:55:46 +09:00
YeonGyu-Kim
0b1fdd508f fix(publish): make enhanced summary optional for patch, mandatory for minor/major
- patch: ask user whether to add enhanced summary (skippable)
- minor/major: enhanced summary is now mandatory, not optional
- Update TODO descriptions and skip conditions accordingly
2026-02-13 14:28:16 +09:00
YeonGyu-Kim
4f3371ce2c fix(publish): use generate-changelog.ts for contributor thanks
- Replace inline bash changelog with script/generate-changelog.ts
- Update /publish command with layered release notes structure
- Add preview step and clear enhanced summary guidelines
2026-02-13 14:07:39 +09:00
Willy
f9ea9a4ee9 fix(project): use directory param instead of process.cwd() for agents, commands, and slash commands
Extends the process.cwd() fix to cover all project-level loaders. In the desktop app, process.cwd() points to the app installation directory instead of the project directory, causing project-level agents, commands, and slash commands to not be discovered. Each function now accepts an optional directory parameter (defaulting to process.cwd() for backward compatibility) and callers pass ctx.directory from the plugin context.
2026-02-13 11:09:35 +08:00
YeonGyu-Kim
b008a57007 Merge pull request #1810 from code-yeongyu/fix/resolve-subagent-type-for-tui-display
fix(tool-execute-before): resolve subagent_type for TUI display
2026-02-13 12:06:28 +09:00
YeonGyu-Kim
1a5c9f228d fix(tool-execute-before): resolve subagent_type for TUI display
OpenCode TUI reads input.subagent_type to display task type. When
subagent_type was missing (e.g., category-only or session continuation),
TUI showed 'Unknown Task'.

Fix:
- category provided: always set subagent_type to 'sisyphus-junior'
  (previously only when subagent_type was absent)
- session_id continuation: resolve agent from session's first message
- fallback to 'continue' if session has no agent info
2026-02-13 12:02:40 +09:00
YeonGyu-Kim
6fb933f99b feat(plugin): add session agent resolver for subagent_type lookup 2026-02-13 12:02:27 +09:00
YeonGyu-Kim
f6fbac458e perf(comment-checker): add hard process reap and global semaphore to prevent CPU runaway 2026-02-13 11:58:46 +09:00
github-actions[bot]
4c10723b33 @willy-scr has signed the CLA in code-yeongyu/oh-my-opencode#1809 2026-02-13 02:56:32 +00:00
YeonGyu-Kim
10a60854dc perf(todo-continuation): add cooldown and stagnation cap to prevent re-injection loops 2026-02-13 11:54:32 +09:00
YeonGyu-Kim
a6372feaae Merge pull request #1794 from solssak/fix/isGptModel-proxy-providers
Expand isGptModel to detect GPT models behind proxy providers
2026-02-13 11:52:59 +09:00
Willy
6914f2fd04 fix(skills): use directory param instead of process.cwd() for project skill discovery
Project-level skills (.opencode/skills/ and .claude/skills/) were not
discovered in desktop app environments because the discover functions
hardcoded process.cwd() to resolve project paths. In desktop apps,
process.cwd() points to the app installation directory rather than the
user's project directory.

Add optional directory parameter to all project-level skill discovery
functions and thread ctx.directory from the plugin context through the
entire skill loading pipeline. Falls back to process.cwd() when
directory is not provided, preserving CLI compatibility.
2026-02-13 10:49:15 +08:00
YeonGyu-Kim
c8851b51ad Merge branch 'perf/rules-injector-parse-cache' into dev 2026-02-13 11:47:56 +09:00
YeonGyu-Kim
75f35f1337 perf(rules-injector): add mtime-based parse cache and dirty-write gate 2026-02-13 11:46:45 +09:00
YeonGyu-Kim
e99088d70f Merge branch 'perf/directory-injector-dirty-flag' into dev 2026-02-13 11:45:45 +09:00
YeonGyu-Kim
492029ff7c perf(directory-injectors): skip writeFileSync when no new paths injected 2026-02-13 11:44:07 +09:00
HyunJun CHOI
58b7aff7bd fix: detect GPT models behind proxy providers (litellm, ollama) in isGptModel
isGptModel only matched openai/ and github-copilot/gpt- prefixes, causing
models like litellm/gpt-5.2 to fall into the Claude code path. This
injected Claude-specific thinking config, which the opencode runtime
translated into a reasoningSummary API parameter — rejected by OpenAI.

Extract model name after provider prefix and match against GPT model
name patterns (gpt-*, o1, o3, o4).

Closes #1788

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-13 11:38:00 +09:00
YeonGyu-Kim
4a991b5a83 Merge pull request #821 from devxoul/prompt-append-file-uri
feat: add file:// URI support in agent prompt_append
2026-02-13 11:30:27 +09:00
YeonGyu-Kim
60b4d20fd8 feat(agents): add file:// URI support in prompt_append configuration
Port devxoul's PR #821 feature to current codebase structure.
Supports absolute, relative, ~/home paths with percent-encoding.
Gracefully handles malformed URIs and missing files with warnings.

Co-authored-by: devxoul <devxoul@gmail.com>
2026-02-13 11:25:40 +09:00
YeonGyu-Kim
b8c12495b6 Merge pull request #1807 from code-yeongyu/fix/skills-sources-schema
fix schema generation and implement skills.sources runtime loading
2026-02-13 11:22:11 +09:00
YeonGyu-Kim
5a83c61d77 fix(skills): normalize windows separators for source globs 2026-02-13 11:17:18 +09:00
YeonGyu-Kim
ad468ec93f Merge pull request #1758 from devxoul/lookat-remote-block
Block remote URLs in look_at file_path
2026-02-13 11:08:53 +09:00
YeonGyu-Kim
0001bc87c2 feat(skills): load config sources in runtime discovery 2026-02-13 11:08:46 +09:00
YeonGyu-Kim
aab8a23243 fix(schema): generate full JSON schema with Zod v4 2026-02-13 11:08:46 +09:00
edxeth
3abc1d46ba fix(mcp): preserve user's enabled:false and apply disabled_mcps to all MCP sources
Commit 598a4389 refactored config-handler into separate modules but
dropped the disabledMcps parameter from loadMcpConfigs() and did not
handle the spread-order overwrite where .mcp.json MCPs (hardcoded
enabled:true) overwrote user's enabled:false from opencode.json.

Changes:
- Re-add disabledMcps parameter to loadMcpConfigs() in loader.ts
- Capture user's enabled:false MCPs before merge, restore after
- Pass disabled_mcps to loadMcpConfigs for .mcp.json filtering
- Delete disabled_mcps entries from final merged result
- Add 8 new tests covering both fixes
2026-02-12 18:03:17 +01:00
github-actions[bot]
50afb6b2de release: v3.5.3 2026-02-12 15:31:06 +00:00
github-actions[bot]
41d790dc04 @jardo5 has signed the CLA in code-yeongyu/oh-my-opencode#1802 2026-02-12 12:57:17 +00:00
github-actions[bot]
2ac2241367 @bvanderhorn has signed the CLA in code-yeongyu/oh-my-opencode#1799 2026-02-12 11:17:51 +00:00
Bram van der Horn
1511886c0c fix: use fs.realpath instead of manual path.resolve for symlink resolution
resolveSymlink and resolveSymlinkAsync incorrectly resolved relative
symlinks by using path.resolve(filePath, '..', linkTarget). This fails
when symlinks use multi-level relative paths (e.g. ../../skills/...) or
when symlinks are chained (symlink pointing to a directory containing
more symlinks).

Replace with fs.realpathSync/fs.realpath which delegates to the OS for
correct resolution of all symlink types: relative, absolute, chained,
and nested.

Fixes #1738

AI-assisted-by: claude-opus-4.6 via opencode
AI-contribution: partial
AI-session: 20260212-120629-4gTXvDGV
2026-02-12 12:12:40 +01:00
YeonGyu-Kim
283c7e6cb7 Merge pull request #1798 from code-yeongyu/feat/subagent-metadata-on-resume 2026-02-12 19:18:45 +09:00
YeonGyu-Kim
95aa7595f8 feat: include subagent in task_metadata when resuming sessions
When delegate-task resumes a session via session_id, the response
task_metadata now includes a subagent field identifying which agent
was running in the resumed session. This allows the parent agent to
know what type of subagent it is continuing.

- sync-continuation: uses resumeAgent extracted from session messages
- background-continuation: uses task.agent from BackgroundTask object
- Gracefully omits subagent when agent info is unavailable
2026-02-12 19:09:15 +09:00
YeonGyu-Kim
c6349dc38a Merge pull request #1795 from code-yeongyu/fix/background-agent-session-error
fix: handle session.error and prevent zombie task starts in background-agent
2026-02-12 18:43:49 +09:00
github-actions[bot]
17b475eefd @solssak has signed the CLA in code-yeongyu/oh-my-opencode#1794 2026-02-12 09:28:23 +00:00
YeonGyu-Kim
3a019792e9 test(background-agent): use createMockTask in session.error tests 2026-02-12 18:26:47 +09:00
YeonGyu-Kim
1ceaaa4311 fix(background-agent): handle session.error and prevent zombie queue starts
Marks background tasks as error on session.error to release concurrency immediately, and skips/removes error tasks from queues to avoid zombie starts.
2026-02-12 18:26:03 +09:00
YeonGyu-Kim
ff8a5f343a fix(auth): add multi-layer auth injection for desktop app compatibility
Desktop app sets OPENCODE_SERVER_PASSWORD which activates basicAuth on
the server, but the SDK client provided to plugins lacks auth headers.
The previous setConfig-only approach may silently fail depending on SDK
version.

Add belt-and-suspenders fallback chain:
1. setConfig headers (existing)
2. request interceptors
3. fetch wrapper via getConfig/setConfig
4. mutable _config.fetch wrapper
5. top-level client.fetch wrapper

Replace console.warn with structured log() for better diagnostics.
2026-02-12 18:12:54 +09:00
github-actions[bot]
118150035c @G36maid has signed the CLA in code-yeongyu/oh-my-opencode#1791 2026-02-12 07:56:30 +00:00
G36maid
6c7b6115dd docs: Fix link in Google Auth section of configurations.md 2026-02-12 15:52:37 +08:00
github-actions[bot]
157952f293 @raki-1203 has signed the CLA in code-yeongyu/oh-my-opencode#1790 2026-02-12 07:27:50 +00:00
raki-1203
5c8d694491 fix: execute all Stop hooks instead of returning after first non-blocking result
Previously, executeStopHooks returned immediately after the first hook
that produced valid JSON stdout, even if it was non-blocking. This
prevented subsequent hooks from executing.

This was problematic when users had multiple Stop hooks (e.g.,
check-console-log.js + task-complete-notify.sh in settings.json),
because the first hook's stdout (which echoed stdin data as JSON)
caused an early return, silently skipping all remaining hooks.

Now only explicitly blocking results (exit code 2 or decision=block)
cause an early return, matching Claude Code's behavior of executing
all Stop hooks sequentially.

Closes #1707
2026-02-12 16:09:13 +09:00
YeonGyu-Kim
d358e6e48e Merge pull request #1783 from code-yeongyu/fix/run-event-stream
fix(run): pass directory to event.subscribe for session-scoped SSE events
2026-02-12 11:55:56 +09:00
YeonGyu-Kim
9afd0d1d41 fix(run): pass directory to event.subscribe for session-scoped events
The SSE event stream subscription was missing the directory parameter,
causing the OpenCode server to only emit global events (heartbeat,
connected, toast) but not session-scoped events (session.idle,
session.status, tool.execute, message.updated, message.part.updated).

Without session events:
- hasReceivedMeaningfulWork stays false (no message/tool events)
- mainSessionIdle never updates (no session.idle/status events)
- pollForCompletion either hangs or exits for unrelated reasons

Fix: Pass { directory } to client.event.subscribe(), matching the
pattern already used by client.session.promptAsync().

Also adds a stabilization period (10s) after first meaningful work
as defense-in-depth against early exit race conditions.
2026-02-12 11:52:31 +09:00
popododo0720
eb56701996 fix: reduce session.messages() calls with event-based caching to prevent memory leaks
- Replace session.messages() fetch in context-window-monitor with message.updated event cache
- Replace session.messages() fetch in preemptive-compaction with message.updated event cache
- Add per-session transcript cache (5min TTL) to avoid full rebuild per tool call
- Remove session.messages() from background-agent polling (use event-based progress)
- Add TTL pruning to todo-continuation-enforcer session state Map
- Add setInterval.unref() to tool-input-cache cleanup timer

Fixes #1222
2026-02-12 11:38:11 +09:00
github-actions[bot]
e4be8cea75 @youngbinkim0 has signed the CLA in code-yeongyu/oh-my-opencode#1777 2026-02-11 22:04:42 +00:00
Rishi Vhavle
d3978ab491 fix: parse config sections independently so one invalid field doesn't discard the entire config
Previously, a single validation error (e.g. wrong type for
prometheus.permission.edit) caused safeParse to fail and the
entire oh-my-opencode.json was silently replaced with {}.

Now loadConfigFromPath falls back to parseConfigPartially() which
validates each top-level key in isolation, keeps the sections that
pass, and logs which sections were skipped.

Closes #1767
2026-02-12 01:33:12 +05:30
YeonGyu-Kim
306c7f4c8e Merge pull request #1770 from code-yeongyu/fix/prometheus-md-only-agent-name-matching
fix: use case-insensitive matching for prometheus agent detection
2026-02-12 03:42:21 +09:00
YeonGyu-Kim
c12c6fa0c0 fix: use case-insensitive matching for prometheus agent detection in prometheus-md-only hook
The hook used exact string equality (agentName !== "prometheus") which fails
when display names like "Prometheus (Plan Builder)" are stored in session state.
Replace with case-insensitive substring matching via isPrometheusAgent() helper,
consistent with the pattern used in keyword-detector hook.

Closes #1764 (Bug 3)
2026-02-12 03:36:58 +09:00
YeonGyu-Kim
ef1baea163 fix: improve error message for marketplace plugin commands
- Detect namespaced commands (containing ':') from Claude marketplace plugins
- Provide clear error message explaining marketplace plugins are not supported
- Point users to .claude/commands/ as alternative for custom commands
- Fixes issue where /daplug:run-prompt gave ambiguous 'command not found'

Closes #1682
2026-02-12 03:05:55 +09:00
github-actions[bot]
d33af1d27f @tcarac has signed the CLA in code-yeongyu/oh-my-opencode#1766 2026-02-11 15:03:39 +00:00
github-actions[bot]
b2f019a987 @COLDTURNIP has signed the CLA in code-yeongyu/oh-my-opencode#1765 2026-02-11 14:54:57 +00:00
Raphanus Lo
f80b72c2b7 fix(config): load lsp config from jsonc configuration files
Signed-off-by: Raphanus Lo <coldturnip@gmail.com>
2026-02-11 22:53:50 +08:00
github-actions[bot]
ce7fb00847 @WietRob has signed the CLA in code-yeongyu/oh-my-opencode#1529 2026-02-11 13:55:56 +00:00
github-actions[bot]
63d3fa7439 @uyu423 has signed the CLA in code-yeongyu/oh-my-opencode#1762 2026-02-11 12:31:15 +00:00
MoerAI
c298351d88 fix(hooks): use path.isAbsolute() for cross-platform path detection
Replace path.startsWith('/') with path.isAbsolute() in directory
injector hooks. The startsWith('/') check only works on Unix-like
systems where absolute paths begin with '/'. On Windows, absolute
paths start with drive letters (e.g., C:\), causing resolveFilePath
to incorrectly treat them as relative and prepend the project
directory.

This follows the same pattern already used in
src/features/claude-tasks/storage.ts (commit 8e349aa).

Affected hooks:
- directory-agents-injector: AGENTS.md injection
- directory-readme-injector: README.md injection
2026-02-11 19:23:42 +09:00
Jeon Suyeol
3eb7dc73b7 block remote URLs in look-at file_path validation 2026-02-11 18:50:51 +09:00
github-actions[bot]
2df61a2199 release: v3.5.2 2026-02-11 08:38:47 +00:00
YeonGyu-Kim
96f0e787e7 Merge pull request #1754 from code-yeongyu/fix/issue-1745-auto-update-pin
fix: respect user-pinned plugin version, skip auto-update when explicitly pinned
2026-02-11 16:07:57 +09:00
YeonGyu-Kim
4ef6188a41 Merge pull request #1756 from code-yeongyu/fix/mcp-tool-output-guard
fix: guard output.output in tool after-hooks for MCP tools
2026-02-11 16:03:59 +09:00
YeonGyu-Kim
d5fd918bff fix: guard output.output in tool after-hooks for MCP tools (#1720)
MCP tool responses can have undefined output.output, causing TypeError
crashes in tool.execute.after hooks.

Changes:
- comment-checker/hook.ts: guard output.output with ?? '' before toLowerCase()
- edit-error-recovery/hook.ts: guard output.output with ?? '' before toLowerCase()
- task-resume-info/hook.ts: extract output.output ?? '' into outputText before all string operations
- Added tests for undefined output.output in edit-error-recovery and task-resume-info
2026-02-11 15:49:56 +09:00
YeonGyu-Kim
5d3215167a fix: respect user-pinned plugin version, skip auto-update when explicitly pinned
When a user pins oh-my-opencode to a specific version (e.g., oh-my-opencode@3.4.0),
the auto-update checker now respects that choice and only shows a notification toast
instead of overwriting the pinned version with latest.

- Skip updatePinnedVersion() when pluginInfo.isPinned is true
- Show update-available toast only (notification, no modification)
- Added comprehensive tests for pinned/unpinned/autoUpdate scenarios

Fixes #1745
2026-02-11 15:39:15 +09:00
github-actions[bot]
3b2d3acd17 @ojh102 has signed the CLA in code-yeongyu/oh-my-opencode#1750 2026-02-11 05:30:01 +00:00
bob_karrot
bb6a011964 fix(hooks): guard against non-string tool output in afterToolResult hooks
MCP tools can return non-string results (e.g. structured JSON objects).
When this happens, output.output is undefined, causing TypeError crashes
in edit-error-recovery and delegate-task-retry hooks that call methods
like .toLowerCase() without checking the type first.

Add typeof string guard in both hooks, consistent with the existing
pattern used in tool-output-truncator.
2026-02-11 14:23:37 +09:00
YeonGyu-Kim
bfe1730e9f feat(categories): add disable field to CategoryConfigSchema
Allow individual categories to be disabled via `disable: true` in
config. Introduce shared `mergeCategories()` utility to centralize
category merging and disabled filtering across all 7 consumption sites.
2026-02-11 13:52:20 +09:00
YeonGyu-Kim
67b4665c28 fix(auto-update): revert config pin on install failure to prevent version mismatch
When bun install fails after updating the config pin, the config now shows the
new version but the actual package is the old one. Add revertPinnedVersion() to
roll back the config entry on install failure, keeping config and installed
version in sync.

Ref #1472
2026-02-11 13:52:20 +09:00
YeonGyu-Kim
b0c570e054 fix(subagent): remove permission.question=deny override that caused zombie sessions
Child session creation was injecting permission: { question: 'deny' } which
conflicted with OpenCode's child session permission handling, causing subagent
sessions to hang with 0 messages after creation (zombie state).

Remove the permission override from all session creators (BackgroundManager,
sync-session-creator, call-omo-agent) and rely on prompt-level tool restrictions
(tools.question=false) to maintain the intended policy.

Closes #1711
2026-02-11 13:52:20 +09:00
YeonGyu-Kim
fd99a29d6e feat(atlas): add notepad reading step to boulder verification reminders
Instructs the orchestrator to read subagent notepad files
(.sisyphus/notepads/{planName}/) after task completion, ensuring
learnings, issues, and problems are propagated to subsequent delegations.
2026-02-11 13:52:20 +09:00
YeonGyu-Kim
308ad1e98e Merge pull request #1683 from code-yeongyu/fix/issue-1672
fix: guard session_ids with optional chaining to prevent crash (#1672)
2026-02-11 13:33:38 +09:00
YeonGyu-Kim
d60697bb13 fix: guard session_ids with optional chaining to prevent crash
boulderState?.session_ids.includes() only guards boulderState, not
session_ids. If boulder.json is corrupted or missing the field,
session_ids is undefined and .includes() crashes silently, losing
subagent results.

Changes:
- readBoulderState: validate parsed JSON is object, default session_ids to []
- atlas hook line 427: boulderState?.session_ids?.includes
- atlas hook line 655: boulderState?.session_ids?.includes
- prometheus-md-only line 93: boulderState?.session_ids?.includes
- appendSessionId: guard with ?. and initialize to [] if missing

Fixes #1672
2026-02-11 13:27:18 +09:00
YeonGyu-Kim
95a4e971a0 test: add validation tests for readBoulderState session_ids handling
Add tests for corrupted/incomplete boulder.json:
- null JSON value returns null
- primitive JSON value returns null
- missing session_ids defaults to []
- non-array session_ids defaults to []
- empty object defaults session_ids to []
- appendSessionId with missing session_ids does not crash

Refs #1672
2026-02-11 13:25:39 +09:00
github-actions[bot]
d8901fa658 @danpung2 has signed the CLA in code-yeongyu/oh-my-opencode#1741 2026-02-11 02:52:47 +00:00
YeonGyu-Kim
82c71425a0 fix(ci): add web-flow to CLA allowlist
GitHub Web UI commits have web-flow as the author/committer,
causing CLA checks to fail even after the contributor signs.
Adding web-flow to the allowlist resolves this for all
contributors who edit files via the GitHub web interface.
2026-02-11 10:59:17 +09:00
github-actions[bot]
7e0ab828f9 release: v3.5.1 2026-02-11 01:01:58 +00:00
YeonGyu-Kim
13d960f3ca fix(look-at): revert to sync prompt to fix race condition with async polling
df0b9f76 regressed look_at from synchronous prompt (session.prompt) to
async prompt (session.promptAsync) + pollSessionUntilIdle polling. This
introduced a race condition where the poller fires before the server
registers the session as busy, causing it to return immediately with no
messages available.

Fix: restore promptSyncWithModelSuggestionRetry (blocking HTTP call) and
remove polling entirely. Catch prompt errors gracefully and still attempt
to fetch messages, since session.prompt may throw even on success.
2026-02-11 09:59:00 +09:00
github-actions[bot]
687cc2386f @marlon-costa-dc has signed the CLA in code-yeongyu/oh-my-opencode#1726 2026-02-10 18:50:08 +00:00
Peïo Thibault
cd0949ccfa fix(call-omo-agent): enforce disabled_agents config (#1716)
## Summary
- Added disabled_agents parameter to createCallOmoAgent factory
- Check runs after ALLOWED_AGENTS validation, before agent execution
- Case-insensitive matching consistent with existing patterns
- Clear error message distinguishes 'disabled' from 'invalid agent type'
- Threaded disabledAgents config into tool factory from pluginConfig

## Changes
- tools.ts: Add disabledAgents parameter and validation check
- tool-registry.ts: Pass pluginConfig.disabled_agents to factory
2026-02-10 19:21:25 +01:00
Peïo Thibault
0f5b8e921a test(call-omo-agent): add disabled_agents validation tests
Closes #1716

## Summary
- Added 4 tests for disabled_agents validation in call_omo_agent tool
- Tests verify agent rejection when in disabled_agents list
- Tests verify case-insensitive matching
- Tests verify agents not in disabled list are allowed
- Tests verify empty disabled_agents allows all agents
2026-02-10 19:21:25 +01:00
github-actions[bot]
d88449b1e2 @sjawhar has signed the CLA in code-yeongyu/oh-my-opencode#1727 2026-02-10 17:44:05 +00:00
github-actions[bot]
074d8dff09 release: v3.5.0 2026-02-10 16:25:32 +00:00
YeonGyu-Kim
fba916db60 fix(atlas): await injectBoulderContinuation and handle errors
The async call was fire-and-forget with no error handling. Now properly
awaited with try/catch that logs failures and increments promptFailureCount.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
f727aab892 fix(skill-mcp): redact sensitive query params from URLs in error messages
API keys passed as query parameters (exaApiKey, tokens, secrets) were
exposed in thrown error messages. Now replaces them with ***REDACTED***.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
686f32929c fix(cli-run): handle retry status type as non-idle in event handlers
Session status 'retry' was unhandled, leaving mainSessionIdle=true
during retries which could cause premature completion detection.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
af7733f89f fix(config-migration): always apply migration in-memory and track backup success
Migration changes were only applied to rawConfig if file write succeeded,
leaving the running process on stale config. Also stops logging backup
path when the backup copy itself failed.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
3553ab79e1 fix(git-worktree): use trimEnd instead of trim to preserve leading whitespace
Git status porcelain output uses leading spaces for status indicators;
trim() was stripping them which could break parsing.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
fb19e544c9 fix(cli): add backup and crash recovery to auth-plugins config write
Creates .bak before writeFileSync; on failure restores from backup
and returns a descriptive error instead of corrupting the config.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
88e1e3d0fa fix(ralph-loop): only scan text parts for completion tags and handle both API shapes
Reasoning parts could contain completion-like text triggering false
positives. Also handles session.messages returning either an array
or {data: [...]} shape.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
11d1e70067 fix(agents): wire useTaskSystem config flag into Sisyphus and Hephaestus
The experimental.task_system flag was defined in config but never
passed through to agent creation, so the task system prompt switch
was always off.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
17c56d8814 fix(mcp): restore x-api-key header for EXA websearch alongside query param
The header-based auth was removed during refactoring; some MCP server
implementations require it. Now sends both query param and header.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
6694082a7e fix(atlas): correct plan path from .sisyphus/tasks/*.yaml to .sisyphus/plans/*.md
The verification reminder template was pointing at the wrong directory;
actual plan files are stored under .sisyphus/plans/ as markdown.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
f9d3a9493a fix(model-suggestion-retry): add 120s timeout to promptAsync call
Wraps promptAsync with Promise.race to prevent indefinite hangs
when the interactive prompt never resolves.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
7427922e6f fix(delegate-task): ensure subagentSessions cleanup on all exit paths
Added outer finally block so subagentSessions.delete(syncSessionID)
runs even on early return from sendSyncPrompt error.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
ea1b22454d fix(comment-checker): add 30s hard timeout to CLI spawn
If the comment-checker binary hangs, Promise.race with a 30s timeout
kills the process and returns a safe fallback {hasComments: false}.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
a8681a9ffe fix(session-recovery): return success=false for assistant_prefill_unsupported
Returning true tricked the system into thinking recovery succeeded,
triggering auto-continue which hit the same error again in an infinite loop.
2026-02-11 00:45:51 +09:00
YeonGyu-Kim
c677042f05 fix(cli-run): set default timeout to 10 minutes and attach immediate .catch() on event processor
DEFAULT_TIMEOUT_MS was 0 (no timeout), causing opencode run to hang forever
if the session never completed. Also attached .catch() to processEvents()
immediately to prevent unhandled promise rejections before Promise.race.
2026-02-11 00:45:51 +09:00
github-actions[bot]
25c7337fd1 @RobertWsp has signed the CLA in code-yeongyu/oh-my-opencode#1723 2026-02-10 15:33:50 +00:00
github-actions[bot]
b4768014e0 @materializerx has signed the CLA in code-yeongyu/oh-my-opencode#1724 2026-02-10 15:22:25 +00:00
YeonGyu-Kim
162701f56e test(delegate-task): validate sync prompt tool restrictions 2026-02-10 22:54:48 +09:00
YeonGyu-Kim
087ce06055 refactor(delegate-task): inject sync task deps for test isolation 2026-02-10 22:54:30 +09:00
YeonGyu-Kim
967058fe3d fix(delegate-task): stabilize sync session polling 2026-02-10 22:52:17 +09:00
YeonGyu-Kim
257eb9277b fix(atlas): restrict boulder continuation to sessions in boulder session_ids
Main session was unconditionally allowed through the boulder session guard,
causing continuation injection into sessions not part of the active boulder.
Now only sessions explicitly in boulder's session_ids (or background tasks)
receive boulder continuation, matching todo-continuation-enforcer behavior.
2026-02-10 22:15:28 +09:00
YeonGyu-Kim
2b87719c83 docs: document intentional design decisions in atlas, todo-continuation, and delegation hooks 2026-02-10 22:00:54 +09:00
YeonGyu-Kim
1199e2b839 fix(background): Wave 2 - fix interrupt status checks, display text, error recovery grace, LSP JSONC
- fix(background): include "interrupt" status in all terminal status checks (3 files)
- fix(background): display "INTERRUPTED" instead of "CANCELLED" for interrupted tasks
- fix(cli): add error recovery grace period in poll-for-completion
- fix(lsp): use JSONC parser for config loading to support comments

All changes verified with tests and typecheck.
2026-02-10 22:00:54 +09:00
YeonGyu-Kim
df0b9f7664 fix(delegate-task): Wave 1 - fix polling timeout, resource cleanup, tool restrictions, idle dedup, auth-plugins JSONC, CLI runner hang
- fix(delegate-task): return error on poll timeout instead of silent null
- fix(delegate-task): ensure toast and session cleanup on all error paths with try/finally
- fix(delegate-task): apply agent tool restrictions in sync-prompt-sender
- fix(plugin): add symmetric idle dedup to prevent double hook triggers
- fix(cli): replace regex-based JSONC editing with jsonc-parser in auth-plugins
- fix(cli): abort event stream after completion and restore no-timeout default

All changes verified with tests and typecheck.
2026-02-10 22:00:54 +09:00
YeonGyu-Kim
7fe1a653c8 fix(tests): stabilize toast manager and continuation tests 2026-02-10 22:00:54 +09:00
YeonGyu-Kim
2bf11a8ed7 feat(prometheus): allow bash commands for Prometheus agent
Remove bash tool restriction from prometheus-md-only hook. Prometheus
can now execute bash commands for better plan generation context.
2026-02-10 22:00:54 +09:00
YeonGyu-Kim
fe1faa6d0f docs(tasks): add TODO sync documentation to AGENTS.md
- Add comprehensive TODO SYNC section documenting automatic
  bidirectional sync between tasks and OpenCode todo system
- Improve sync-continuation.test.ts with proper mock modules
  for pollSyncSession and fetchSyncResult dependencies
2026-02-10 22:00:54 +09:00
YeonGyu-Kim
6d17ac7d3a docs(tools): update AGENTS.md to document individual task tools
Replace unified 'task' tool documentation with 4 individual tools:

- task_create: Create task with auto-generated T-{uuid} ID

- task_list: List active tasks with summary

- task_get: Retrieve full task object by ID

- task_update: Update task fields with dependency support

Add detailed TASK TOOLS section with args tables and usage examples.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-10 22:00:54 +09:00
YeonGyu-Kim
5a527e214a test(sync-continuation): add comprehensive test coverage
- Add tests for sync-continuation error paths and toast cleanup
- Add tests for sync-result-fetcher with anchor message support
- Expand sync-session-poller tests for edge cases and completion detection
- Add bulk cleanup test for recent-synthetic-idles
2026-02-10 22:00:54 +09:00
YeonGyu-Kim
231e790a0c fix(sync-continuation): improve error handling and toast cleanup
- Add proper error handling in executeSyncContinuation with try-catch blocks
- Ensure toast cleanup happens in all error paths via finally block
- Add anchorMessageCount tracking for accurate result fetching after continuation
- Improve fetchSyncResult to filter messages after anchor point
- Add silent failure detection when no new response is generated
2026-02-10 22:00:54 +09:00
YeonGyu-Kim
45dfc4ec66 feat(atlas): enforce mandatory manual code review and direct boulder state checks
- VERIFICATION_REMINDER: add Step 2 manual code review (non-negotiable)
  - Require Read of EVERY changed file line by line
  - Cross-check subagent claims vs actual code
  - Verify logic correctness, completeness, edge cases, patterns
- Add Step 5: direct boulder state check via Read plan file
  - Count remaining tasks directly, no cached state
- BOULDER_CONTINUATION_PROMPT: add first rule to read plan file immediately
- verification-reminders.ts: restructure steps 5-8 for boulder/todo checks
- Atlas default.ts (Claude): enhance 3.4 QA with A/B/C/D sections
  - A: Automated verification
  - B: Manual code review (non-negotiable)
  - C: Hands-on QA (if applicable)
  - D: Check boulder state directly
- Atlas gpt.ts (GPT-5.2): apply same QA enhancements with GPT-optimized structure
- verification_rules: update both Claude and GPT versions with manual review requirements

Addresses issue where Atlas would skip manual code inspection after delegation,
leading to rubber-stamping of broken or incomplete work.
2026-02-10 22:00:54 +09:00
YeonGyu-Kim
f84ef532c1 fix(todo-continuation-enforcer): require boulder session for continuation
The todo-continuation-enforcer was firing boulder continuation in ALL main
sessions with incomplete todos, regardless of whether /start-work was ever
executed. This caused unwanted BOULDER CONTINUATION directives in sessions
that never invoked /start-work.

Changes:
- Add readBoulderState check in idle-event.ts to verify session is registered
  in boulder.json's session_ids array
- Change filter condition from main session check to boulder session check
- Add 4 new test cases for boulder session gate behavior
- Update all existing 41 tests to set up boulder state appropriately

Now boulder continuation only fires when:
1. Session is in boulder.json's session_ids (/start-work was executed), OR
2. Session is a background task session (subagent)

TDD cycle:
- RED: 2 new tests failed as expected (no boulder check in implementation)
- GREEN: Implementation added, all 41 tests pass
- REFACTOR: Full test suite 2513 pass, typecheck & build clean
2026-02-10 22:00:53 +09:00
github-actions[bot]
563da9470d @cyberprophet has signed the CLA in code-yeongyu/oh-my-opencode#1717 2026-02-10 12:06:15 +00:00
github-actions[bot]
a8a4f54428 @lxia1220 has signed the CLA in code-yeongyu/oh-my-opencode#1713 2026-02-10 06:43:45 +00:00
YeonGyu-Kim
83f1304e01 docs(agents): regenerate all AGENTS.md with deep codebase analysis 2026-02-10 14:53:39 +09:00
YeonGyu-Kim
b538806d5e docs(agents): add merge commit policy to PR rules section 2026-02-10 14:24:18 +09:00
YeonGyu-Kim
a25d8dfdae refactor(prompts): enrich explore/librarian delegation examples with structured context handoff
Expand prompt structure comment to 4-field format (CONTEXT/GOAL/DOWNSTREAM/REQUEST).
Update all explore/librarian task() examples across Sisyphus, Hephaestus,
Prometheus interview-mode, and both ultrawork variants with richer context
including downstream usage, scope limits, and return format expectations.
2026-02-10 14:24:18 +09:00
YeonGyu-Kim
4f9cec434b Merge pull request #1709 from code-yeongyu/feature/comment-checker-apply-patch
feat(comment-checker): support apply_patch
2026-02-10 14:17:28 +09:00
YeonGyu-Kim
f3f5b98c68 test: use BDD markers in pruneRecentSyntheticIdles test 2026-02-10 14:13:28 +09:00
YeonGyu-Kim
97b7215848 fix(event): prune synthetic idle dedup map 2026-02-10 14:08:02 +09:00
YeonGyu-Kim
61531ca26c feat(comment-checker): run checks for apply_patch edits 2026-02-10 13:58:34 +09:00
YeonGyu-Kim
19a4324b3e fix(provider-cache): extract models from provider.list().all response
OpenCode SDK does not expose client.model.list API. This caused the
provider-models cache to always be empty (models: {}), which in turn
caused delegate-task categories with requiresModel (e.g., 'deep',
'artistry') to fail with misleading 'Unknown category' errors.

Changes:
- connected-providers-cache.ts: Extract models from provider.list()
  response's .all array instead of calling non-existent client.model.list
- category-resolver.ts: Distinguish between 'unknown category' and
  'model not available' errors with clearer error messages
- Add comprehensive tests for both fixes

Bug chain:
client.model?.list is undefined -> empty cache -> isModelAvailable
returns false for requiresModel categories -> null returned from
resolveCategoryConfig -> 'Unknown category' error (wrong message)
2026-02-10 13:25:49 +09:00
jsl9208
fec12b63a6 fix(ast-grep): fix ast_grep_replace silent write failure
ast-grep CLI silently ignores --update-all when --json=compact is
present, causing replace operations to report success while never
modifying files. Split into two separate CLI invocations.
2026-02-10 11:21:26 +08:00
YeonGyu-Kim
2fd847d88d refactor: fix import path and update test fixtures
- Fix import path in opencode-skill-loader/loader.ts
- Update executor.test.ts fixtures
2026-02-10 11:41:45 +09:00
YeonGyu-Kim
1717050f73 feat(event): normalize session.status to session.idle
Add session-status-normalizer to handle session.status events and
convert idle status to synthetic session.idle events. Includes
deduplication logic to prevent duplicate idle events within 500ms.
2026-02-10 11:41:45 +09:00
YeonGyu-Kim
44675fb57f fix(atlas): allow boulder continuation for Sisyphus sessions
When boulderState.agent is not explicitly set (defaults to 'atlas'),
allow continuation for sessions where the last agent is 'sisyphus'.
This fixes the issue where boulder continuation was skipped when
Sisyphus took over the conversation after boulder creation.
2026-02-10 11:41:44 +09:00
YeonGyu-Kim
7255fec8b3 test(git-worktree): fix test pollution from incomplete fs mock
Replace mock.module with spyOn + mockRestore to prevent fs module
pollution across test files. mock.module replaces the entire module
and caused 69 test failures in other files that depend on fs.
2026-02-10 11:41:44 +09:00
YeonGyu-Kim
fecc488848 fix(sisyphus-junior): disambiguate blocked delegation tool from allowed task management tools
When task_system is enabled, the prompt said 'task tool: BLOCKED' which
LLMs interpreted as blocking task_create/task_update/task_list/task_get
too. Now the constraints section explicitly separates 'task (agent
delegation tool): BLOCKED' from 'task_create, task_update, ...: ALLOWED'
so Junior no longer refuses to use task management tools.
2026-02-10 11:41:44 +09:00
YeonGyu-Kim
b45af0e4d2 Merge pull request #1703 from nianyi778/add-elestyle-to-loved-by
Add ELESTYLE to 'Loved by professionals at' section
2026-02-10 11:26:40 +09:00
likai
25be4ab905 Add ELESTYLE to 'Loved by professionals at' section 2026-02-10 10:43:09 +09:00
github-actions[bot]
4f03aea0a1 @nianyi778 has signed the CLA in code-yeongyu/oh-my-opencode#1703 2026-02-10 01:41:30 +00:00
YeonGyu-Kim
0565ce839e fix(cli/run): handle session.status idle event in addition to deprecated session.idle 2026-02-09 21:12:11 +09:00
YeonGyu-Kim
bb2df9fec6 fix(cli/run): set default timeout to 30 minutes to match help text 2026-02-09 21:12:00 +09:00
YeonGyu-Kim
564bb20f6a fix(cli/run): move error check before idle/tool gates in pollForCompletion 2026-02-09 21:11:48 +09:00
YeonGyu-Kim
096233b23f fix(config-manager): replace heuristic JSONC editing with jsonc-parser modify/applyEdits 2026-02-09 21:11:40 +09:00
YeonGyu-Kim
7eb67521cb fix(agent-config): pass useTaskSystem to sisyphus-junior when task_system is enabled
sisyphus-junior prompt always used todo-based discipline text regardless of
experimental.task_system setting because the useTaskSystem flag was never
forwarded from agent-config-handler to createSisyphusJuniorAgentWithOverrides.
2026-02-09 21:10:15 +09:00
YeonGyu-Kim
498fda11a0 feat(background-agent): handle "interrupt" in notifications, output, and formatting
Update notification systems to display INTERRUPTED status.

Add interrupt handling to background_output tool (terminal status).

Add interrupt-specific status note to formatTaskStatus.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-09 18:26:16 +09:00
YeonGyu-Kim
5b34a98e0a feat(background-agent): use "interrupt" status for promptAsync errors
Change promptAsync catch blocks to set status = "interrupt" instead of "error".

This distinguishes prompt errors from stale timeouts (cancelled) and TTL expirations (error).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-09 18:25:54 +09:00
YeonGyu-Kim
a37259326a feat(background-agent): add "interrupt" to BackgroundTaskStatus type
Add interrupt as a terminal status for background tasks that fail due to promptAsync errors (e.g., prompt exceed, agent not found).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-09 18:25:34 +09:00
YeonGyu-Kim
a5bdb64933 fix(delegation): restore category to sisyphus-junior auto-mapping
Category-based delegation should always route to sisyphus-junior even if
subagent_type is mistakenly provided, matching the original behavior and
preventing accidental bypass of category routing.
2026-02-09 16:14:30 +09:00
YeonGyu-Kim
11f587194f fix(delegation): replace message-count-stability polling with native finish-based completion detection
Sync task completion was fragile — detecting premature stability during
brief idle periods between tool calls. Now mirrors opencode's native
SessionPrompt.loop() logic: checks assistant finish reason is terminal
(not tool-calls/unknown) and assistant.id > user.id.

Also switches sync prompt sender from blocking HTTP (promptSync) to
async fire-and-forget (promptAsync) to avoid JSON parse errors in ACP.
2026-02-09 15:37:19 +09:00
YeonGyu-Kim
20d009964d docs: refresh all 13 hierarchical AGENTS.md files with current codebase state 2026-02-09 14:29:53 +09:00
YeonGyu-Kim
f22f14d9d1 fix(look-at): catch prompt errors gracefully instead of re-throwing
session.prompt() may throw {} or JSON parse errors even when the server
successfully processes the request. Instead of crashing the tool, catch
all errors and proceed to fetch messages — if the response is available,
return it; otherwise return a clean error string.
2026-02-09 14:18:24 +09:00
YeonGyu-Kim
3d5abb950e refactor: enforce modular code rules — split 25+ files, rename catch-all modules, SRP compliance
refactor: enforce modular code architecture (waves 1-2)
2026-02-09 13:39:36 +09:00
YeonGyu-Kim
c71f0aa700 merge: integrate origin/dev (5th merge) — resolve @path skill references in split file structure 2026-02-09 12:08:15 +09:00
YeonGyu-Kim
70ac962fca feat: auto-resolve @path references in skill templates to absolute paths
Skill loaders previously only told agents that @path references are
relative to the skill directory, but agents often failed to resolve
them. Now @path/with/slash patterns are automatically expanded to
absolute paths during template construction.
2026-02-09 12:04:41 +09:00
YeonGyu-Kim
133da2624a fix(config-manager): guard against non-array plugin values in auth-plugins 2026-02-09 12:00:24 +09:00
YeonGyu-Kim
6a91d72a72 fix(agents): remove duplicate category override application in general-agents 2026-02-09 12:00:11 +09:00
YeonGyu-Kim
b0202e23f7 fix(agents): sanitize custom agent names for markdown table safety 2026-02-09 12:00:01 +09:00
YeonGyu-Kim
c4572a25fb fix(config-manager): skip string literals when counting braces in JSONC provider replacement 2026-02-09 11:59:50 +09:00
YeonGyu-Kim
554926209d fix(git-worktree): use Node readFileSync for cross-platform untracked file line counts 2026-02-09 11:45:29 +09:00
YeonGyu-Kim
0e49214ee7 fix(background-agent): rename getCompletedTasks to getNonRunningTasks for semantic accuracy 2026-02-09 11:45:20 +09:00
YeonGyu-Kim
edc3317e37 fix(git-worktree): compute real line counts for untracked files in diff stats 2026-02-09 11:36:35 +09:00
YeonGyu-Kim
7fdba56d8f fix(background-agent): align getCompletedTasks filter with state manager semantics 2026-02-09 11:36:29 +09:00
YeonGyu-Kim
247940bf02 fix: address Cubic background-agent issues — task status filter, array response handling, error mapping, concurrency key, duration fallback, output validation 2026-02-09 11:19:39 +09:00
YeonGyu-Kim
d6fbe7bd8d fix: address Cubic CLI and agent issues — URL encode, JSONC leading comments, config clone, untracked files, parse error handling, cache path, message-dir dedup 2026-02-09 11:17:51 +09:00
YeonGyu-Kim
5ca3d9c489 fix: address remaining Cubic issues — reset lastPartText on new message, TTY guard for installer, filter disabled skills, local-dev version resolution 2026-02-09 11:01:38 +09:00
YeonGyu-Kim
e5abf8702e merge: integrate origin/dev (4th merge) 2026-02-09 10:59:39 +09:00
YeonGyu-Kim
8dd07973a9 Merge pull request #1685 from code-yeongyu/fix/run-completion-race-condition
fix: prevent run completion race condition with consecutive stability checks
2026-02-09 10:58:37 +09:00
YeonGyu-Kim
e55fc1f14c fix: prevent run completion race condition with consecutive stability checks
pollForCompletion exited immediately when session went idle before agent
created TODOs or registered children (0 todos + 0 children = vacuously
complete). Add consecutive stability checks (3x500ms debounce) and
currentTool guard to prevent premature exit.

Extract pollForCompletion to dedicated module for testability.
2026-02-09 10:41:51 +09:00
github-actions[bot]
f07e364171 @mrm007 has signed the CLA in code-yeongyu/oh-my-opencode#1680 2026-02-08 21:41:45 +00:00
github-actions[bot]
e26c355c76 @aliozdenisik has signed the CLA in code-yeongyu/oh-my-opencode#1676 2026-02-08 17:12:45 +00:00
github-actions[bot]
5f9c3262a2 @JunyeongChoi0 has signed the CLA in code-yeongyu/oh-my-opencode#1674 2026-02-08 16:02:43 +00:00
github-actions[bot]
9d726d91fc release: v3.4.0 2026-02-08 15:44:17 +00:00
YeonGyu-Kim
a1d7f9e822 fix: guard against missing brace in JSONC provider replacement 2026-02-08 22:43:02 +09:00
YeonGyu-Kim
06d265c1de fix: use brace-depth matching for JSONC provider replacement instead of fragile regex 2026-02-08 22:38:51 +09:00
YeonGyu-Kim
8a2c3cc98d fix: address Cubic round 5 issues — prototype-pollution guard, URL-encode, JSONC preservation, config-context warning, dynamic config path 2026-02-08 22:35:16 +09:00
YeonGyu-Kim
be03e27faf chore: trigger re-review 2026-02-08 22:14:39 +09:00
YeonGyu-Kim
2834445067 fix: guard interactive prompts on both stdin and stdout TTY 2026-02-08 22:09:12 +09:00
YeonGyu-Kim
7331cbdea2 fix: address Cubic P2 issues in doctor checks and agent overrides 2026-02-08 22:03:58 +09:00
YeonGyu-Kim
babcb0050a fix: address Cubic P2 issues in CLI modules 2026-02-08 21:57:34 +09:00
YeonGyu-Kim
ce37924fd8 Merge remote-tracking branch 'origin/dev' into refactor/modular-code-enforcement
# Conflicts:
#	src/features/background-agent/manager.ts
#	src/features/background-agent/spawner.ts
#	src/features/tmux-subagent/manager.ts
#	src/shared/model-availability.test.ts
#	src/shared/model-availability.ts
#	src/shared/model-resolution-pipeline.ts
#	src/tools/delegate-task/executor.ts
2026-02-08 21:43:57 +09:00
YeonGyu-Kim
71728e1546 fix: integrate dev model-availability changes lost during merge 2026-02-08 21:32:52 +09:00
YeonGyu-Kim
f67a4df07e fix: integrate dev background_output task_id title resolution 2026-02-08 21:24:08 +09:00
YeonGyu-Kim
9353ac5b9d fix: integrate dev CLAUDE_CODE_TASK_LIST_ID env var support 2026-02-08 21:23:21 +09:00
YeonGyu-Kim
fecc6b8605 fix: remove task-continuation-enforcer references after dev merge
Dev removed task-continuation-enforcer entirely. Remove all remaining
references from plugin hooks, event handler, tool-execute-before, and
config schema to align with origin/dev.
2026-02-08 21:11:07 +09:00
YeonGyu-Kim
34e5eddb49 Merge pull request #1670 from code-yeongyu/fix/migration-once-only-v2
fix: ensure model migration respects intentional downgrades (#1660)
2026-02-08 20:00:52 +09:00
YeonGyu-Kim
441fda9177 fix: migrate config on deep copy, apply to rawConfig only on successful file write (#1660)
Previously, migrateConfigFile() mutated rawConfig directly. If the file
write failed (e.g. read-only file, permissions), the in-memory config was
already changed to the migrated values, causing the plugin to use migrated
models even though the user's file was untouched. On the next run, the
migration would fire again since _migrations was never persisted.

Now all mutations happen on a structuredClone copy. The original rawConfig
is only updated after the file write succeeds. If the write fails,
rawConfig stays untouched and the function returns false.
2026-02-08 19:33:26 +09:00
YeonGyu-Kim
46a30cd7ec Merge remote-tracking branch 'origin/dev' into refactor/modular-code-enforcement
# Conflicts:
#	src/agents/utils.ts
#	src/config/schema.ts
#	src/features/background-agent/spawner/background-session-creator.ts
#	src/features/background-agent/spawner/parent-directory-resolver.ts
#	src/features/background-agent/spawner/tmux-callback-invoker.ts
#	src/features/tmux-subagent/manager.ts
#	src/hooks/interactive-bash-session/index.ts
#	src/hooks/task-continuation-enforcer.test.ts
#	src/index.ts
#	src/plugin-handlers/config-handler.test.ts
#	src/tools/background-task/tools.ts
#	src/tools/call-omo-agent/tools.ts
#	src/tools/delegate-task/executor.ts
2026-02-08 19:05:41 +09:00
YeonGyu-Kim
006e6ade02 test(delegate-task): reset Bun mocks per test 2026-02-08 18:50:16 +09:00
YeonGyu-Kim
aa447765cb feat(shared/git-worktree, features): add git diff stats utility and infrastructure improvements
- Add collect-git-diff-stats utility for git worktree operations
- Add comprehensive test coverage for git diff stats collection
- Enhance claude-tasks storage module
- Improve tmux subagent manager initialization
- Support better git-based task tracking and analysis

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 18:41:45 +09:00
YeonGyu-Kim
bdaa8fc6c1 refactor(tools/delegate-task): enhance skill resolution and type safety
- Add improved type definitions for skill resolution
- Enhance executor with better type safety for delegation flows
- Add comprehensive test coverage for delegation tool behavior
- Improve code organization for skill resolver integration

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 18:41:39 +09:00
YeonGyu-Kim
7788ba3d8a refactor(shared): improve model availability and resolution module structure
- Use namespace import for connected-providers-cache for better clarity
- Add explicit type annotation for modelsByProvider to improve type safety
- Update tests to reflect refactored module organization
- Improve code organization while maintaining functionality

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 18:41:35 +09:00
YeonGyu-Kim
1324fee30f feat(cli/run, background-agent): manage session permissions for CLI and background tasks
- Deny question prompts in CLI run mode since there's no TUI to answer them
- Inherit parent session permission rules in background task sessions
- Force deny questions while preserving other parent permission settings
- Add test coverage for permission inheritance behavior

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 18:41:26 +09:00
YeonGyu-Kim
cbb7771525 fix: prevent command injection in git diff stats collection
Replace execSync with string commands with execFileSync using argument
arrays to avoid shell interpretation of file paths with special chars.
2026-02-08 18:39:36 +09:00
YeonGyu-Kim
d5f0e75b7d fix: restore permission config in background session creation
Add permission: [{ permission: 'question', action: 'deny', pattern: '*' }]
to client.session.create() call to prevent background sessions from
asking questions that go unanswered, causing hangs.
2026-02-08 18:39:36 +09:00
YeonGyu-Kim
c9be2e1696 refactor: extract model selection logic from delegate-task into focused modules
- Create available-models.ts for model availability checking
- Create model-selection.ts for category-to-model resolution logic
- Update category-resolver, subagent-resolver, and sync modules to import
  from new focused modules instead of monolithic sources
2026-02-08 18:03:15 +09:00
YeonGyu-Kim
caf08af88b fix: resolve test isolation failures in task-continuation-enforcer and config-handler tests
- Change BackgroundManager import to type-only to prevent global process
  listener pollution across parallel test files
- Replace real BackgroundManager construction with createMockBackgroundManager
- Fix nested spyOn in config-handler tests to reuse beforeEach spy via
  mockResolvedValue instead of re-spying inside test bodies
2026-02-08 18:03:08 +09:00
YeonGyu-Kim
e663d7b335 refactor(shared): update model-availability tests to use split modules
Migrate imports from monolithic `model-availability` to split modules
(`model-name-matcher`, `available-models-fetcher`, `model-cache-availability`).
Replace XDG_CACHE_HOME env var manipulation with `mock.module` for
`data-path`, ensuring test isolation without polluting process env.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-08 18:00:19 +09:00
YeonGyu-Kim
e257bff31c fix(plugin-handlers): remove as any type assertions in config-handler tests
Replace unsafe `as any` casts on `createBuiltinAgents` spy with properly
typed `as unknown as { mockResolvedValue: ... }` pattern. Adds bun-types
reference directive.

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-08 18:00:12 +09:00
YeonGyu-Kim
23bca2b4d5 feat(tools/background-task): resolve background_output task_id title 2026-02-08 17:54:59 +09:00
YeonGyu-Kim
83a05630cd feat(tools/delegate-task): add skill-resolver module
- Add skill-resolver.ts for resolving skill configurations
- Handles skill loading and configuration resolution
- Part of modular delegate-task refactoring effort

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 17:52:34 +09:00
YeonGyu-Kim
6717349e5b feat(claude-tasks): add CLAUDE_CODE_TASK_LIST_ID env var support
- Export session-storage from claude-tasks/index.ts
- Add CLAUDE_CODE_TASK_LIST_ID fallback support in storage.ts
- Add comprehensive tests for CLAUDE_CODE_TASK_LIST_ID handling
- Prefer ULTRAWORK_TASK_LIST_ID, fall back to CLAUDE_CODE_TASK_LIST_ID
- Both env vars are properly sanitized for path safety

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 17:52:16 +09:00
YeonGyu-Kim
ee72c45552 refactor(tools/background-task): split tools.ts into focused modules under 200 LOC
- Create modules/ directory with 6 focused modules:
  - background-task.ts: task creation logic
  - background-output.ts: output retrieval logic
  - background-cancel.ts: cancellation logic
  - formatters.ts: message formatting utilities
  - message-processing.ts: message extraction utilities
  - utils.ts: shared utility functions
- Reduce tools.ts from ~798 to ~30 lines (barrel pattern)
- Add new types to types.ts for module interfaces
- Update index.ts for clean re-exports
- Follow modular code architecture (200 LOC limit)

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 17:52:00 +09:00
YeonGyu-Kim
9377c7eba9 refactor(hooks/interactive-bash-session): split monolithic hook into modules
- Convert index.ts to clean barrel export
- Extract hook implementation to hook.ts
- Extract terminal parsing to parser.ts
- Extract state management to state-manager.ts
- Reduce index.ts from ~276 to ~5 lines
- Follow modular code architecture principles

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 17:51:48 +09:00
YeonGyu-Kim
f1316bc800 refactor(tmux-subagent): split manager.ts into focused modules
- Extract polling logic to polling-manager.ts
- Extract session cleanup to session-cleaner.ts
- Extract session spawning to session-spawner.ts
- Extract cleanup logic to manager-cleanup.ts
- Reduce manager.ts from ~495 to ~345 lines
- Follow modular code architecture (200 LOC limit)

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 17:51:38 +09:00
YeonGyu-Kim
1f8f7b592b docs(AGENTS): update line counts and stats across all AGENTS.md files
- Update main AGENTS.md with current file sizes
- Update complexity hotspot line counts
- Update agent count from 11 to 32 files
- Update CLI utility count to 70
- Update test file count from 100+ to 163

🤖 Generated with assistance of OhMyOpenCode
2026-02-08 17:51:30 +09:00
YeonGyu-Kim
c6fafd6624 fix: remove task-continuation-enforcer and restore task tool titles 2026-02-08 17:49:22 +09:00
YeonGyu-Kim
42dbc8f39c Fix Issue #1428: Deny bash permission for Prometheus agent
- Change PROMETHEUS_PERMISSION bash from 'allow' to 'deny' to prevent unrestricted bash execution
- Prometheus is a read-only planner and should not execute bash commands
- The prometheus-md-only hook provides additional blocking as backup
2026-02-08 17:37:44 +09:00
YeonGyu-Kim
6bb9a3b7bc refactor(tools/call-omo-agent): split tools.ts into focused modules under 200 LOC
- Extract getMessageDir to message-dir.ts
- Extract executeBackground to background-executor.ts
- Extract session creation logic to session-creator.ts
- Extract polling logic to completion-poller.ts
- Extract message processing to message-processor.ts
- Create sync-executor.ts to orchestrate sync execution
- Add ToolContextWithMetadata type to types.ts
- tools.ts now <200 LOC and focused on tool definition
2026-02-08 17:37:44 +09:00
YeonGyu-Kim
f3f6ba47fe merge: integrate origin/dev into modular-enforcement branch
Resolves all merge conflicts, preserving our split module structure
while integrating all dev changes:
- Custom agent summaries support (parseRegisteredAgentSummaries)
- Background notification queue (enqueueNotificationForParent)
- Atlas shared git-worktree module (collectGitDiffStats, formatFileChanges)
- Ralph-loop withTimeout + DEFAULT_API_TIMEOUT=5000
- Session recovery assistant_prefill_unsupported error type
- Atlas agentOverrides forwarding
- Config handler plan model demotion (buildPlanDemoteConfig)
- Delegate-task agentOverrides, promptSyncWithModelSuggestionRetry, variant
- LSP init timeout + stale init detection
- isPlanFamily function + task-continuation-enforcer hook
- Handoff command
2026-02-08 17:34:47 +09:00
YeonGyu-Kim
984da95f15 Merge pull request #1664 from code-yeongyu/fix/prometheus-plan-family
fix: add isPlanFamily() for prometheus↔plan mutual blocking and task permission
2026-02-08 16:49:45 +09:00
YeonGyu-Kim
bb86523240 fix: add isPlanFamily for prometheus↔plan mutual blocking and task permission
- PLAN_AGENT_NAMES = ['plan'] (system prompt only)
- PLAN_FAMILY_NAMES = ['plan', 'prometheus'] (blocking + task permission)
- prometheus↔plan mutual delegation blocked via isPlanFamily()
- prometheus gets task tool permission via isPlanFamily()
- prompt-builder unchanged: prometheus does NOT get plan system prompt
2026-02-08 16:48:52 +09:00
YeonGyu-Kim
f2b7b759c8 Merge pull request #1173 from code-yeongyu/feature/handoff
feat(commands): add /handoff builtin command for context continuation
2026-02-08 16:44:25 +09:00
YeonGyu-Kim
a5af7e95c0 Merge pull request #1536 from code-yeongyu/feat/task-continuation-enforcer
feat(hooks): implement task-continuation-enforcer
2026-02-08 16:43:42 +09:00
justsisyphus
a5489718f9 feat(commands): add /handoff builtin command with programmatic context synthesis
Port handoff concept from ampcode as a builtin command that extracts
detailed context summary from current session for seamless continuation
in a new session. Enhanced with programmatic context gathering:

- Add HANDOFF_TEMPLATE with phased extraction (gather programmatic
  context via session_read/todoread/git, extract context, format, instruct)
- Gather concrete data: session history, todo state, git diff/status
- Include compaction-style sections: USER REQUESTS (AS-IS) verbatim,
  EXPLICIT CONSTRAINTS verbatim, plus all original handoff sections
- Register handoff in BuiltinCommandName type and command definitions
- Include session context variables (SESSION_ID, TIMESTAMP, ARGUMENTS)
- Add 14 tests covering registration, template content, programmatic
  gathering, compaction-style sections, and emoji-free constraint
2026-02-08 16:38:53 +09:00
YeonGyu-Kim
cd5485a472 Merge pull request #1663 from code-yeongyu/fix/revert-load-skills-default
fix: revert load_skills default and enforce via prompts instead
2026-02-08 16:36:53 +09:00
YeonGyu-Kim
582e0ead27 fix: revert load_skills default and enforce via prompts instead
Revert .default([]) on load_skills schema back to required, restore the runtime error for missing load_skills, and add explicit load_skills=[] to all task() examples in agent prompts that were missing it.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-08 16:31:02 +09:00
YeonGyu-Kim
598a4389d1 refactor(core): split index.ts and config-handler.ts into focused modules
Main entry point:
- create-hooks.ts, create-tools.ts, create-managers.ts
- plugin-interface.ts: plugin interface types
- plugin/ directory: plugin lifecycle modules

Config handler:
- agent-config-handler.ts, command-config-handler.ts
- tool-config-handler.ts, mcp-config-handler.ts
- provider-config-handler.ts, category-config-resolver.ts
- agent-priority-order.ts, prometheus-agent-config-builder.ts
- plugin-components-loader.ts
2026-02-08 16:25:25 +09:00
YeonGyu-Kim
d525958a9d refactor(cli): split install.ts and model-fallback.ts into focused modules
Install pipeline:
- cli-installer.ts, tui-installer.ts, tui-install-prompts.ts
- install-validators.ts

Model fallback:
- model-fallback-types.ts, fallback-chain-resolution.ts
- provider-availability.ts, provider-model-id-transform.ts
2026-02-08 16:25:12 +09:00
YeonGyu-Kim
3c1e71f256 refactor(cli): split doctor/model-resolution and run/events into focused modules
Doctor checks:
- model-resolution-cache.ts, model-resolution-config.ts
- model-resolution-details.ts, model-resolution-effective-model.ts
- model-resolution-types.ts, model-resolution-variant.ts

Run events:
- event-formatting.ts, event-handlers.ts
- event-state.ts, event-stream-processor.ts
2026-02-08 16:25:01 +09:00
YeonGyu-Kim
4e5792ce4d refactor(shared): split model-availability.ts into model resolution modules
Extract model availability checking pipeline:
- available-models-fetcher.ts: top-level model fetching orchestration
- model-cache-availability.ts, models-json-cache-reader.ts
- provider-models-cache-model-reader.ts: provider cache reading with null guard
- fallback-model-availability.ts, model-name-matcher.ts
- open-code-client-accessors.ts, open-code-client-shapes.ts
- record-type-guard.ts
2026-02-08 16:24:52 +09:00
YeonGyu-Kim
052beb364f refactor(task-tool): split task.ts into per-action modules
Extract CRUD actions into dedicated modules:
- task-action-create.ts, task-action-get.ts
- task-action-list.ts, task-action-update.ts, task-action-delete.ts
- task-id-validator.ts: ID validation logic
2026-02-08 16:24:43 +09:00
YeonGyu-Kim
4400e18a52 refactor(slashcommand): split tools.ts into discovery and formatting modules
Extract slash command tool internals:
- command-discovery.ts: command finding and listing
- command-output-formatter.ts: output formatting
- skill-command-converter.ts: skill-to-command conversion
- slashcommand-description.ts: tool description generation
- slashcommand-tool.ts: core tool definition
2026-02-08 16:24:34 +09:00
YeonGyu-Kim
480dcff420 refactor(look-at): split tools.ts into argument parsing and extraction modules
Extract multimodal look-at tool internals:
- look-at-arguments.ts: argument validation and parsing
- assistant-message-extractor.ts: response extraction
- mime-type-inference.ts: file type detection
- multimodal-agent-metadata.ts: agent metadata constants
2026-02-08 16:24:21 +09:00
YeonGyu-Kim
6e0f6d53a7 refactor(call-omo-agent): split tools.ts into agent execution modules
Extract agent call pipeline:
- agent-type-normalizer.ts, tool-context-with-metadata.ts
- subagent-session-creator.ts, subagent-session-prompter.ts
- sync-agent-executor.ts, background-agent-executor.ts
- session-completion-poller.ts, session-message-output-extractor.ts
- message-storage-directory.ts
2026-02-08 16:24:13 +09:00
YeonGyu-Kim
76fad73550 refactor(ast-grep): split cli.ts and constants.ts into focused modules
Extract AST-grep tooling into single-responsibility files:
- cli-binary-path-resolution.ts, sg-cli-path.ts
- environment-check.ts, language-support.ts
- process-output-timeout.ts, sg-compact-json-output.ts
2026-02-08 16:24:03 +09:00
YeonGyu-Kim
e4583668c0 refactor(hooks): split session-notification and unstable-agent-babysitter
Extract notification and babysitter logic:
- session-notification-formatting.ts, session-notification-scheduler.ts
- session-notification-sender.ts, session-todo-status.ts
- task-message-analyzer.ts: message analysis for babysitter hook
2026-02-08 16:23:56 +09:00
YeonGyu-Kim
2d22a54b55 refactor(rules-injector): split finder.ts into rule discovery modules
Extract rule finding logic:
- project-root-finder.ts: project root detection
- rule-file-finder.ts: rule file discovery
- rule-file-scanner.ts: filesystem scanning for rules
- rule-distance.ts: rule-to-file distance calculation
2026-02-08 16:22:33 +09:00
YeonGyu-Kim
c2efdb4334 refactor(interactive-bash-session): extract tracker and command parser
Split hook into focused modules:
- interactive-bash-session-tracker.ts: session tracking logic
- tmux-command-parser.ts: tmux command parsing utilities
2026-02-08 16:22:25 +09:00
YeonGyu-Kim
d3a3f0c3a6 refactor(claude-code-hooks): extract handlers and session state
Split hook into per-concern modules:
- handlers/ directory for individual hook handlers
- session-hook-state.ts: session-level hook state management
2026-02-08 16:22:17 +09:00
YeonGyu-Kim
0f145b2e40 refactor(ralph-loop): split hook into state controller and event handler modules
Extract Ralph loop lifecycle management:
- loop-state-controller.ts: start/stop/recovery state machine
- ralph-loop-event-handler.ts: event handling logic
- continuation-prompt-builder.ts, continuation-prompt-injector.ts
- completion-promise-detector.ts, loop-session-recovery.ts
- message-storage-directory.ts
2026-02-08 16:22:10 +09:00
YeonGyu-Kim
161d6e4159 refactor(context-window-recovery): split executor and storage into focused modules
Extract recovery strategies and storage management:
- recovery-strategy.ts, aggressive-truncation-strategy.ts
- summarize-retry-strategy.ts, target-token-truncation.ts
- empty-content-recovery.ts, message-builder.ts
- tool-result-storage.ts, storage-paths.ts, state.ts
- client.ts, tool-part-types.ts
2026-02-08 16:22:01 +09:00
YeonGyu-Kim
8dff42830c refactor(builtin-skills): extract git-master metadata to separate module
Split prompt-heavy git-master.ts:
- git-master-skill-metadata.ts: skill metadata constants (name, desc, agent)
2026-02-08 16:21:50 +09:00
YeonGyu-Kim
9b841c6edc refactor(mcp-oauth): extract OAuth authorization flow from provider.ts
Split provider.ts into focused modules:
- oauth-authorization-flow.ts: OAuth2 authorization code flow logic
2026-02-08 16:21:43 +09:00
YeonGyu-Kim
39dc62c62a refactor(claude-code-plugin-loader): split loader.ts into per-type loaders
Extract plugin component loading into dedicated modules:
- discovery.ts: plugin directory detection
- plugin-path-resolver.ts: path resolution logic
- agent-loader.ts, command-loader.ts, hook-loader.ts
- mcp-server-loader.ts, skill-loader.ts
2026-02-08 16:21:37 +09:00
YeonGyu-Kim
46969935cd refactor(skill-mcp-manager): split manager.ts into connection and client modules
Extract MCP client lifecycle management:
- connection.ts: getOrCreateClientWithRetry logic
- stdio-client.ts, http-client.ts: transport-specific creation
- oauth-handler.ts: OAuth token management
- cleanup.ts: session and global cleanup
- connection-type.ts: connection type detection
2026-02-08 16:21:28 +09:00
YeonGyu-Kim
51ced65b5f refactor(opencode-skill-loader): split loader and merger into focused modules
Extract skill loading pipeline into single-responsibility modules:
- skill-discovery.ts, skill-directory-loader.ts, skill-deduplication.ts
- loaded-skill-from-path.ts, loaded-skill-template-extractor.ts
- skill-template-resolver.ts, skill-definition-record.ts
- git-master-template-injection.ts, allowed-tools-parser.ts
- skill-mcp-config.ts, skill-resolution-options.ts
- merger/ directory for skill merging logic
2026-02-08 16:21:19 +09:00
YeonGyu-Kim
f8b5771443 refactor(tmux-subagent): split manager and decision-engine into focused modules
Extract session lifecycle, polling, grid planning, and event handling:
- polling.ts: session polling controller with stability detection
- event-handlers.ts: session created/deleted handlers
- grid-planning.ts, spawn-action-decider.ts, spawn-target-finder.ts
- session-status-parser.ts, session-message-count.ts
- cleanup.ts, polling-constants.ts, tmux-grid-constants.ts
2026-02-08 16:21:04 +09:00
YeonGyu-Kim
e3bd43ff64 refactor(background-agent): split manager.ts into focused modules
Extract 30+ single-responsibility modules from manager.ts (1556 LOC):
- task lifecycle: task-starter, task-completer, task-canceller, task-resumer
- task queries: task-queries, task-poller, task-queue-processor
- notifications: notification-builder, notification-tracker, parent-session-notifier
- session handling: session-validator, session-output-validator, session-todo-checker
- spawner: spawner/ directory with focused spawn modules
- utilities: duration-formatter, error-classifier, message-storage-locator
- result handling: result-handler-context, background-task-completer
- shutdown: background-manager-shutdown, process-signal
2026-02-08 16:20:52 +09:00
YeonGyu-Kim
0743855b40 Merge pull request #1652 from code-yeongyu/fix-1623-v2
fix(agents): include custom agents in orchestrator delegation prompt (#1623)
2026-02-08 16:02:09 +09:00
YeonGyu-Kim
2588f33075 Merge pull request #1643 from code-yeongyu/fix/exa-api-key-1627
fix(mcp): append EXA_API_KEY to Exa MCP URL when env var is set (#1627)
2026-02-08 16:01:59 +09:00
YeonGyu-Kim
32193dc10d Merge pull request #1658 from code-yeongyu/fix-1233
fix: detect completion tags in ralph/ULW loop (#1233)
2026-02-08 15:51:16 +09:00
YeonGyu-Kim
321b319b58 fix(agents): use config data instead of client API to avoid init deadlock (#1623) 2026-02-08 15:34:47 +09:00
YeonGyu-Kim
c7122b4127 fix: resolve all test failures and Cubic review issues
- Fix unstable-agent-babysitter: add promptAsync to test mock
- Fix claude-code-mcp-loader: isolate tests from user home configs
- Fix npm-dist-tags: encode packageName for scoped packages
- Fix agent-builder: clone source to prevent shared object mutation
- Fix add-plugin-to-opencode-config: handle JSONC with leading comments
- Fix auth-plugins/add-provider-config: error on parse failures
- Fix bun-install: clear timeout on completion
- Fix git-diff-stats: include untracked files in diff summary
2026-02-08 15:31:32 +09:00
YeonGyu-Kim
a3dd1dbaf9 test(mcp): restore Tavily tests and add encoding edge case (#1627) 2026-02-08 15:28:31 +09:00
YeonGyu-Kim
4c1e369176 Merge pull request #1657 from code-yeongyu/fix-1366-lsp-unblock
fix(lsp): reset safety block on server restart (#1366)
2026-02-08 15:13:30 +09:00
YeonGyu-Kim
119e18c810 refactor: wave 2 - split atlas, auto-update-checker, session-recovery, todo-enforcer, background-task hooks
- Extract atlas/ into 15 focused modules (hook, event handler, tool policies, types, etc.)
- Split auto-update-checker into checker/ and hook/ subdirectories with single-purpose files
- Decompose session-recovery into separate recovery strategy files per error type
- Extract todo-continuation-enforcer from monolith to directory with dedicated modules
- Split background-task/tools.ts into individual tool creator files
- Extract command-executor, tmux-utils into focused sub-modules
- Split config/schema.ts into domain-specific schema files
- Decompose cli/config-manager.ts into focused modules
- Rollback skill-mcp-manager, model-availability, index.ts splits that broke tests
- Fix all import path depths for moved files (../../ -> ../../../)
- Add explicit type annotations to resolve TS7006 implicit any errors

Typecheck: 0 errors
Tests: 2359 pass, 5 fail (all pre-existing)
2026-02-08 15:01:42 +09:00
YeonGyu-Kim
06611a7645 fix(mcp): remove duplicate x-api-key header, add test (#1627) 2026-02-08 14:56:43 +09:00
YeonGyu-Kim
676ff513fa fix: detect completion tags in ralph/ULW loop to stop iteration (#1233) 2026-02-08 14:50:36 +09:00
YeonGyu-Kim
4738379ad7 fix(lsp): reset safety block on server restart to prevent permanent blocks (#1366) 2026-02-08 14:34:11 +09:00
YeonGyu-Kim
44415e3f59 fix(mcp): remove duplicate x-api-key header from Exa config (#1627) 2026-02-08 14:19:50 +09:00
YeonGyu-Kim
870a2a54f7 Merge pull request #1647 from code-yeongyu/fix/subagent-type-respect-model-config-1357
fix(delegate-task): resolve user agent model config in subagent_type path (#1357)
2026-02-08 14:12:21 +09:00
YeonGyu-Kim
cfd63482d7 Merge pull request #1646 from code-yeongyu/fix/background-task-race-condition-1582
fix(background-agent): serialize parent notifications (#1582)
2026-02-08 14:12:14 +09:00
YeonGyu-Kim
5845604a01 Merge pull request #1656 from code-yeongyu/fix/deny-todo-tools-for-task-system
fix: deny todowrite/todoread per-agent when task_system is enabled
2026-02-08 14:09:29 +09:00
YeonGyu-Kim
74a1d70f57 Merge pull request #1648 from code-yeongyu/fix/category-delegation-respect-agent-model-1295
test: add regression tests for sisyphus-junior model override in category delegation (#1295)
2026-02-08 14:07:15 +09:00
YeonGyu-Kim
89e251da72 Merge pull request #1645 from code-yeongyu/fix/load-skills-default-1493
fix: add default value for load_skills parameter in task tool (#1493)
2026-02-08 14:07:08 +09:00
YeonGyu-Kim
e7f4f6dd13 fix: deny todowrite/todoread per-agent when task_system is enabled
When experimental.task_system is enabled, add todowrite: deny and
todoread: deny to per-agent permissions for all primary agents
(sisyphus, hephaestus, atlas, prometheus, sisyphus-junior).

This ensures the model never sees these tools in its tool list,
complementing the existing global tools config and runtime hook.
2026-02-08 14:05:53 +09:00
YeonGyu-Kim
d8e7e4f170 refactor: extract git worktree parser from atlas hook 2026-02-08 14:01:31 +09:00
YeonGyu-Kim
2db9accfc7 Merge pull request #1655 from code-yeongyu/fix/sync-continuation-variant-loss
fix: preserve variant in sync continuation to maintain thinking budget
2026-02-08 14:00:56 +09:00
YeonGyu-Kim
29155ec7bc refactor: wave 1 - extract leaf modules, rename catch-all files, split index.ts hooks
- Split 25+ index.ts files into hook.ts + extracted modules
- Rename all catch-all utils.ts/helpers.ts to domain-specific names
- Split src/tools/lsp/ into ~15 focused modules
- Split src/tools/delegate-task/ into ~18 focused modules
- Separate shared types from implementation
- 155 files changed, 60+ new files created
- All typecheck clean, 61 tests pass
2026-02-08 13:57:26 +09:00
YeonGyu-Kim
6b4e149881 test: assert variant forwarded in sync continuation 2026-02-08 13:57:13 +09:00
YeonGyu-Kim
7f4338b6ed fix: preserve variant in sync continuation to maintain thinking budget 2026-02-08 13:55:35 +09:00
YeonGyu-Kim
24a013b867 Merge pull request #1653 from code-yeongyu/fix/plan-prometheus-decoupling
fix(delegation): decouple plan from prometheus and fix sync task responses
2026-02-08 13:46:40 +09:00
YeonGyu-Kim
d769b95869 fix(delegation): use blocking prompt for sync tasks instead of polling
Replace promptAsync + manual polling loop with promptSyncWithModelSuggestionRetry
(session.prompt) which blocks until the LLM response completes. This matches
OpenCode's native task tool behavior and fixes empty/broken responses that
occurred when polling declared stability prematurely.

Applied to both executeSyncTask and executeSyncContinuation paths.
2026-02-08 13:42:23 +09:00
YeonGyu-Kim
72cf908738 fix(delegation): decouple plan agent from prometheus - remove aliasing
Remove 'prometheus' from PLAN_AGENT_NAMES so isPlanAgent() no longer
matches prometheus. The only remaining connection is model inheritance
via buildPlanDemoteConfig() in plan-model-inheritance.ts.

- Remove 'prometheus' from PLAN_AGENT_NAMES array
- Update self-delegation error message to say 'plan agent' not 'prometheus'
- Update tests: prometheus is no longer treated as a plan agent
- Update task permission: only plan agents get task tool, not prometheus
2026-02-08 13:42:15 +09:00
YeonGyu-Kim
f035be842d fix(agents): include custom agents in orchestrator delegation prompt (#1623) 2026-02-08 13:34:47 +09:00
YeonGyu-Kim
6ce482668b refactor: extract git worktree parser from atlas hook 2026-02-08 13:30:00 +09:00
YeonGyu-Kim
a85da59358 fix: encode EXA_API_KEY before appending to URL query parameter 2026-02-08 13:28:08 +09:00
YeonGyu-Kim
b88a868173 fix(config): plan agent inherits model settings from prometheus when not explicitly configured
Previously, demoted plan agent only received { mode: 'subagent' } with no
model settings, causing fallback to step-3.5-flash. Now inherits all
model-related settings (model, variant, temperature, top_p, maxTokens,
thinking, reasoningEffort, textVerbosity, providerOptions) from the
resolved prometheus config. User overrides via agents.plan.* take priority.

Prompt, permission, description, and color are intentionally NOT inherited.
2026-02-08 13:22:56 +09:00
YeonGyu-Kim
d0bdf521c3 Merge pull request #1649 from code-yeongyu/feat/anthropic-prefill-recovery
feat: auto-recover from Anthropic assistant message prefill errors
2026-02-08 13:19:38 +09:00
YeonGyu-Kim
7abefcca1f feat: auto-recover from Anthropic assistant message prefill errors
When Anthropic models reject requests with 'This model does not support
assistant message prefill', detect this as a recoverable error type and
automatically send 'Continue' once to resume the conversation.

Extends session-recovery hook with new 'assistant_prefill_unsupported'
error type. The existing session.error handler in index.ts already sends
'continue' after successful recovery, so no additional logic needed.
2026-02-08 13:16:16 +09:00
YeonGyu-Kim
a06364081b fix(delegate-task): resolve user agent model config in subagent_type path (#1357) 2026-02-08 13:14:11 +09:00
YeonGyu-Kim
104b9fbb39 test: add regression tests for sisyphus-junior model override in category delegation (#1295)
Add targeted regression tests for the exact reproduction scenario from issue #1295:
- quick category with sisyphusJuniorModel override (the reported scenario)
- user-defined custom category with sisyphusJuniorModel fallback

The underlying fix was already applied in PRs #1470 and #1556. These tests
ensure the fix does not regress.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-08 13:13:47 +09:00
YeonGyu-Kim
f6fc30ada5 fix: add default value for load_skills parameter in task tool (#1493)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-08 13:09:58 +09:00
YeonGyu-Kim
f1fcc26aaa fix(background-agent): serialize parent notifications (#1582) 2026-02-08 13:05:06 +09:00
YeonGyu-Kim
09999587f5 fix(mcp): append EXA_API_KEY to Exa MCP URL when env var is set (#1627) 2026-02-08 12:38:42 +09:00
github-actions[bot]
139f392d76 release: v3.3.2 2026-02-08 03:38:39 +00:00
YeonGyu-Kim
71ac54c33e Merge pull request #1622 from itsnebulalol/dev 2026-02-08 11:44:40 +09:00
github-actions[bot]
cbeeee4053 @QiRaining has signed the CLA in code-yeongyu/oh-my-opencode#1641 2026-02-08 02:34:48 +00:00
github-actions[bot]
737bda680c @quantmind-br has signed the CLA in code-yeongyu/oh-my-opencode#1634 2026-02-07 18:38:33 +00:00
github-actions[bot]
ff94aa3033 release: v3.3.1 2026-02-07 17:48:30 +00:00
YeonGyu-Kim
d0c4085ae1 release: v3.3.1 2026-02-08 02:45:38 +09:00
YeonGyu-Kim
56f9de4652 Merge pull request #1632 from code-yeongyu/fix/look-at-sync-prompt
fix(look-at): use synchronous prompt to fix race condition (#1620 regression)
2026-02-08 02:45:06 +09:00
YeonGyu-Kim
b2661be833 test: fix ralph-loop tests by adding promptAsync to mock
The ralph-loop hook calls promptAsync in the implementation, but the
test mock only defined prompt(). Added promptAsync with identical
behavior to make tests pass.

- All 38 ralph-loop tests now pass
- Total test suite: 2361 pass, 3 fail (unrelated to this change)
2026-02-08 02:41:29 +09:00
YeonGyu-Kim
3d4ed912d7 fix(look-at): use synchronous prompt to fix race condition (#1620 regression)
PR #1620 migrated all prompt calls from session.prompt (blocking) to
session.promptAsync (fire-and-forget HTTP 204). This broke look_at which
needs the multimodal-looker response to be available immediately after
the prompt call returns.

Fix: add promptSyncWithModelSuggestionRetry() that uses session.prompt
(blocking) with model suggestion retry support. look_at now uses this
sync variant while all other callers keep using promptAsync.

- Add promptSyncWithModelSuggestionRetry to model-suggestion-retry.ts
- Switch look_at from promptWithModelSuggestionRetry to sync variant
- Add comprehensive tests for the new sync function
- No changes to other callers (delegate-task, background-agent)
2026-02-08 02:36:27 +09:00
github-actions[bot]
9a338b16f1 @mkusaka has signed the CLA in code-yeongyu/oh-my-opencode#1629 2026-02-07 16:54:49 +00:00
github-actions[bot]
471bc6e52d @itsnebulalol has signed the CLA in code-yeongyu/oh-my-opencode#1622 2026-02-07 15:11:05 +00:00
Dominic Frye
0cbbdd566e fix(cli): enable positional options on parent command for passThroughOptions 2026-02-07 10:06:13 -05:00
github-actions[bot]
825a5e70f7 release: v3.3.0 2026-02-07 14:47:32 +00:00
YeonGyu-Kim
18c161a9cd Merge pull request #1620 from potb/acp-json-error
fix: switch session.prompt() to promptAsync() — delegate broken in ACP
2026-02-07 22:52:39 +09:00
Peïo Thibault
414cecd7df test: add promptAsync mocks to all test files for promptAsync migration 2026-02-07 14:41:46 +01:00
YeonGyu-Kim
2b541b8725 Merge pull request #1621 from code-yeongyu/fix/814-mcp-config-both-paths
fix(mcp-loader): read both ~/.claude.json and ~/.claude/.mcp.json for user MCP config
2026-02-07 22:33:13 +09:00
YeonGyu-Kim
ac6e7d00f2 fix(mcp-loader): also read ~/.claude/.mcp.json for CLI-managed user MCP config
PR #1616 replaced ~/.claude/.mcp.json with ~/.claude.json but both paths
should be read:
- ~/.claude.json: user/local scope MCP settings (mcpServers field)
- ~/.claude/.mcp.json: CLI-managed MCP servers (claude mcp add)

Fixes #814
2026-02-07 22:29:51 +09:00
Peïo Thibault
fa77be0daf chore: remove testing guide from branch 2026-02-07 14:14:06 +01:00
Peïo Thibault
13da4ef4aa docs: add comprehensive local testing guide for acp-json-error branch 2026-02-07 14:07:55 +01:00
Peïo Thibault
6451b212f8 test(todo-continuation): add promptAsync mocks for migrated hook 2026-02-07 13:51:28 +01:00
Peïo Thibault
fad7354b13 fix(look-at): remove isJsonParseError band-aid (root cause fixed) 2026-02-07 13:46:03 +01:00
Peïo Thibault
55dc64849f fix(tools): switch session.prompt to promptAsync in delegate-task and call-omo-agent 2026-02-07 13:43:06 +01:00
Peïo Thibault
e984a5c639 test(shared): update model-suggestion-retry tests for promptAsync passthrough 2026-02-07 13:42:49 +01:00
Peïo Thibault
46e02b9457 fix(hooks): switch session.prompt to promptAsync in all hooks 2026-02-07 13:42:24 +01:00
Peïo Thibault
5f21ddf473 fix(background-agent): switch session.prompt to promptAsync 2026-02-07 13:42:20 +01:00
Peïo Thibault
108e860ddd fix(core): switch compatibility shim to promptAsync 2026-02-07 13:42:19 +01:00
Peïo Thibault
b8221a883e fix(shared): switch promptWithModelSuggestionRetry to use promptAsync 2026-02-07 13:38:25 +01:00
YeonGyu-Kim
2c394cd497 Merge pull request #1616 from code-yeongyu/fix/814-user-mcp-config
fix(mcp-loader): read user-level MCP config from ~/.claude.json (#814)
2026-02-07 20:09:53 +09:00
YeonGyu-Kim
d84a1c9e95 Merge pull request #1618 from code-yeongyu/fix/594-user-prompt-submit-fires-once
fix(hooks): fire UserPromptSubmitHooks on every prompt, not just first (#594)
2026-02-07 20:09:19 +09:00
YeonGyu-Kim
cf29cd137e test: isolate user-level MCP config test from real homedir 2026-02-07 20:06:58 +09:00
YeonGyu-Kim
d3f8c7d288 Merge pull request #1615 from code-yeongyu/fix/1563-browser-provider-gating
fix(skill-loader): filter discovered skills by browserProvider (#1563)
2026-02-07 20:04:08 +09:00
YeonGyu-Kim
d1659152bc fix(hooks): fire UserPromptSubmitHooks on every prompt, not just first (#594) 2026-02-07 20:03:52 +09:00
YeonGyu-Kim
1cb8f8bee6 Merge pull request #1584 from code-yeongyu/fix/441-matcher-hooks-undefined
fix(hooks): add defensive null check for matcher.hooks to prevent Windows crash (#441)
2026-02-07 20:01:28 +09:00
YeonGyu-Kim
1760367a25 fix(mcp-loader): read user-level MCP config from ~/.claude.json (#814) 2026-02-07 20:01:16 +09:00
YeonGyu-Kim
747edcb6e6 fix(skill-loader): filter discovered skills by browserProvider (#1563) 2026-02-07 20:01:15 +09:00
YeonGyu-Kim
f3540a9ea3 Merge pull request #1614 from code-yeongyu/fix/1501-ulw-plan-loop
fix(ultrawork): widen isPlannerAgent matching to prevent ULW infinite plan loop (#1501)
2026-02-07 19:59:41 +09:00
YeonGyu-Kim
8280e45fe1 Merge pull request #1613 from code-yeongyu/fix/1561-dead-migration
fix(migration): remove task_system backup rewrite (#1561)
2026-02-07 19:57:22 +09:00
YeonGyu-Kim
0eddd28a95 fix: skip ultrawork injection for plan-like agents (#1501)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:52:47 +09:00
YeonGyu-Kim
36e54acc51 fix(migration): stop task_system backup writes (#1561)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:51:22 +09:00
YeonGyu-Kim
817c593e12 refactor(migration): split model and category helpers (#1561)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:51:15 +09:00
YeonGyu-Kim
3ccef5d9b3 refactor(migration): extract agent and hook maps (#1561)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:51:08 +09:00
YeonGyu-Kim
ae4e113c7e Merge pull request #1610 from code-yeongyu/fix/96-compaction-dedup-recovery
fix: wire deduplication into compaction recovery for prompt-too-long errors (#96)
2026-02-07 19:28:49 +09:00
YeonGyu-Kim
403457f9e4 fix: rewrite dedup recovery test to mock module instead of filesystem 2026-02-07 19:26:06 +09:00
YeonGyu-Kim
5e5c091356 Merge pull request #1611 from code-yeongyu/fix/1481-1483-compaction
fix: prevent compaction from inserting arbitrary constraints and preserve todo state (#1481, #1483)
2026-02-07 19:23:50 +09:00
YeonGyu-Kim
1df025ad44 fix: use lazy storage dir resolution to fix CI test flakiness 2026-02-07 19:23:24 +09:00
YeonGyu-Kim
844ac26e2a fix: wire deduplication into compaction recovery for prompt-too-long errors (#96)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:18:12 +09:00
YeonGyu-Kim
2727f0f429 refactor: extract context window recovery hook
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:17:55 +09:00
YeonGyu-Kim
89b1205ccf Merge pull request #1607 from code-yeongyu/fix/358-skill-description-truncation
fix: use character limit instead of sentence split for skill description (#358)
2026-02-07 19:17:27 +09:00
YeonGyu-Kim
d44f5db1e2 Merge pull request #1608 from code-yeongyu/fix/114-cascade-cancel
fix: cascade cancel descendant tasks when parent session is deleted (#114)
2026-02-07 19:16:18 +09:00
YeonGyu-Kim
180fcc3e5d fix: register compaction todo preserver
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:15:52 +09:00
YeonGyu-Kim
3947084cc5 fix: add compaction todo preserver hook
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:15:46 +09:00
YeonGyu-Kim
67f701cd9e fix: avoid invented compaction constraints
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:15:41 +09:00
YeonGyu-Kim
f94ae2032c fix: ensure truncated result stays within maxLength limit 2026-02-07 19:13:35 +09:00
YeonGyu-Kim
c81384456c Merge pull request #1606 from code-yeongyu/fix/658-tools-ctx-directory
fix: use ctx.directory instead of process.cwd() in tools for Desktop app support
2026-02-07 19:12:25 +09:00
YeonGyu-Kim
9040383da7 fix: cascade cancel descendant tasks when parent session is deleted (#114)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:10:49 +09:00
YeonGyu-Kim
c688e978fd fix: update session-manager tests to use factory pattern 2026-02-07 19:10:14 +09:00
YeonGyu-Kim
a0201e17b9 fix: use character limit instead of sentence split for skill description (#358)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:08:08 +09:00
YeonGyu-Kim
dbbec868d5 Merge pull request #1605 from code-yeongyu/fix/919-commit-footer-v2
fix: allow string values for commit_footer config (#919)
2026-02-07 19:07:15 +09:00
YeonGyu-Kim
6e2f3b1f50 Merge pull request #1593 from code-yeongyu/fix/prometheus-plan-overwrite
fix: allow Prometheus to overwrite .sisyphus/*.md plan files
2026-02-07 19:04:47 +09:00
YeonGyu-Kim
e4bbd6bf15 fix: allow string values for commit_footer config (#919) 2026-02-07 19:04:34 +09:00
YeonGyu-Kim
476f154ef5 fix: use ctx.directory instead of process.cwd() in tools for Desktop app support
Convert grep, glob, ast-grep, and session-manager tools from static exports to factory functions that receive PluginInput context. This allows them to use ctx.directory instead of process.cwd(), fixing issue #658 where tools search from wrong directory in OpenCode Desktop app.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-07 19:04:31 +09:00
YeonGyu-Kim
83519cae11 Merge pull request #1604 from code-yeongyu/fix/957-allowed-agents-dynamic
fix: expand ALLOWED_AGENTS to include all subagent-capable agents (#957)
2026-02-07 19:01:43 +09:00
YeonGyu-Kim
9a8f03462f fix: normalize resolvedPath before startsWith check
Addresses cubic review feedback — resolvedPath may contain
non-canonical segments when filePath is absolute, causing
the startsWith check against sisyphusRoot to fail.
2026-02-07 19:01:28 +09:00
YeonGyu-Kim
daf6c7a19e Merge pull request #1594 from code-yeongyu/fix/boulder-stop-continuation
fix: /stop-continuation now cancels boulder continuation
2026-02-07 19:00:57 +09:00
YeonGyu-Kim
2bb82c250c fix: expand ALLOWED_AGENTS to include all subagent-capable agents 2026-02-07 18:57:47 +09:00
YeonGyu-Kim
8e92704316 Merge pull request #1603 from code-yeongyu/fix/1269-windows-which-detection
fix: use platform-aware binary detection on Windows (#1269)
2026-02-07 18:51:28 +09:00
YeonGyu-Kim
f980e256dd fix: boulder continuation now respects /stop-continuation guard
Add isContinuationStopped check to atlas hook's session.idle handler
so boulder continuation stops when user runs /stop-continuation.

Previously, todo continuation and session recovery checked the guard,
but boulder continuation did not — causing work to resume after stop.

Fixes #1575
2026-02-07 18:50:13 +09:00
YeonGyu-Kim
4d19a22679 Merge pull request #1601 from code-yeongyu/fix/899-cli-run-dash-args
fix: allow dash-prefixed arguments in CLI run command (#899)
2026-02-07 18:49:26 +09:00
YeonGyu-Kim
e1010846c4 Merge pull request #1602 from code-yeongyu/fix/1365-sg-cli-path-fallback
fix: don't fallback to system sg command for ast-grep (#1365)
2026-02-07 18:49:19 +09:00
YeonGyu-Kim
38169523c4 fix: anchor .sisyphus path check to ctx.directory to prevent false positives
- Uses path.join(ctx.directory, '.sisyphus') + sep as prefix instead of loose .includes()
- Prevents false positive when .sisyphus exists in parent directories outside project root
- Adds test for the false positive case (cubic review feedback)
2026-02-07 18:49:16 +09:00
YeonGyu-Kim
b98697238b fix: use platform-aware binary detection (where on Windows, which on Unix) 2026-02-07 18:48:14 +09:00
YeonGyu-Kim
d5b6a7c575 fix: allow dash-prefixed arguments in CLI run command 2026-02-07 18:46:40 +09:00
YeonGyu-Kim
78a08959f6 Merge pull request #1597 from code-yeongyu/fix/899-cli-run-dash-args
fix: allow dash-prefixed arguments in CLI run command (#899)
2026-02-07 18:46:33 +09:00
YeonGyu-Kim
db6a899297 Merge pull request #1595 from code-yeongyu/fix/tool-name-whitespace
fix: trim whitespace from tool names before matching
2026-02-07 18:46:09 +09:00
YeonGyu-Kim
7fdbabb264 fix: don't fallback to system 'sg' command for ast-grep
On Linux systems, 'sg' is a mailutils command, not ast-grep. The previous
fallback would silently run the wrong binary when ast-grep wasn't found.

Changes:
- getSgCliPath() now returns string | null instead of string
- Fallback changed from 'sg' to null
- Call sites now check for null and return user-facing error with
  installation instructions
- checkEnvironment() updated to handle null path

Fixes #1365
2026-02-07 18:46:01 +09:00
YeonGyu-Kim
b3ebf6c124 fix: allow dash-prefixed arguments in CLI run command 2026-02-07 18:41:53 +09:00
YeonGyu-Kim
8a1b398119 Merge pull request #1592 from code-yeongyu/fix/issue-1570-onetime-migration
fix: make model migration run only once by storing history
2026-02-07 18:29:31 +09:00
YeonGyu-Kim
66419918f9 fix: make model migration run only once by storing history in _migrations field
- Add _migrations field to OhMyOpenCodeConfigSchema to track applied migrations
- Update migrateModelVersions() to accept appliedMigrations Set and return newMigrations array
- Skip migrations that are already in _migrations (preserves user reverts)
- Update migrateConfigFile() to read/write _migrations field
- Add 8 new tests for migration history tracking

Fixes #1570
2026-02-07 18:25:23 +09:00
YeonGyu-Kim
755a3a94c8 Merge pull request #1590 from code-yeongyu/feat/run-cli-extensions
feat(cli): extend run command with port, attach, session-id, on-complete, and json options
2026-02-07 18:05:11 +09:00
YeonGyu-Kim
5e316499e5 fix: explicitly pass encoding/callback args through stdout.write wrapper 2026-02-07 18:01:33 +09:00
YeonGyu-Kim
266c045b69 fix(test): remove shadowed consoleErrorSpy declarations in on-complete-hook tests
Remove duplicate consoleErrorSpy declarations in 'command failure' and
'spawn error' tests that shadowed the outer beforeEach/afterEach-managed
spy. The inner declarations created a second spy on the already-spied
console.error, causing restore confusion and potential test leakage.
2026-02-07 17:54:56 +09:00
YeonGyu-Kim
eafcac1593 fix: address cubic 4/5 review issues
- Preserve encoding/callback args in stdout.write wrapper (json-output.ts)
- Restore global console spy in afterEach (server-connection.test.ts)
- Restore console.error spy in afterEach (on-complete-hook.test.ts)
2026-02-07 17:39:16 +09:00
YeonGyu-Kim
7927d3675d Merge pull request #1585 from code-yeongyu/fix/1559-crash-boundary
fix: add error boundaries for plugin loading and hook creation (#1559)
2026-02-07 17:34:59 +09:00
YeonGyu-Kim
4059d02047 fix(test): mock SDK and port-utils in integration test to prevent CI failure
The 'port with available port starts server' test was calling
createOpencode from the SDK which spawns an actual opencode binary.
CI environments don't have opencode installed, causing ENOENT.

Mock @opencode-ai/sdk and port-utils (same pattern as
server-connection.test.ts) so the test verifies integration
logic without requiring the binary.
2026-02-07 17:34:29 +09:00
YeonGyu-Kim
c2dfcadbac fix: clear race timeout after plugin loading settles 2026-02-07 17:31:01 +09:00
YeonGyu-Kim
e343e625c7 feat(cli): extend run command with port, attach, session-id, on-complete, and json options
Implement all 5 CLI extension options for external orchestration:

- --port <port>: Start server on port, or attach if port occupied
- --attach <url>: Connect to existing opencode server
- --session-id <id>: Resume existing session instead of creating new
- --on-complete <command>: Execute shell command with env vars on completion
- --json: Output structured RunResult JSON to stdout

Refactor runner.ts into focused modules:
- agent-resolver.ts: Agent resolution logic
- server-connection.ts: Server connection management
- session-resolver.ts: Session create/resume with retry
- json-output.ts: Stdout redirect + JSON emission
- on-complete-hook.ts: Shell command execution with env vars

Fixes #1586
2026-02-07 17:26:33 +09:00
YeonGyu-Kim
050e6a2187 fix(index): wrap hook creation with safeCreateHook + add defensive optional chaining (#1559) 2026-02-07 13:33:02 +09:00
YeonGyu-Kim
7ede8e04f0 fix(config-handler): add timeout + error boundary around loadAllPluginComponents (#1559) 2026-02-07 13:32:57 +09:00
YeonGyu-Kim
1ae7d7d67e feat(config): add plugin_load_timeout_ms and safe_hook_creation experimental flags 2026-02-07 13:32:51 +09:00
YeonGyu-Kim
f9742ddfca feat(shared): add safeCreateHook utility for error-safe hook creation 2026-02-07 13:32:45 +09:00
YeonGyu-Kim
eb5cc873ea fix: trim whitespace from tool names to prevent invalid tool calls
Some models (e.g. kimi-k2.5) return tool names with leading spaces
like ' delegate_task', causing tool matching to fail.

Add .trim() in transformToolName() and defensive trim in claude-code-hooks.

Fixes #1568
2026-02-07 13:12:47 +09:00
YeonGyu-Kim
847d994199 fix: allow Prometheus to overwrite .sisyphus/*.md plan files
Add exception in write-existing-file-guard for .sisyphus/*.md files
so Prometheus can rewrite plan files without being blocked by the guard.

The prometheus-md-only hook (which runs later) still validates that only
Prometheus can write to these paths, preserving security.

Fixes #1576
2026-02-07 13:12:44 +09:00
YeonGyu-Kim
bbe08f0eef fix(hooks): add defensive null check for matcher.hooks to prevent Windows crash (#441) 2026-02-07 13:12:18 +09:00
sisyphus-dev-ai
4454753bb4 chore: changes by sisyphus-dev-ai 2026-02-07 04:10:10 +00:00
YeonGyu-Kim
1c0b41aa65 fix: respect user-configured agent models over system defaults
When user explicitly configures an agent model in oh-my-opencode.json,
that model should take priority over the active model in OpenCode's config
(which may just be the system default, not a deliberate UI selection).

This fixes the issue where user-configured models from plugin providers
(e.g., google/antigravity-*) were being overridden by the fallback chain
because config.model was being passed as uiSelectedModel regardless of
whether the user had an explicit config.

The fix:
- Only pass uiSelectedModel when there's no explicit userModel config
- If user has configured a model, let resolveModelPipeline use it directly

Fixes #1573

Co-authored-by: Rishi Vhavle <rishivhavle21@gmail.com>
2026-02-07 12:26:54 +09:00
YeonGyu-Kim
4c6b31e5b4 Revert "Merge pull request #1578 from code-yeongyu/fix/user-configured-model-override"
This reverts commit 67990293a9, reversing
changes made to 368ac310a1.
2026-02-07 12:26:42 +09:00
YeonGyu-Kim
67990293a9 Merge pull request #1578 from code-yeongyu/fix/user-configured-model-override
fix: respect user-configured agent models over system defaults
2026-02-07 12:21:09 +09:00
Rishi Vhavle
dbf584af95 fix: respect user-configured agent models over system defaults
When user explicitly configures an agent model in oh-my-opencode.json,
that model should take priority over the active model in OpenCode's config
(which may just be the system default, not a deliberate UI selection).

This fixes the issue where user-configured models from plugin providers
(e.g., google/antigravity-*) were being overridden by the fallback chain
because config.model was being passed as uiSelectedModel regardless of
whether the user had an explicit config.

The fix:
- Only pass uiSelectedModel when there's no explicit userModel config
- If user has configured a model, let resolveModelPipeline use it directly

Fixes #1573
2026-02-07 12:18:07 +09:00
YeonGyu-Kim
368ac310a1 Merge pull request #1564 from code-yeongyu/feat/anthropic-effort-hook
feat: add anthropic-effort hook to inject effort=max for Opus 4.6
2026-02-06 21:58:05 +09:00
YeonGyu-Kim
cb2169f334 fix: guard against undefined modelID in anthropic-effort hook
Add early return when model.modelID or model.providerID is nullish,
preventing TypeError at runtime when chat.params receives incomplete
model data.
2026-02-06 21:55:13 +09:00
YeonGyu-Kim
ec520e6228 feat: register anthropic-effort hook in plugin lifecycle
- Add "anthropic-effort" to HookNameSchema enum
- Import and create hook in plugin entry with isHookEnabled guard
- Wire chat.params event handler to invoke the effort hook
- First hook to use the chat.params lifecycle event from plugin
2026-02-06 21:47:18 +09:00
YeonGyu-Kim
6febebc166 feat: add anthropic-effort hook to inject effort=max for Opus 4.6
Injects `output_config: { effort: "max" }` via AI SDK's providerOptions
when all conditions are met:
- variant is "max" (sisyphus, prometheus, metis, oracle, unspecified-high, ultrawork)
- model matches claude-opus-4[-.]6 pattern
- provider is anthropic, opencode, or github-copilot (with claude model)

Respects existing effort value if already set. Normalizes model IDs
with dots to hyphens for consistent matching.
2026-02-06 21:47:10 +09:00
YeonGyu-Kim
98f4adbf4b chore: add modular code enforcement rule and unignore .sisyphus/rules/ 2026-02-06 21:39:21 +09:00
YeonGyu-Kim
d209f3c677 Merge pull request #1543 from code-yeongyu/feat/task-tool-refactor
refactor: migrate delegate_task to task tool with metadata fixes
2026-02-06 21:37:46 +09:00
YeonGyu-Kim
a691a3ac0a refactor: migrate delegate_task to task tool with metadata fixes
- Rename delegate_task tool to task across codebase (100 files)
- Update model references: claude-opus-4-6 → 4-5, gpt-5.3-codex → 5.2-codex
- Add tool-metadata-store to restore metadata overwritten by fromPlugin()
- Add session ID polling for BackgroundManager task sessions
- Await async ctx.metadata() calls in tool executors
- Add ses_ prefix guard to getMessageDir for performance
- Harden BackgroundManager with idle deferral and error handling
- Fix duplicate task key in sisyphus-junior test object literals
- Fix unawaited showOutputToUser in ast_grep_replace
- Fix background=true → run_in_background=true in ultrawork prompt
- Fix duplicate task/task references in docs and comments
2026-02-06 21:35:30 +09:00
github-actions[bot]
f1c794e63e release: v3.2.4 2026-02-06 12:06:22 +00:00
YeonGyu-Kim
4692809b42 Regenerate AGENTS.md hierarchy with latest codebase state 2026-02-06 19:07:12 +09:00
YeonGyu-Kim
8961026285 Merge pull request #1554 from code-yeongyu/fix/1187-dynamic-skill-reminder
Fix category-skill-reminder to prioritize user-installed skills
2026-02-06 19:05:49 +09:00
YeonGyu-Kim
d8b29da15f fix(category-skill-reminder): dynamically include available skills with user priority 2026-02-06 19:03:06 +09:00
YeonGyu-Kim
2b2160b43e Merge pull request #1557 from code-yeongyu/fix/796-compaction-model-agnostic
fix(compaction): remove hardcoded Claude model from compaction hooks
2026-02-06 19:01:39 +09:00
YeonGyu-Kim
60bbeb7304 fix(compaction): remove hardcoded Claude model from compaction hooks 2026-02-06 18:58:48 +09:00
YeonGyu-Kim
f1b2f6f3f7 Merge pull request #1556 from code-yeongyu/fix/1265-sisyphus-junior-model-inheritance
fix(config): stop sisyphus-junior from inheriting UI-selected model
2026-02-06 18:57:42 +09:00
YeonGyu-Kim
e9a3d579b3 Merge pull request #1553 from code-yeongyu/fix/1355-atlas-continuation-guard
fix(atlas): stop continuation retry loop on repeated prompt failures
2026-02-06 18:57:32 +09:00
YeonGyu-Kim
c6c149ebb8 Merge pull request #1547 from code-yeongyu/fix/agents-md-docs
docs: fix stale references in AGENTS.md files
2026-02-06 17:49:12 +09:00
YeonGyu-Kim
728eaaeb44 Merge pull request #1551 from code-yeongyu/fix/plan-agent-dynamic-skills
fix(delegate-task): make plan agent categories/skills dynamic
2026-02-06 17:48:35 +09:00
YeonGyu-Kim
9271f827dd Merge pull request #1552 from code-yeongyu/fix/schema-sync
fix: sync Zod schemas with actual implementations
2026-02-06 17:48:27 +09:00
YeonGyu-Kim
3a0d7e8dc3 fix(config): stop sisyphus-junior from inheriting UI-selected model 2026-02-06 17:44:47 +09:00
YeonGyu-Kim
aec5624122 fix(atlas): stop continuation retry loop on repeated prompt failures 2026-02-06 17:34:14 +09:00
YeonGyu-Kim
53537a9a90 fix: sync Zod schemas with actual implementations 2026-02-06 17:31:33 +09:00
YeonGyu-Kim
6b560ebf9e fix(delegate-task): make plan agent categories/skills dynamic
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-06 17:31:13 +09:00
YeonGyu-Kim
ca8ec494a3 docs: fix stale references in AGENTS.md files 2026-02-06 17:20:19 +09:00
YeonGyu-Kim
3be722b3b1 test: add literal match assertions for regex special char escaping tests 2026-02-06 16:33:34 +09:00
YeonGyu-Kim
d779a48a30 Merge pull request #1546 from kaizen403/fix/regex-special-chars-1521
fix: escape regex special chars in pattern matcher
2026-02-06 16:32:30 +09:00
YeonGyu-Kim
3166cffd02 Merge pull request #1545 from code-yeongyu/fix/enforce-disabled-tools
fix: enforce disabled_tools filtering
2026-02-06 16:31:55 +09:00
YeonGyu-Kim
3c32ae0449 fix: enforce disabled_tools filtering 2026-02-06 16:18:44 +09:00
Rishi Vhavle
bc782ca4d4 fix: escape regex special chars in pattern matcher
Fixes #1521. When hook matcher patterns contained regex special characters
like parentheses, the pattern-matcher would throw 'SyntaxError: Invalid
regular expression: unmatched parentheses' because these characters were
not escaped before constructing the RegExp.

The fix escapes all regex special characters (.+?^${}()|[\]\) EXCEPT
the asterisk (*) which is intentionally converted to .* for glob-style
matching.

Add comprehensive test suite for pattern-matcher covering:
- Exact matching (case-insensitive)
- Wildcard matching (glob-style *)
- Pipe-separated patterns
- All regex special characters (parentheses, brackets, etc.)
- Edge cases (empty matcher, complex patterns)
2026-02-06 12:48:28 +05:30
YeonGyu-Kim
917bba9d1b Merge pull request #1544 from code-yeongyu/feature/model-version-migration
feat(migration): add model version migration for gpt-5.2-codex and claude-opus-4-5
2026-02-06 16:01:42 +09:00
YeonGyu-Kim
7e5a657f06 feat(migration): add model version migration for gpt-5.2-codex and claude-opus-4-5 2026-02-06 15:55:28 +09:00
YeonGyu-Kim
bda44a5128 Merge pull request #1542 from code-yeongyu/fix/remove-redundant-opus-fallback
fix: remove redundant duplicate claude-opus-4-6 fallback entries
2026-02-06 15:34:05 +09:00
YeonGyu-Kim
161a864ea3 fix: remove redundant duplicate claude-opus-4-6 fallback entries
After model version update (opus-4-5 → opus-4-6), several agents had
identical duplicate fallback entries for the same model. The anthropic-only
entry was a superset covered by the broader providers entry, making it dead
code. Consolidate to single entry with all providers.
2026-02-06 15:30:05 +09:00
github-actions[bot]
93d3acce89 @shaunmorris has signed the CLA in code-yeongyu/oh-my-opencode#1541 2026-02-06 06:23:34 +00:00
YeonGyu-Kim
f63bf52a6e Merge pull request #1539 from code-yeongyu/feat/update-model-versions
chore: update model version references (gpt-5.2-codex → gpt-5.3-codex, claude-opus-4-5 → claude-opus-4-6)
2026-02-06 15:22:19 +09:00
YeonGyu-Kim
25e436a4aa fix: update snapshots and remove duplicate key in switcher for model version update 2026-02-06 15:12:41 +09:00
YeonGyu-Kim
1f64920453 chore: update claude-opus-4-5 references to claude-opus-4-6 (excludes antigravity models) 2026-02-06 15:09:07 +09:00
YeonGyu-Kim
4c7215404e chore: update gpt-5.2-codex references to gpt-5.3-codex 2026-02-06 15:08:33 +09:00
YeonGyu-Kim
01594a67af fix(hooks): compose session recovery callbacks for continuation enforcers
Cubic found that registering task-continuation-enforcer recovery callbacks
overrode the todo-continuation-enforcer callbacks. Compose the callbacks
so both enforcers receive abort/recovery notifications.
2026-02-06 11:41:31 +09:00
YeonGyu-Kim
551dbc95f2 feat(hooks): register task-continuation-enforcer in plugin lifecycle
Integrates at 4 points: creation (gated by task_system), session
recovery callbacks, event handler, and stop-continuation command.
2026-02-06 11:21:53 +09:00
YeonGyu-Kim
f4a9d0c3aa feat(hooks): implement task-continuation-enforcer with TDD
Mirrors todo-continuation-enforcer but reads from file-based task storage
instead of OpenCode's todo API. Includes 19 tests covering all skip
conditions, abort detection, countdown, and recovery scenarios.
2026-02-06 11:21:45 +09:00
YeonGyu-Kim
f796fdbe0a feat(hooks): add TASK_CONTINUATION system directive and hook name 2026-02-06 11:21:37 +09:00
YeonGyu-Kim
d3999d79df Merge pull request #1533 from code-yeongyu/feat/hephaestus-provider-based-availability
feat: check provider connectivity instead of specific model for hephaestus availability
2026-02-06 10:51:30 +09:00
acamq
d85c146f0e feat(prometheus): include plan name in /start-work guidance
Update plan-generation.ts to guide users to run /start-work with plan name.
For example: /start-work fix-bug instead of just /start-work

This makes it clearer which plan the user wants to execute.
2026-02-05 18:50:30 -07:00
YeonGyu-Kim
b8f15affdb feat: check provider connectivity instead of specific model for hephaestus availability
Hephaestus now appears when any of its providers (openai, github-copilot, opencode) is
connected, rather than requiring the exact gpt-5.2-codex model. This allows users with
newer codex models (e.g., gpt-5.3-codex) to use Hephaestus without manual config overrides.

- Add requiresProvider field to ModelRequirement type
- Add isAnyProviderConnected() helper in model-availability
- Update hephaestus config from requiresModel to requiresProvider
- Update cli model-fallback to handle requiresProvider checks
2026-02-06 10:42:46 +09:00
github-actions[bot]
04576c306c @Mang-Joo has signed the CLA in code-yeongyu/oh-my-opencode#1526 2026-02-05 18:42:00 +00:00
YeonGyu-Kim
e450e4f903 Merge pull request #1525 from code-yeongyu/feat/claude-opus-4-6-priority
feat: add support for Opus 4.6
2026-02-06 03:35:36 +09:00
YeonGyu-Kim
11d0005eb5 feat: prioritize claude-opus-4-6 over claude-opus-4-5 in anthropic fallback chains
Add claude-opus-4-6 as the first anthropic provider entry before
claude-opus-4-5 across all agent and category fallback chains.
Also add high variant mapping for think-mode switcher.
2026-02-06 03:31:55 +09:00
YeonGyu-Kim
2224183b5c refactor: remove dead code
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-06 02:51:53 +09:00
YeonGyu-Kim
f468effd47 Merge pull request #1518 from code-yeongyu/feat/hephaestus-autonomous-recovery
feat(agents): improve Hephaestus autonomous problem-solving behavior
2026-02-05 22:21:01 +09:00
YeonGyu-Kim
b8d7723f0a feat(agents): improve Hephaestus autonomous problem-solving behavior
- Add Core Principle section emphasizing autonomous recovery over asking
- Enhance Role & Agency with explicit wall-hitting protocol (3+ approaches before asking)
- Transform Failure Recovery from '3 consecutive failures' to 'autonomous recovery first'
- Relax Output Contract to allow creative problem-solving when blocked
- Remove conflicting 'ask when uncertain' guideline (conflicts with EXPLORE-FIRST)
2026-02-05 22:14:53 +09:00
YeonGyu-Kim
b3864d6398 Merge pull request #1512 from code-yeongyu/fix/gemini-3-pro-variant
fix(model-requirements): use supported variant for gemini-3-pro
2026-02-05 18:04:50 +09:00
sk0x0y
b7f7cb4341 fix(model-requirements): use supported variant for gemini-3-pro
Gemini 3 Pro only supports 'low' and 'high' thinking levels according to
Google's official API documentation. The 'max' variant is not supported
and would result in API errors.

Changed variant: 'max' -> 'high' for gemini-3-pro in:
- oracle agent
- metis agent
- momus agent
- ultrabrain category
- deep category
- artistry category

Ref: https://ai.google.dev/gemini-api/docs/thinking-mode
Closes #1433
2026-02-05 17:58:39 +09:00
YeonGyu-Kim
b2e8eecd09 Merge pull request #1361 from edxeth/fix/doctor-variant-display
fix(doctor): display user-configured variant in model resolution output
2026-02-05 17:56:16 +09:00
YeonGyu-Kim
6cfaac97b2 Merge pull request #1477 from kaizen403/fix/boulder-agent-tracking
fix: track agent in boulder state to fix session continuation (fixes #927)
2026-02-05 17:41:05 +09:00
YeonGyu-Kim
77e99d8b68 Merge pull request #1491 from itsmylife44/refactor/extract-formatCustomSkillsBlock
refactor(agents): extract formatCustomSkillsBlock to eliminate duplication
2026-02-05 17:40:54 +09:00
github-actions[bot]
02e1043227 @code-yeongyu has signed the CLA in code-yeongyu/oh-my-opencode#741 2026-02-05 08:28:30 +00:00
YeonGyu-Kim
617d7f4f67 Merge pull request #1509 from rooftop-Owl/fix/category-delegation-cache-format-mismatch
fix: handle both string[] and object[] formats in provider-models cache
2026-02-05 16:13:25 +09:00
YeonGyu-Kim
955ce710d9 Merge pull request #1510 from code-yeongyu/fix/windows-lsp-node-spawn-v2
fix(lsp): use Node.js child_process on Windows to avoid Bun spawn segfault
2026-02-05 16:07:22 +09:00
YeonGyu-Kim
8ff9c24623 fix(lsp): use Node.js child_process on Windows to avoid Bun spawn segfault
Bun has unfixed segfault issues on Windows when spawning subprocesses
(oven-sh/bun#25798, #26026, #23043). Even upgrading to Bun v1.3.6+
does not resolve the crashes.

Instead of blocking LSP on Windows with version checks, use Node.js
child_process.spawn as fallback. This allows LSP to work on Windows
regardless of Bun version.

Changes:
- Add UnifiedProcess interface bridging Bun Subprocess and Node ChildProcess
- Use Node.js spawn on Windows, Bun spawn on other platforms
- Add CWD validation before spawn to prevent libuv null dereference
- Add binary existence pre-check on Windows with helpful error messages
- Enable shell: true for Node spawn on Windows for .cmd/.bat resolution
- Remove ineffective Bun version blocking (v1.3.5 check)
- Add tests for CWD validation and start() error handling

Closes #1047
Ref: oven-sh/bun#25798
2026-02-05 15:57:20 +09:00
rooftop-Owl
bd3a3bcfb9 fix: handle both string[] and object[] formats in provider-models cache
Category delegation fails when provider-models.json contains model objects
with metadata (id, provider, context, output) instead of plain strings.
Line 196 in model-availability.ts assumes string[] format, causing:
  - Object concatenation: `${providerId}/${modelId}` becomes "ollama/[object Object]"
  - Empty availableModels Set passed to resolveModelPipeline()
  - Error: "Model not configured for category"

This is the root cause of issue #1508 where delegate_task(category='quick')
fails despite direct agent routing (delegate_task(subagent_type='explore'))
working correctly.

Changes:
- model-availability.ts: Add type check to handle both string and object formats
- connected-providers-cache.ts: Update ProviderModelsCache interface to accept both formats
- model-availability.test.ts: Add 4 test cases for object[] format handling

Direct agent routing bypasses fetchAvailableModels() entirely, explaining why
it works while category routing fails. This fix enables category delegation
to work with manually-populated Ollama model caches.

Fixes #1508
2026-02-05 15:32:08 +09:00
YeonGyu-Kim
291f41f7f9 Merge pull request #1497 from code-yeongyu/feat/auto-port-v2
feat: auto port selection when default port is busy
2026-02-05 11:40:59 +09:00
YeonGyu-Kim
11b883da6c Merge pull request #1500 from code-yeongyu/fix/background-abort-tui-crash
fix(background-agent): gracefully handle aborted parent session in notifyParentSession
2026-02-05 11:39:16 +09:00
YeonGyu-Kim
48cb2033e2 fix(background-agent): gracefully handle aborted parent session in notifyParentSession
When the main session is aborted while background tasks are running,
notifyParentSession() would attempt to call session.messages() and
session.prompt() on the aborted parent session, causing exceptions
that could crash the TUI.

- Add isAbortedSessionError() helper to detect abort-related errors
- Add abort check in session.messages() catch block with early return
- Add abort check in session.prompt() catch block with early return
- Add test case covering aborted parent session scenario

Fixes TUI crash when aborting main session with running background tasks.
2026-02-05 11:31:54 +09:00
YeonGyu-Kim
8842a9139f Merge pull request #1499 from code-yeongyu/feat/auto-port-selection
feat: auto port selection when default port is busy
2026-02-05 09:59:11 +09:00
YeonGyu-Kim
ca31796336 feat: auto port selection when default port is busy 2026-02-05 09:55:15 +09:00
YeonGyu-Kim
e1f6b822f1 Merge pull request #1498 from code-yeongyu/fix/custom-skills-in-delegate-task
fix: include custom skills in delegate_task load_skills resolution
2026-02-05 09:54:22 +09:00
YeonGyu-Kim
a644d38623 fix: properly restore env vars using delete when originally undefined 2026-02-05 09:45:35 +09:00
YeonGyu-Kim
a459813888 Fix skill discovery priority and deduplication tests 2026-02-05 09:45:35 +09:00
YeonGyu-Kim
18e941b6be fix: correct skill priority order and improve test coverage
- Changed priority order to: opencode-project > opencode > project > user
  (OpenCode Global skills now take precedence over legacy Claude project skills)
- Updated JSDoc comments to reflect correct priority order
- Fixed test to use actual discoverSkills() for deduplication verification
- Changed test assertion from 'source' to 'scope' (correct field name)
2026-02-05 09:45:35 +09:00
YeonGyu-Kim
86ac39fb78 fix: include custom skills in delegate_task load_skills resolution
- Add deduplicateSkills() to prevent duplicate skill entries from multiple sources
- Priority order: opencode-project > project > opencode > user
- Add tests for deduplication behavior

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-05 09:45:35 +09:00
YeonGyu-Kim
7621aada79 feat: auto port selection when default port is busy
- Added port-utils module with isPortAvailable, findAvailablePort, getAvailableServerPort
- Modified runner.ts to automatically find available port if preferred port is busy
- Shows warning message when using auto-selected port
- Eliminates need for manual OPENCODE_SERVER_PORT workaround
2026-02-05 09:45:25 +09:00
YeonGyu-Kim
9800d1ecb0 Merge pull request #1424 from code-yeongyu/fix/auto-update-wrong-directory
fix(auto-update): use USER_CONFIG_DIR instead of CACHE_DIR for plugin invalidation
2026-02-05 02:31:14 +09:00
YeonGyu-Kim
0fbf863d00 Merge pull request #1476 from code-yeongyu/feat/write-existing-file-guard
feat: guard write tool from overwriting existing files
2026-02-05 02:31:11 +09:00
YeonGyu-Kim
71ac09bb63 fix: use process.cwd() instead of ctx.directory for glob/grep tools
ToolContext type from @opencode-ai/plugin/tool does not include
a 'directory' property, causing typecheck failure after rebase from dev.

Changed to use process.cwd() which is the same pattern used in
session-manager/tools.ts.
2026-02-05 02:23:48 +09:00
YeonGyu-Kim
ddf878e53c feat(write-existing-file-guard): add hook to prevent write tool from overwriting existing files
Adds a PreToolUse hook that intercepts write operations and throws an error
if the target file already exists, guiding users to use the edit tool instead.

- Throws error: 'File already exists. Use edit tool instead.'
- Hook is enabled by default, can be disabled via disabled_hooks
- Includes comprehensive test suite with BDD-style comments
2026-02-05 01:58:14 +09:00
YeonGyu-Kim
8886879bd0 fix(auto-update): use USER_CONFIG_DIR instead of CACHE_DIR for plugin invalidation
The auto-update-checker was operating on the wrong directory:
- CACHE_DIR (~/.cache/opencode) was used for node_modules, package.json, and bun.lock
- But plugins are installed in USER_CONFIG_DIR (~/.config/opencode)

This caused auto-updates to fail silently:
1. Update detected correctly (3.x.x -> 3.y.y)
2. invalidatePackage() tried to delete from ~/.cache/opencode (wrong!)
3. bun install ran but respected existing lockfile
4. Old version remained installed

Fix: Use USER_CONFIG_DIR consistently for all invalidation operations.

Also moves INSTALLED_PACKAGE_JSON constant to use USER_CONFIG_DIR for consistency.
2026-02-05 01:54:10 +09:00
itsmylife44
f08d4ecdda refactor(agents): extract formatCustomSkillsBlock to eliminate duplication
Address review feedback (P3): The User-Installed Skills block was duplicated verbatim in two if/else branches in both buildCategorySkillsDelegationGuide() and Atlas buildSkillsSection(). Extract shared formatCustomSkillsBlock() with configurable header level (#### vs **) so both builders reference a single source of truth.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-04 17:52:59 +01:00
YeonGyu-Kim
8049ceb947 Merge pull request #1490 from itsmylife44/fix/custom-skills-delegation-emphasis
fix(agents): emphasize user-installed custom skills in delegation prompts
2026-02-05 01:47:04 +09:00
itsmylife44
a298a2f063 fix(atlas): separate custom skills in Atlas buildSkillsSection()
Atlas had its own buildSkillsSection() in atlas/utils.ts that rendered all skills in a flat table without distinguishing built-in from user-installed. Apply the same HIGH PRIORITY emphasis and CRITICAL warning pattern used in the shared prompt builder.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-04 17:27:39 +01:00
itsmylife44
ddc52bfd31 fix(agents): emphasize user-installed skills in delegation prompts
Custom skills from .config/opencode/skills/ were visible in agent prompts but the model consistently ignored them when delegating via delegate_task(). The flat skill table made no distinction between built-in and user-installed skills, causing the model to default to built-in ones only.

- Separate skills into 'Built-in Skills' and 'User-Installed Skills (HIGH PRIORITY)' sections in buildCategorySkillsDelegationGuide()

- Add CRITICAL warning naming each custom skill explicitly

- Add priority note: 'When in doubt, INCLUDE rather than omit'

- Show source column (user/project) for custom skills

- Apply same separation in buildUltraworkSection()

- Add 10 unit tests covering all skill combination scenarios

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-04 17:27:32 +01:00
Rishi Vhavle
38b40bca04 fix(prometheus-md-only): prioritize boulder state agent over message files
Root cause fix for issue #927:
- After /plan → /start-work → interruption, in-memory sessionAgentMap is cleared
- getAgentFromMessageFiles() returns 'prometheus' (oldest message from /plan)
- But boulder.json has agent: 'atlas' (set by /start-work)

Fix: Check boulder state agent BEFORE falling back to message files
Priority: in-memory → boulder state → message files

Test: 3 new tests covering the priority logic
2026-02-04 21:27:23 +05:30
Rishi Vhavle
169ccb6b05 fix: use boulder agent instead of hardcoded Atlas check for continuation
Address code review: continuation was blocked unless last agent was Atlas,
making the new agent parameter ineffective. Now the idle handler checks if
the last session agent matches boulderState.agent (defaults to 'atlas'),
allowing non-Atlas agents to resume when properly configured.

- Add getLastAgentFromSession helper for agent lookup
- Replace isCallerOrchestrator gate with boulder-agent-aware check
- Add test for non-Atlas agent continuation scenario
2026-02-04 21:21:57 +05:30
Rishi Vhavle
d8137c0c90 fix: track agent in boulder state to fix session continuation (fixes #927)
Add 'agent' field to BoulderState to track which agent (atlas) should
resume on session continuation. Previously, when user typed 'continue'
after interruption, Prometheus (planner) resumed instead of Sisyphus
(executor), causing all delegate_task calls to get READ-ONLY mode.

Changes:
- Add optional 'agent' field to BoulderState interface
- Update createBoulderState() to accept agent parameter
- Set agent='atlas' when /start-work creates boulder.json
- Use stored agent on boulder continuation (defaults to 'atlas')
- Add tests for new agent field functionality
2026-02-04 21:21:57 +05:30
edxeth
81a2317f51 fix(doctor): display user-configured variant in model resolution output
OmoConfig interface was missing variant property, causing doctor to show
variants from ModelRequirement fallback chain instead of user's config.

- Add variant to OmoConfig agent/category entries
- Add userVariant to resolution info interfaces
- Update getEffectiveVariant to prioritize user variant
- Add tests verifying variant capture
2026-02-04 14:41:35 +01:00
YeonGyu-Kim
708d15ebcc Merge pull request #1475 from code-yeongyu/fix/model-availability-connected-providers
Merging PR #1475 into dev as requested. Cubic review 5/5 accepted.
2026-02-04 16:25:26 +09:00
YeonGyu-Kim
80297f890e fix(model-availability): honor connected providers for fallback
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-04 16:00:16 +09:00
YeonGyu-Kim
ce7478cde7 Merge pull request #1473 from code-yeongyu/feature/task-global-storage
feat(tasks): migrate storage to global config dir with ULTRAWORK_TASK_LIST_ID support
2026-02-04 15:56:31 +09:00
YeonGyu-Kim
8d0fa97b72 Merge pull request #1471 from high726/fix/look-at-clipboard-image-support
feat(look_at): add image_data parameter for clipboard/pasted image support
2026-02-04 15:55:29 +09:00
github-actions[bot]
819c5b5d29 release: v3.2.3 2026-02-04 06:38:00 +00:00
YeonGyu-Kim
8e349aad7e fix(tasks): use path.isAbsolute() for cross-platform path detection
Fixes Cubic AI review finding: startsWith('/') doesn't work on Windows
where absolute paths use drive letters (e.g., C:\).
2026-02-04 15:37:12 +09:00
YeonGyu-Kim
1712907057 docs(tasks): update AGENTS.md for global storage architecture 2026-02-04 15:15:08 +09:00
YeonGyu-Kim
d66e39a887 refactor(tasks): consolidate task-list path resolution to use getTaskDir 2026-02-04 15:12:28 +09:00
YeonGyu-Kim
ace2688186 chore: regenerate schema after Task 1 changes 2026-02-04 15:10:58 +09:00
YeonGyu-Kim
bf31e7289e feat(tasks): migrate storage to global config dir with ULTRAWORK_TASK_LIST_ID support 2026-02-04 15:08:06 +09:00
YeonGyu-Kim
7b8204924a feat(config): update task config schema for global storage
- Make storage_path truly optional (remove default)
- Add task_list_id as config alternative to env var
- Fix build-schema.ts to use zodToJsonSchema

🤖 Generated with assistance of OhMyOpenCode
2026-02-04 15:04:49 +09:00
YeonGyu-Kim
224afadbdb fix(skill-loader): respect disabledSkills in async skill resolution 2026-02-04 15:03:57 +09:00
YeonGyu-Kim
953b1f98c9 fix(ci): use regex variables for bash 5.2+ compatibility in changelog generation 2026-02-04 15:00:31 +09:00
YeonGyu-Kim
e073412da1 fix(auth): add graceful fallback for server auth injection
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-04 14:52:31 +09:00
YeonGyu-Kim
0dd42e2901 fix(non-interactive-env): force unix export syntax for bash env prefix
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-04 14:52:13 +09:00
YeonGyu-Kim
85932fadc7 test(skill-loader): fix test isolation by resetting skill content
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-04 14:51:56 +09:00
YeonGyu-Kim
65043a7e94 fix: remove broken TOC links in translated READMEs
Remove outdated configuration section links that no longer exist.
Applies changes from PR #1386 (pierrecorsini).

Co-authored-by: Pierre CORSINI <pierrecorsini@users.noreply.github.com>
2026-02-04 13:54:50 +09:00
YeonGyu-Kim
ffcf1b5715 Merge pull request #1371 from YanzheL/feat/websearch-multi-provider
feat(mcp): add multi-provider websearch support (Exa + Tavily)
2026-02-04 13:52:36 +09:00
YeonGyu-Kim
d14f32f2d5 Merge pull request #1470 from Lynricsy/fix/categories-model-precedence
fix(delegate-task): honor explicit category model over sisyphus-junior
2026-02-04 13:52:25 +09:00
YeonGyu-Kim
f79f164cd5 fix(skill-loader): deterministic collision handling for skill names
- Separate directory and file entries, process directories first
- Use Map to deduplicate skills by name (first-wins)
- Directory skills (SKILL.md, {dir}.md) take precedence over file skills (*.md)
- Add test for collision scenario

Addresses Oracle P2 review feedback from PR #1254
2026-02-04 13:52:06 +09:00
YeonGyu-Kim
dee8cf1720 Merge pull request #1370 from misyuari/fix/refactor-skills
fix: update skill resolution to support disabled skills functionality
2026-02-04 13:47:26 +09:00
YeonGyu-Kim
8098e48658 Merge pull request #1254 from LeekJay/fix/nested-skill-discovery
feat(skill-loader): support nested skill directories
2026-02-04 13:40:03 +09:00
YeonGyu-Kim
0dad85ead7 hephaestus color improvement 2026-02-04 13:36:45 +09:00
YeonGyu-Kim
1e383f44d9 fix(background-agent): abort session on model suggestion retry failure
When promptWithModelSuggestionRetry() fails, the session was not being aborted, causing the polling loop to wait forever for an idle state. Added session.abort() calls in startTask() and resume() catch blocks.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-04 13:36:45 +09:00
YeonGyu-Kim
30990f7f59 style(agents): update Hephaestus and Prometheus colors
- Hephaestus: #FF4500 (Magma Orange) → #708090 (Slate Gray)
  Blacksmith's hammer/iron theme, visible in both light and dark modes

- Prometheus: #9D4EDD (Amethyst Purple) → #FF5722 (Deep Orange)
  Fire/flame theme, restoring the original fire color concept
2026-02-04 13:36:45 +09:00
YeonGyu-Kim
51c7fee34c Merge pull request #1280 from Zacks-Zhang/fix/fix-stale-lsp-diagnostics
fix(lsp): prevent stale diagnostics by syncing didChange
2026-02-04 13:35:07 +09:00
YeonGyu-Kim
80e970cf36 Merge pull request #1297 from khduy/fix/deduplicate-settings-paths
fix(claude-code-hooks): deduplicate settings paths to prevent double hook execution
2026-02-04 13:35:06 +09:00
YeonGyu-Kim
b7b466f4f2 Merge pull request #1289 from KonaEspresso94/fix/agent-tools-bug
fix: honor tools overrides via permission migration
2026-02-04 13:34:53 +09:00
YeonGyu-Kim
5dabb8a198 Merge pull request #1393 from ualtinok/dev
fix: grep and glob tools usage without path param under Opencode Desktop
2026-02-04 13:34:52 +09:00
YeonGyu-Kim
d11f0685be Merge pull request #1388 from boguan/dev
fix: remove redundant removeCodeBlocks call
2026-02-04 13:34:51 +09:00
YeonGyu-Kim
814e14edf7 Merge pull request #1384 from devxoul/fix/readme-toc-links
fix: remove broken TOC links in README
2026-02-04 13:34:40 +09:00
lihaitao
d099b0255f feat(look_at): add image_data parameter for clipboard/pasted image support
Closes #704

Add support for base64-encoded image data in the look_at tool,
enabling analysis of clipboard/pasted images without requiring
a file path.

Changes:
- Add optional image_data parameter to LookAtArgs type
- Update validateArgs to accept either file_path or image_data
- Add inferMimeTypeFromBase64 function to detect image format
- Add try/catch around atob() to handle invalid base64 gracefully
- Update execute to handle both file path and data URL inputs
- Add comprehensive tests for image_data functionality
2026-02-04 12:24:00 +08:00
Lynricsy
1411ca255a fix(delegate-task): honor explicit category model over sisyphus-junior 2026-02-04 11:51:20 +08:00
YeonGyu-Kim
4330f25fee revert(call-omo-agent): remove metis/momus from ALLOWED_AGENTS
call_omo_agent is for lightweight exploration agents (explore, librarian).
metis/momus are consultation agents that should be invoked via delegate_task.

Reverts part of #1462 that incorrectly added metis/momus to call_omo_agent.
2026-02-04 11:38:24 +09:00
YeonGyu-Kim
737fac4345 fix(agent-restrictions): add read-only restrictions for metis and momus
- Add metis and momus to AGENT_RESTRICTIONS with same pattern as oracle
- Deny write, edit, task, and delegate_task tools
- Enforces read-only design for these advisor agents
- Addresses cubic review feedback on #1462
2026-02-04 11:36:34 +09:00
YeonGyu-Kim
49a4a1bf9e fix(call-omo-agent): allow Prometheus to call Metis and Momus (#1462)
* fix(call-omo-agent): allow Prometheus to call Metis and Momus

* fix(call-omo-agent): update help text and remove unrelated bun.lock

- Update subagent_type description to include metis and momus
- Remove unrelated bun.lock changes (keeps PR scope tight)
- Addresses Oracle review feedback
2026-02-04 11:27:14 +09:00
YeonGyu-Kim
5ffecb60c9 fix(skill-mcp): avoid propertyNames for Gemini compatibility (#1465)
- Replace record(string, unknown) with object({}) in arguments schema
- record() generates propertyNames which Gemini rejects with 400 error
- object({}) generates plain { type: 'object' } without propertyNames
- Runtime parseArguments() already handles arbitrary object keys

Fixes #1315
2026-02-04 11:26:34 +09:00
YeonGyu-Kim
b954afca90 fix(model-requirements): use supported variant for gemini-3-pro (#1463)
* fix(model-requirements): use supported variant for gemini-3-pro

* fix(delegate-task): update artistry variant to high for gemini-3-pro

- Update DEFAULT_CATEGORIES artistry variant from 'max' to 'high'
- Update related test comment
- gemini-3-pro only supports low/high thinking levels, not max
- Addresses Oracle review feedback
2026-02-04 11:26:17 +09:00
YeonGyu-Kim
faae3d0f32 fix(model-availability): prefer exact model ID match in fuzzyMatchModel (#1460)
* fix(model-availability): prefer exact model ID match in fuzzyMatchModel

* fix(model-availability): use filter+shortest for multi-provider tie-break

- Change Priority 2 from find() to filter()+reduce()
- Preserves shortest-match tie-break when multiple providers share model ID
- Add test for multi-provider same model ID case
- Addresses Oracle review feedback
2026-02-04 11:25:59 +09:00
YeonGyu-Kim
c57c0a6bcb docs: clarify Prometheus invocation workflow (#1466) 2026-02-04 11:25:46 +09:00
YeonGyu-Kim
6a66bfccec fix(doctor): respect user-configured agent variant (#1464)
* fix(doctor): respect user-configured agent variant

* fix(doctor): align variant resolution with agent-variant.ts

- Add case-insensitive agent key lookup (matches canonical logic)
- Support category-based variant inheritance (agent.category -> categories[cat].variant)
- Separate getCategoryEffectiveVariant for category-specific resolution
- Addresses Oracle review feedback
2026-02-04 11:25:37 +09:00
YeonGyu-Kim
b19bc857e3 fix(docs): instruct curl over WebFetch for installation (#1461) 2026-02-04 11:25:25 +09:00
dan
2f9004f076 fix(auth): opencode desktop server unauthorized bugfix on subagent spawn (#1399)
* fix(auth): opencode desktop server unauthorized bugfix on subagent spawn

* refactor(auth): add runtime guard and throw on SDK mismatch

- Add JSDoc with SDK API documentation reference
- Replace silent failure with explicit Error throw when OPENCODE_SERVER_PASSWORD is set but client structure is incompatible
- Add runtime type guard for SDK client structure
- Add tests for error cases (missing _client, missing setConfig)
- Remove unrelated bun.lock changes

Co-authored-by: dan-myles <dan-myles@users.noreply.github.com>

---------

Co-authored-by: YeonGyu-Kim <code.yeon.gyu@gmail.com>
Co-authored-by: dan-myles <dan-myles@users.noreply.github.com>
2026-02-04 11:07:02 +09:00
Rishi Vhavle
6151d1cb5e fix: block bash commands in Prometheus mode to respect permission config (#1449)
Fixes #1428 - Prometheus bash bypass security issue
2026-02-04 11:06:54 +09:00
YeonGyu-Kim
13e1d7cbd7 fix(non-interactive-env): use detectShellType() instead of hardcoded 'unix' (#1459)
The shellType was hardcoded to 'unix' which breaks on native Windows shells
(cmd.exe, PowerShell) when running without Git Bash or WSL.

This change uses the existing detectShellType() function to dynamically
determine the correct shell type, enabling proper env var syntax for all
supported shell environments.
2026-02-04 10:52:46 +09:00
github-actions[bot]
5361cd0a5f @kaizen403 has signed the CLA in code-yeongyu/oh-my-opencode#1449 2026-02-03 20:44:35 +00:00
github-actions[bot]
437abd8c17 @wydrox has signed the CLA in code-yeongyu/oh-my-opencode#1436 2026-02-03 16:39:46 +00:00
YanzheL
9a2a6a695a fix(test): use try/finally for guaranteed env restoration 2026-02-03 23:37:12 +08:00
YanzheL
5a2ab0095d fix(mcp): lazy evaluation prevents crash when websearch disabled
createWebsearchConfig was called eagerly before checking disabledMcps,
causing Tavily missing-key error even when websearch was disabled.
Now each MCP is only created if not in disabledMcps list.
2026-02-03 23:37:12 +08:00
YanzheL
17cb49543a fix(mcp): rewrite tests to call createWebsearchConfig directly
Previously tests were tautological - they defined local logic
instead of invoking the actual implementation. Now all tests
properly exercise createWebsearchConfig.
2026-02-03 23:37:12 +08:00
YanzheL
fea7bd2dcf docs(mcp): document websearch provider configuration 2026-02-03 23:37:12 +08:00
YanzheL
ef3d0afa32 test(mcp): add websearch provider tests 2026-02-03 23:37:12 +08:00
YanzheL
00f576868b feat(mcp): add multi-provider websearch support 2026-02-03 23:37:12 +08:00
YanzheL
4840864ed8 feat(config): add websearch provider schema 2026-02-03 23:37:12 +08:00
github-actions[bot]
9f50947795 @filipemsilv4 has signed the CLA in code-yeongyu/oh-my-opencode#1435 2026-02-03 14:38:23 +00:00
github-actions[bot]
45290b5b8f @sk0x0y has signed the CLA in code-yeongyu/oh-my-opencode#1434 2026-02-03 14:21:40 +00:00
github-actions[bot]
9343f38479 @Stranmor has signed the CLA in code-yeongyu/oh-my-opencode#1432 2026-02-03 13:53:27 +00:00
github-actions[bot]
bf83712ae1 @ualtinok has signed the CLA in code-yeongyu/oh-my-opencode#1393 2026-02-03 12:43:21 +00:00
Muhammad Noor Misyuari
374acb3ac6 fix: update tests to reflect changes in skill resolution for async handling and disabled skills 2026-02-03 15:19:08 +07:00
Muhammad Noor Misyuari
ba2a9a9051 fix: update skill resolution to support disabled skills functionality 2026-02-03 15:19:08 +07:00
Muhammad Noor Misyuari
2236a940f8 fix: implement disabled skills functionality in skill resolution 2026-02-03 15:19:01 +07:00
github-actions[bot]
976ffaeb0d @ilarvne has signed the CLA in code-yeongyu/oh-my-opencode#1422 2026-02-03 08:15:51 +00:00
github-actions[bot]
a62cf30310 release: v3.2.2 2026-02-03 07:59:49 +00:00
YeonGyu-Kim
49c933961e fix(background-cancel): skip notification when user explicitly cancels tasks
- Add skipNotification option to cancelTask method
- Apply skipNotification to background_cancel tool
- Prevents unwanted notifications when user cancels via tool
2026-02-03 16:56:40 +09:00
YeonGyu-Kim
1b7fd32bad docs: add Task system documentation
- Document TaskCreate, TaskGet, TaskList, TaskUpdate tools
- Note that these tools follow Claude Code internal specs but are not officially documented by Anthropic
- Include schema, dependency system, and usage examples
2026-02-03 16:35:49 +09:00
YeonGyu-Kim
3a823eb2a2 feat(tasks-todowrite-disabler): add strong emphasis to register tasks before working
Add warning that even trivial tasks must be registered with TaskCreate
before starting work - no direct work without task tracking.
2026-02-03 16:27:58 +09:00
YeonGyu-Kim
a651e7f073 docs(agents): regenerate AGENTS.md hierarchy with init-deep
- Root: preserve 3 CRITICAL sections (PR target, OpenCode source, English-only)
- Update all 10 AGENTS.md files with current codebase analysis
- Add complexity hotspots, agent models, anti-patterns
- Sync line counts and structure with actual implementation
2026-02-03 16:21:31 +09:00
YeonGyu-Kim
d7679e148e feat(delegate-task): add actionable TODO list template to plan agent prompt
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-03 15:58:06 +09:00
YeonGyu-Kim
4c4e1687da feat(auto-slash-command): add builtin commands support and improve part extraction
- Add builtin commands to command discovery with 'builtin' scope
- Improve extractPromptText to prioritize slash command parts
- Add findSlashCommandPartIndex helper for locating slash commands
- Add CommandExecuteBefore hook support
2026-02-03 14:33:53 +09:00
YeonGyu-Kim
f030992755 fix(config): prevent plan agent from inheriting prometheus prompt on demote
Plan agent demote now only sets mode to 'subagent' without spreading
prometheus config. This ensures plan agent uses OpenCode's default
prompt instead of inheriting prometheus prompt.
2026-02-03 14:28:57 +09:00
YeonGyu-Kim
bf87bf473f feat(agents): add GPT-5.2 optimized prompt for sisyphus-junior
Restructure sisyphus-junior agent to use model-specific prompts:
- GPT models: GPT-5.2 prompting guide principles (verbosity constraints,
  scope discipline, tool usage rules, explicit decision criteria)
- Claude models: Original prompt with extended reasoning context

Directory structure now mirrors atlas/ pattern for consistency.
2026-02-03 14:12:22 +09:00
YeonGyu-Kim
1a0cc424b3 feat(tasks-todowrite-disabler): improve error message with actionable workflow guidance 2026-02-03 14:11:27 +09:00
YeonGyu-Kim
671e320bf3 feat(agents): add useTaskSystem flag for conditional todo/task discipline prompts
- Sisyphus: buildTaskManagementSection() with todo/task variants
- Sisyphus-Junior: buildTodoDisciplineSection() with todo/task variants
- Hephaestus: buildTodoDisciplineSection() with todo/task variants
- All factory functions accept useTaskSystem parameter (default: false)
2026-02-03 13:58:56 +09:00
YeonGyu-Kim
dd120085c4 feat(agents): add Todo Discipline section to Hephaestus prompt 2026-02-03 13:52:03 +09:00
YeonGyu-Kim
9d217b05b8 fix(config-handler): preserve plan prompt when demoted (#1416) 2026-02-03 13:37:57 +09:00
YeonGyu-Kim
1b9303ba37 refactor(ultrawork): simplify workflow and apply parallel context gathering (#1412)
* refactor(ultrawork): simplify workflow to natural tool-like agent usage

Restore beta.16 style where explore/librarian agents feel like tools:
- Simplify delegate_task examples (agent=, background=true)
- Remove verbose DATA DEPENDENCIES explanation
- Condense EXECUTION RULES to action-oriented bullets
- Simplify WORKFLOW to 4 clear steps
- Remove procedural constraints that discouraged parallel exploration

The goal: agents fire background tasks AND continue direct exploration,
rather than waiting passively for background results.

* refactor(ultrawork/gpt5.2): apply two-track parallel context gathering

Based on GPT-5.2 Prompting Guide recommendations:
- 'Parallelize independent reads to reduce latency'
- Fire background agents (explore, librarian) for deep search
- Use direct tools (Grep, Read, LSP) simultaneously for quick wins
- Collect and merge ALL findings for comprehensive context

Pattern: background fire → direct exploration in parallel → collect → proceed

* fix: address Cubic review feedback

- Fix delegate_task parameter names in default.ts (agent → subagent_type, background → run_in_background)
- Add missing load_skills and run_in_background parameters to delegate_task examples
- Restore new_task_system_enabled property to schema and TypeScript config
- Fix tool names in gpt5.2.ts (Grep → grep, Read → read_file)

Identified by cubic (https://cubic.dev)
2026-02-03 12:13:22 +09:00
YeonGyu-Kim
ec1cb5db05 fix(prometheus): enforce path constraints and atomic write protocol (#1414)
* fix(prometheus): enforce path constraints and atomic write protocol

- Add FORBIDDEN PATHS section blocking docs/, plan/, plans/ directories
- Add SINGLE ATOMIC WRITE protocol to prevent content loss from multiple writes
- Simplify PROMETHEUS_AGENTS array to single PROMETHEUS_AGENT string

* fix: reconcile Edit tool signature in interview-mode.ts with identity-constraints.ts

Identified by cubic: Edit tool usage was inconsistent between files.

- interview-mode.ts showed: Edit(path, content)
- identity-constraints.ts showed: Edit(path, oldString="...", newString="...")

Updated interview-mode.ts to use the correct Edit signature with oldString and newString parameters to match the actual tool API and prevent agent hallucination.
2026-02-03 12:11:52 +09:00
YeonGyu-Kim
7ebafe2267 refactor(config-handler): separate plan prompt into dedicated configuration (#1413)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-03 12:11:49 +09:00
YeonGyu-Kim
e36dde6e64 refactor(background-agent): optimize lifecycle and simplify tools (#1411)
* refactor(background-agent): optimize cache timer lifecycle and result handling

Ultraworked with Sisyphus

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* refactor(background-task): simplify tool implementation and expand test coverage

Ultraworked with Sisyphus

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix(background-task): fix BackgroundCancel tool parameter handling

Correct parameter names and types in BackgroundCancel tool to match actual usage patterns. Add comprehensive test coverage for parameter validation.

---------

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-03 12:11:45 +09:00
YeonGyu-Kim
b62519b401 feat(agents): respect uiSelectedModel in Atlas model resolution (#1410)
Atlas now respects uiSelectedModel when resolving model in createBuiltinAgents. Added test coverage for this behavior.
2026-02-03 12:11:42 +09:00
YeonGyu-Kim
dea13a37a6 feat(task-system): add experimental task system with Claude Code spec alignment (#1415)
* feat(hooks): add tasks-todowrite-disabler hook to block TodoRead/TodoWrite

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(task-tools): add parallel execution guidance to descriptions

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* refactor(index): migrate task system to experimental.task_system flag

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* docs: update AGENTS.md for experimental task system

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix(task-tests): align test field names with Claude Code spec (subject, blockedBy, addBlockedBy)

* fix: address Cubic review feedback

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: add optional chaining for tasksTodowriteDisabler null check

---------

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-03 12:11:23 +09:00
YeonGyu-Kim
1e587c55dc docs(AGENTS): add critical sections for PR workflow and OpenCode source reference
- Emphasize PR target branch rule with NEVER DELETE warning
- Add git workflow diagram (master <- dev <- feature branches)
- Add OpenCode source code reference section for plugin development
- Emphasize librarian agent usage for plugin-related tasks
2026-02-03 11:05:45 +09:00
YeonGyu-Kim
db787b7347 refactor(oracle): optimize prompt for GPT-5.2 with XML structure and verbosity constraints
- Restructure prompt with XML tags for better instruction adherence
- Add output_verbosity_spec with concrete limits (≤7 steps, ≤3 sentences)
- Add uncertainty_and_ambiguity section with decision tree
- Add scope_discipline to prevent scope drift
- Add tool_usage_rules for efficient tool calling
- Add high_risk_self_check for architecture/security answers
- Add long_context_handling for large code inputs
- Update context to support session continuation follow-ups
2026-02-03 11:03:41 +09:00
YeonGyu-Kim
ac9e22cce5 fix(prompts): add missing run_in_background and load_skills params to examples
All delegate_task examples now include required parameters to prevent
model confusion about parameter omission.

Fixes #1403
2026-02-03 10:50:26 +09:00
YeonGyu-Kim
8441f70c2b fix(delegate-task): honor sisyphus-junior model override precedence (#1404) 2026-02-03 10:41:26 +09:00
YeonGyu-Kim
7226836472 atlas reminder reinforce 2026-02-03 10:31:34 +09:00
github-actions[bot]
0f81d4c126 @dan-myles has signed the CLA in code-yeongyu/oh-my-opencode#1399 2026-02-02 16:59:02 +00:00
YeonGyu-Kim
62e1687474 feat: add agent fallback and preemptive-compaction restoration
- Add agent visibility fallback for first-run scenarios
- Restore preemptive-compaction hook
- Update migration and schema for preemptive-compaction restoration
2026-02-02 22:40:59 +09:00
YeonGyu-Kim
99ee4a0251 docs: update AGENTS.md with explore agent model change (grok-code-fast-1) 2026-02-02 21:19:21 +09:00
YeonGyu-Kim
d80adac3fc feat(agents): add grok-code-fast-1 as primary model for explore agent 2026-02-02 21:13:45 +09:00
YeonGyu-Kim
159fccddcf refactor(background-agent): optimize cache timer lifecycle and result handling
Improve cache timer management in background agent manager and update result handler to properly handle cache state transitions
2026-02-02 21:07:20 +09:00
YeonGyu-Kim
9f84da1d35 feat(skills): set triage category ratio to 1:2:1 (unspecified-low:writing:quick) 2026-02-02 21:07:20 +09:00
YeonGyu-Kim
8e17819ffb feat(skills): add streaming mode and todo tracking to triage skills
- Convert github-pr-triage to streaming architecture (process PRs one-by-one with immediate reporting)
- Convert github-issue-triage to streaming architecture (process issues one-by-one with real-time updates)
- Add mandatory initial todo registration for both triage skills
- Add phase-by-phase todo status updates
- Generate final comprehensive report at the end
- Show live progress every 5 items during processing
2026-02-02 21:07:20 +09:00
YeonGyu-Kim
b01e246958 docs(issue-templates): add AI agent consultation to prerequisite checklist 2026-02-02 21:07:20 +09:00
YeonGyu-Kim
2e0d0c989b refactor(agents): restructure atlas agent into modular directory with model-based routing
Split monolithic atlas.ts into modular structure: index.ts (routing), default.ts (Claude-optimized), gpt.ts (GPT-optimized), utils.ts (shared utilities). Atlas now routes to appropriate prompt based on model type instead of overriding model settings.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-02 21:07:20 +09:00
YeonGyu-Kim
5c68ae3bee fix: honor agent variant overrides (#1394)
* fix(shared): honor agent variant overrides

* test(shared): use model in fallback chain to verify override precedence

Address PR review: test now uses claude-opus-4-5 (which has default
variant 'max' in sisyphus chain) to properly verify that agent override
'high' takes precedence over the fallback chain's default variant.
2026-02-02 21:07:10 +09:00
ismeth
527c21ea90 fix(tools): for overridden tools (glob, grep) path should use ctx.directory. OpenCode Desktop might not send path as a param and cwd might resolve to "/" 2026-02-02 11:34:33 +01:00
github-actions[bot]
d165a6821d @pierrecorsini has signed the CLA in code-yeongyu/oh-my-opencode#1386 2026-02-02 07:59:23 +00:00
YeonGyu-Kim
76623454de test(task): improve todo-sync tests with bun-types and inline assertions
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
2026-02-02 16:50:13 +09:00
BoGuan
f68a6f7d1b fix: remove redundant removeCodeBlocks call
Remove duplicate removeCodeBlocks() call in keyword-detector/index.ts.

The detectKeywordsWithType() function already calls removeCodeBlocks() internally, so calling it before passing the text was redundant and caused unnecessary double processing.
2026-02-02 15:18:25 +08:00
konaespresso94
8a5b131c7f chore: tracking merge origin/dev 2026-02-02 15:56:00 +09:00
Suyeol Jeon
ce62da92c6 fix: remove broken TOC links pointing to non-existent sections 2026-02-02 15:16:55 +09:00
YeonGyu-Kim
0ea92124a7 feat(task): add real-time single-task todo sync via OpenCode API
- Add syncTaskTodoUpdate function for immediate todo updates
- Integrate with TaskCreate and TaskUpdate tools
- Preserve existing todos when updating single task
- Add comprehensive tests for new sync function

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-02 15:05:07 +09:00
YeonGyu-Kim
418cf35886 format: apply prettier to index.ts
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-02 15:04:53 +09:00
YeonGyu-Kim
e969ca5573 refactor(prometheus): replace binary verification with layered agent-executed QA
Restructure verification strategy from binary (TDD xor manual) to layered
(TDD AND/OR agent QA). Elevate zero-human-intervention as universal principle,
require per-scenario ultra-detailed QA format with named scenarios, negative
cases, and evidence capture. Remove ambiguous 'manual QA' terminology.
2026-02-02 14:18:01 +09:00
YeonGyu-Kim
92639ca38f feat(task): refactor to Claude Code style individual tools
- Split unified Task tool into individual tools (TaskCreate, TaskGet, TaskList, TaskUpdate)
- Update schema to Claude Code field names (subject, blockedBy, blocks, activeForm, owner, metadata)
- Add OpenCode Todo API sync layer (todo-sync.ts)
- Implement Todo sync on task create/update for continuation enforcement
- Add comprehensive tests for all tools (96 tests total)
- Update AGENTS.md documentation

Breaking Changes:
- Field names changed: title→subject, dependsOn→blockedBy, open→pending
- Tool names changed: task→task_create, task_get, task_list, task_update

Closes: todo-continuation-enforcer now sees Task-created items
2026-02-02 13:13:06 +09:00
YeonGyu-Kim
6288251a67 refactor(task): update schema to Claude Code field names (subject, blockedBy, blocks, etc.) 2026-02-02 13:13:06 +09:00
YeonGyu-Kim
961ce19415 feat(cli): deny Question tool in CLI run mode
In CLI run mode there is no TUI to answer questions, so the Question
tool would hang forever. This sets OPENCODE_CLI_RUN_MODE env var in
runner.ts and config-handler uses it to set question permission to
deny for sisyphus, hephaestus, and prometheus agents.
2026-02-02 13:13:06 +09:00
YeonGyu-Kim
b71fe66a7e feat(task): implement TaskUpdate tool with additive blocks/blockedBy and metadata merge 2026-02-02 13:13:06 +09:00
YeonGyu-Kim
874d51a9f4 test(cli): add default agent resolution tests
Add unit tests for resolveRunAgent() covering:
- CLI flag takes priority over env and config
- Env var takes priority over config
- Config takes priority over default
- Falls back to sisyphus when none set
- Skips disabled agent and picks next available core agent
2026-02-02 13:13:06 +09:00
YeonGyu-Kim
dd3f93d3e7 docs(cli): improve run command help with agent options
Update --help text for 'run' command to document:
- Agent resolution priority order
- OPENCODE_DEFAULT_AGENT environment variable
- oh-my-opencode.json 'default_run_agent' config option
- Available core agents (Sisyphus, Hephaestus, Prometheus, Atlas)
2026-02-02 13:13:06 +09:00
YeonGyu-Kim
a7a847eb9e feat(cli): implement default agent priority in run command
Add resolveRunAgent() to determine agent with priority:
  1. CLI --agent flag (highest)
  2. OPENCODE_DEFAULT_AGENT environment variable
  3. oh-my-opencode.json 'default_run_agent' config
  4. 'sisyphus' (fallback)

Features:
- Case-insensitive agent name matching
- Warn and fallback when requested agent is disabled
- Pick next available core agent when default is disabled
2026-02-02 13:13:06 +09:00
YeonGyu-Kim
9c2c8b4dd0 feat(config): add default_run_agent schema option
Add optional 'default_run_agent' field to OhMyOpenCodeConfig schema.
This field allows users to configure the default agent for the 'run' command
via oh-my-opencode.json configuration file.

- Add Zod schema: z.string().optional()
- Regenerate JSON schema for IDE support
2026-02-02 13:13:06 +09:00
YeonGyu-Kim
8927847336 feat(skills): add github-pr-triage skill and update github-issue-triage
- Add github-pr-triage skill with conservative auto-close logic
- Update github-issue-triage ratio to 7:2:1 (unspecified-low:quick:writing)
- Add gh_fetch.py script for exhaustive GitHub pagination (issues/PRs)
- Script bundled in both skills + available standalone in uvscripts/
2026-02-02 13:13:06 +09:00
github-actions[bot]
08889b889a @gburch has signed the CLA in code-yeongyu/oh-my-opencode#1382 2026-02-02 03:02:57 +00:00
YeonGyu-Kim
abc448b137 feat(config): disable todowrite/todoread tools when new_task_system_enabled 2026-02-02 10:25:31 +09:00
github-actions[bot]
523ef0d218 @YanzheL has signed the CLA in code-yeongyu/oh-my-opencode#1371 2026-02-01 19:52:05 +00:00
YeonGyu-Kim
134dc7687e fix(task-tool): add task ID validation and improve lock acquisition safety
- Add task ID pattern validation (T-[A-Za-z0-9-]+) to prevent path traversal
- Refactor lock mechanism to use UUID-based IDs for reliable ownership tracking
- Implement atomic lock creation with stale lock detection and cleanup
- Add lock acquisition checks in create/update/delete handlers
- Expand task-reminder hook to track split tool names and clean up on session deletion
- Add comprehensive test coverage for validation and lock handling
2026-02-01 23:50:34 +09:00
github-actions[bot]
914a480136 @code-yeongyu has signed the CLA in code-yeongyu/oh-my-opencode#1029 2026-02-01 14:46:24 +00:00
github-actions[bot]
9293cb529a @code-yeongyu has signed the CLA in code-yeongyu/oh-my-opencode#580 2026-02-01 14:38:00 +00:00
github-actions[bot]
4f78eacb46 @hichoe95 has signed the CLA in code-yeongyu/oh-my-opencode#1358 2026-02-01 14:12:57 +00:00
YeonGyu-Kim
8d29a1c5c7 Implement unified Claude Tasks system with single multi-action tool (#1356)
* chore: pin bun-types to 1.3.6

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* chore: exclude test files and script from tsconfig

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* refactor: remove sisyphus-swarm feature

Remove mailbox types and swarm config schema. Update docs.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* refactor: remove legacy sisyphus-tasks feature

Remove old storage and types implementation, replaced by claude-tasks.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(claude-tasks): add task schema and storage utilities

- Task schema with Zod validation (pending, in_progress, completed, deleted)
- Storage utilities: getTaskDir, readJsonSafe, writeJsonAtomic, acquireLock
- Atomic writes with temp file + rename
- File-based locking with 30s stale threshold

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(tools/task): add task object schemas

Add Zod schemas for task CRUD operations input validation.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(tools): add TaskCreate tool

Create new tasks with sequential ID generation and lock-based concurrency.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(tools): add TaskGet tool

Retrieve task by ID with null-safe handling.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(tools): add TaskUpdate tool with claim validation

Update tasks with status transitions and owner claim validation.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(tools): add TaskList tool and exports

- TaskList for summary view of all tasks
- Export all claude-tasks tool factories from index

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(hooks): add task-reminder hook

Remind agents to use task tools after 10 turns without task operations.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(config): add disabled_tools setting and tasks-todowrite-disabler hook

- Add disabled_tools config option to disable specific tools by name
- Register tasks-todowrite-disabler hook name in schema

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(config-handler): add task_* and teammate tool permissions

Grant task_* and teammate permissions to atlas, sisyphus, prometheus, and sisyphus-junior agents.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* feat(delegate-task): add execute option for task execution

Add optional execute field with task_id and task_dir for task-based delegation.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* fix(truncator): add type guard for non-string outputs

Prevent crashes when output is not a string by adding typeof checks.

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* chore: export config types and update task-resume-info

- Export SisyphusConfig and SisyphusTasksConfig types
- Add task_tool to TARGET_TOOLS list

🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)

* refactor(storage): remove team namespace, use flat task directory

* feat(task): implement unified task tool with all 5 actions

* fix(hooks): update task-reminder to track unified task tool

* refactor(tools): register unified task tool, remove 4 separate tools

* chore(cleanup): remove old 4-tool task implementation

* refactor(config): use new_task_system_enabled as top-level flag

- Add new_task_system_enabled to OhMyOpenCodeConfigSchema
- Remove enabled from SisyphusTasksConfigSchema (keep storage_path, claude_code_compat)
- Update index.ts to gate on new_task_system_enabled
- Update plugin-config.ts default for config initialization
- Update test configs in task.test.ts and storage.test.ts

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: resolve typecheck and test failures

- Add explicit ToolDefinition return type to createTask function
- Fix planDemoteConfig to use 'subagent' mode instead of 'all'

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-01 22:42:28 +09:00
github-actions[bot]
491df05b63 release: v3.2.1 2026-02-01 12:28:11 +00:00
YeonGyu-Kim
25dcd2a3f2 fix(background-agent): prevent concurrency slot leaks on task startup failures
Unify slot ownership: processKey() owns the slot until task.concurrencyKey is set.
Previously, startTask() released the slot on errors (session.create catch,
createResult.error), but processKey() catch block didn't release, causing slot
leaks when errors occurred between acquire() and task.concurrencyKey assignment.

Changes:
- Remove all pre-transfer release() calls in startTask()
- Add conditional release in processKey() catch: only if task.concurrencyKey not set
- Add validation for createResult.data?.id to catch malformed API responses

This fixes 'Task failed to start within timeout' errors caused by exhausted
concurrency slots that were never released.
2026-02-01 21:24:52 +09:00
YeonGyu-Kim
613610308c fix(cli): add -preview suffix for GitHub Copilot Gemini model names
GitHub Copilot uses gemini-3-pro-preview and gemini-3-flash-preview as
the official model identifiers. The CLI installer was generating config
with incorrect names (gemini-3-pro, gemini-3-flash).

Reported by user: the install command was creating config with wrong
model names that don't work with GitHub Copilot API.
2026-02-01 21:23:52 +09:00
YeonGyu-Kim
62c8a671ee fix(ci): add shell: bash to retry action for Windows compatibility 2026-02-01 19:58:23 +09:00
github-actions[bot]
b3edd88f83 release: v3.2.0 2026-02-01 10:54:43 +00:00
YeonGyu-Kim
dbe1b25707 feat(todo-continuation): show remaining tasks list in continuation prompt
Include the list of incomplete todos with their status in the
continuation prompt so the agent knows exactly what tasks remain.
2026-02-01 19:45:28 +09:00
YeonGyu-Kim
6bcc3c33f0 refactor(background-agent): show category in task completion notification
Add agent category info to the task completion notification for better
visibility of what category was used for the task.
2026-02-01 19:45:09 +09:00
YeonGyu-Kim
b6da473341 feat(babysitting): make unstable-agent-babysitter always-on by default
Remove the 'enabled' flag from babysitting config - the hook now runs
automatically when not disabled via disabled_hooks. This simplifies
configuration and makes the unstable model monitoring a default behavior.

BREAKING CHANGE: babysitting.enabled config option is removed. Use
disabled_hooks: ['unstable-agent-babysitter'] to disable the hook instead.
2026-02-01 19:44:34 +09:00
YeonGyu-Kim
6080bc8caf refactor(delegate-task): improve session title format and add task_metadata block
- Change session title from 'Task: {desc}' to '{desc} (@{agent} subagent)'
- Move session_id to structured <task_metadata> block for better parsing
- Add category tracking to BackgroundTask type and LaunchInput
- Add tests for new title format and metadata block
2026-02-01 19:44:22 +09:00
YeonGyu-Kim
d7807072e1 feat(doctor): detect OpenCode desktop GUI installations on all platforms (#1352)
* feat(doctor): detect OpenCode desktop GUI installations on all platforms

- Add getDesktopAppPaths() returning platform-specific desktop app paths
  - macOS: /Applications/OpenCode.app, ~/Applications/OpenCode.app
  - Windows: C:\Program Files\OpenCode, %LOCALAPPDATA%\Programs\OpenCode
  - Linux: /opt/opencode, /snap/bin, ~/.local/bin
- Add findDesktopBinary() for testable desktop path detection
- Modify findOpenCodeBinary() to check desktop paths as fallback

Fixes #1310

* fix: use verified installation paths from OpenCode source

Verified paths from sst/opencode Tauri config:

macOS:
- /Applications/OpenCode.app/Contents/MacOS/OpenCode (capital C)

Windows:
- C:\Program Files\OpenCode\OpenCode.exe
- %LOCALAPPDATA%\OpenCode\OpenCode.exe
- Removed hardcoded paths, use ProgramFiles env var
- Filter empty paths when env vars undefined

Linux:
- /usr/bin/opencode (deb symlink)
- /usr/lib/opencode/opencode (deb actual binary)
- ~/Applications/*.AppImage (user AppImage)
- Removed non-existent /opt/opencode and /snap/bin paths

* chore: remove unused imports from tests
2026-02-01 19:42:37 +09:00
YeonGyu-Kim
64825158a7 feat(agents): add Hephaestus - autonomous deep worker agent (#1287)
* refactor(keyword-detector): split constants into domain-specific modules

* feat(shared): add requiresAnyModel and isAnyFallbackModelAvailable

* feat(config): add hephaestus to agent schemas

* feat(agents): add Hephaestus autonomous deep worker

* feat(cli): update model-fallback for hephaestus support

* feat(plugin): add hephaestus to config handler with ordering

* test(delegate-task): update tests for hephaestus agent

* docs: update AGENTS.md files for hephaestus

* docs: add hephaestus to READMEs

* chore: regenerate config schema

* fix(delegate-task): bypass requiresModel check when user provides explicit config

* docs(hephaestus): add 4-part context structure for explore/librarian prompts

* docs: fix review comments from cubic (non-breaking changes)

- Move Hephaestus from Primary Agents to Subagents (uses own fallback chain)
- Fix Hephaestus fallback chain documentation (claude-opus-4-5 → gemini-3-pro)
- Add settings.local.json to claude-code-hooks config sources
- Fix delegate_task parameters in ultrawork prompt (agent→subagent_type, background→run_in_background, add load_skills)
- Update line counts in AGENTS.md (index.ts: 788, manager.ts: 1440)

* docs: fix additional documentation inconsistencies from oracle review

- Fix delegate_task parameters in Background Agents example (docs/features.md)
- Fix Hephaestus fallback chain in root AGENTS.md to match model-requirements.ts

* docs: clarify Hephaestus has no fallback (requires gpt-5.2-codex only)

Hephaestus uses requiresModel constraint - it only activates when gpt-5.2-codex
is available. The fallback chain in code is unreachable, so documentation
should not mention fallbacks.

* fix(hephaestus): remove unreachable fallback chain entries

Hephaestus has requiresModel: gpt-5.2-codex which means the agent only
activates when that specific model is available. The fallback entries
(claude-opus-4-5, gemini-3-pro) were unreachable and misleading.

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-02-01 19:26:57 +09:00
github-actions[bot]
5f053cd75b @code-yeongyu has signed the CLA in code-yeongyu/oh-my-opencode#1102 2026-02-01 10:14:04 +00:00
Nguyễn Văn Tín
011eb48ffd fix: improve Windows compatibility and fix event listener issues (#1102)
Replace platform-specific 'which'/'where' commands with cross-platform Bun.which() API to fix Windows compatibility issues and simplify code.

Fixes:
- #1027: Comment-checker binary crashes on Windows (missing 'check' subcommand)
- #1036: Session-notification listens to non-existent events
- #1033: Infinite loop in session notifications
- #599: Doctor incorrectly reports OpenCode as not installed on Windows
- #1005: PowerShell path detection corruption on Windows

Changes:
- Use Bun.which() instead of spawning 'which'/'where' commands
- Add 'check' subcommand to comment-checker invocation
- Remove non-existent event listeners (session.updated, message.created)
- Prevent notification commands from resetting their own state
- Fix edge case: clear notifiedSessions if activity occurs during notification

All changes are cross-platform compatible and tested on Windows/Linux/macOS.
2026-02-01 19:13:54 +09:00
gabriel-ecegi
ffbca5e48e fix(config): properly handle prompt_append for Prometheus agent (#1271)
- Extract prompt_append from override and append to prompt instead of shallow spread
- Add test verifying prompt_append is appended, not overwriting base prompt
- Fixes #723

Co-authored-by: Gabriel Ečegi <gabriel-ecegi@users.noreply.github.com>
2026-02-01 19:11:49 +09:00
itsmylife44
6389da3cd6 fix(tmux): send Ctrl+C before kill-pane and respawn-pane to prevent orphaned processes (#1329)
* fix(tmux): send Ctrl+C before kill-pane and respawn-pane to prevent orphaned processes

* fix(tmux-subagent): prevent premature pane closure with stability detection

Implements stability detection pattern from background-agent to prevent
tmux panes from closing while agents are still working (issue #1330).

Problem: Session status 'idle' doesn't mean 'finished' - agent may still
be thinking/reasoning. Previous code closed panes immediately on idle.

Solution:
- Require MIN_STABILITY_TIME_MS (10s) before stability detection activates
- Track message count changes to detect ongoing activity
- Require STABLE_POLLS_REQUIRED (3) consecutive polls with same message count
- Double-check session status before closing

Changes:
- types.ts: Add lastMessageCount and stableIdlePolls to TrackedSession
- manager.ts: Implement stability detection in pollSessions()
- manager.test.ts: Add 4 tests for stability detection behavior

* test(tmux-subagent): improve stability detection tests to properly verify age gate

- First test now sets session age >10s and verifies 3 polls don't close
- Last test now does 5 polls to prove age gate prevents closure
- Added comments explaining what each poll does
2026-02-01 19:11:35 +09:00
YeonGyu-Kim
c73314f643 feat(skill-mcp-manager): enhance manager with improved test coverage
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-01 19:01:40 +09:00
YeonGyu-Kim
09e738c989 refactor(background-agent): optimize task timing and constants management
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-01 19:01:30 +09:00
justsisyphus
7f9fcc708f fix(tests): properly stub notifyParentSession and fix timer-based tests
- Add stubNotifyParentSession implementation to stub manager's notifyParentSession method
- Add stubNotifyParentSession calls to checkAndInterruptStaleTasks tests
- Add messages mock to client mocks for completeness
- Fix timer-based tests by using real timers (fakeTimers.restore) with wait()
- Increase timeout for tests that need real time delays
2026-02-01 18:33:06 +09:00
justsisyphus
8bf3202552 fix(non-interactive-env): always inject env vars for git commands
Remove isNonInteractive() check that was incorrectly added in PR #573.
The check prevented env var injection when OpenCode runs in a TTY,
causing git commands like 'git rebase --continue' to open editors (nvim)
that hang forever. The agent cannot interact with spawned bash processes
regardless of whether OpenCode itself is in a TTY.
2026-02-01 18:06:05 +09:00
justsisyphus
ae6f4c5471 refactor(agents): improve explore/librarian prompt examples with 4-part context structure
Add CONTEXT + GOAL + QUESTION + REQUEST structure to agent delegation examples.
This guides users to provide richer context when invoking explore/librarian agents.
2026-02-01 17:56:27 +09:00
justsisyphus
ab54e6ccdc chore: treat minimax as unstable model requiring background monitoring 2026-02-01 17:20:01 +09:00
justsisyphus
0dafdde173 chore: regenerate config schema 2026-02-01 17:07:18 +09:00
justsisyphus
08c699dbc1 chore: add test type declarations 2026-02-01 17:07:18 +09:00
justsisyphus
72a88068b9 docs(background-task): enhance background_output tool description with full_session parameter 2026-02-01 17:07:18 +09:00
justsisyphus
64356c520b feat(hooks): add unstable-agent-babysitter hook for monitoring unstable background agents 2026-02-01 17:07:18 +09:00
justsisyphus
a5b2ae2895 feat(background-agent): add isUnstableAgent flag for unstable model detection 2026-02-01 17:06:39 +09:00
justsisyphus
520bf9cb55 feat: add thinking_max_chars option to background_output tool
- Add thinking_max_chars?: number to BackgroundOutputOptions type
- Add thinking_max_chars argument to background_output tool schema
- Add formatFullSession option for controlling output format
- Add 2 tests for thinking_max_chars functionality
2026-02-01 17:05:38 +09:00
justsisyphus
3e9a0ef9aa fix(background-agent): abort session on task completion to prevent zombie attach processes 2026-02-01 17:05:38 +09:00
justsisyphus
e8cdab8871 fix(ci): add retry logic for platform binary builds
- Use nick-fields/retry@v3 for Build binary step
- 5 minute timeout per attempt
- Max 5 attempts with 10s wait between retries
- Prevents infinite hang on Bun cross-compile network issues
2026-02-01 17:03:35 +09:00
YeonGyu-Kim
f146aeff0f refactor: major codebase cleanup - BDD comments, file splitting, bug fixes (#1350)
* style(tests): normalize BDD comments from '// #given' to '// given'

- Replace 4,668 Python-style BDD comments across 107 test files
- Patterns changed: // #given -> // given, // #when -> // when, // #then -> // then
- Also handles no-space variants: //#given -> // given

* fix(rules-injector): prefer output.metadata.filePath over output.title

- Extract file path resolution to dedicated output-path.ts module
- Prefer metadata.filePath which contains actual file path
- Fall back to output.title only when metadata unavailable
- Fixes issue where rules weren't injected when tool output title was a label

* feat(slashcommand): add optional user_message parameter

- Add user_message optional parameter for command arguments
- Model can now call: command='publish' user_message='patch'
- Improves error messages with clearer format guidance
- Helps LLMs understand correct parameter usage

* feat(hooks): restore compaction-context-injector hook

- Restore hook deleted in cbbc7bd0 for session compaction context
- Injects 7 mandatory sections: User Requests, Final Goal, Work Completed,
  Remaining Tasks, Active Working Context, MUST NOT Do, Agent Verification State
- Re-register in hooks/index.ts and main plugin entry

* refactor(background-agent): split manager.ts into focused modules

- Extract constants.ts for TTL values and internal types (52 lines)
- Extract state.ts for TaskStateManager class (204 lines)
- Extract spawner.ts for task creation logic (244 lines)
- Extract result-handler.ts for completion handling (265 lines)
- Reduce manager.ts from 1377 to 755 lines (45% reduction)
- Maintain backward compatible exports

* refactor(agents): split prometheus-prompt.ts into subdirectory

- Move 1196-line prometheus-prompt.ts to prometheus/ subdirectory
- Organize prompt sections into separate files for maintainability
- Update agents/index.ts exports

* refactor(delegate-task): split tools.ts into focused modules

- Extract categories.ts for category definitions and routing
- Extract executor.ts for task execution logic
- Extract helpers.ts for utility functions
- Extract prompt-builder.ts for prompt construction
- Reduce tools.ts complexity with cleaner separation of concerns

* refactor(builtin-skills): split skills.ts into individual skill files

- Move each skill to dedicated file in skills/ subdirectory
- Create barrel export for backward compatibility
- Improve maintainability with focused skill modules

* chore: update import paths and lockfile

- Update prometheus import path after refactor
- Update bun.lock

* fix(tests): complete BDD comment normalization

- Fix remaining #when/#then patterns missed by initial sed
- Affected: state.test.ts, events.test.ts

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-02-01 16:47:50 +09:00
justsisyphus
c83150d9ea feat(ci): auto-generate structured release notes from conventional commits 2026-02-01 15:34:19 +09:00
github-actions[bot]
711a347b64 release: v3.1.11 2026-02-01 06:05:22 +00:00
justsisyphus
6667ace7ca fix(ci): remove deleted compaction-context-injector from test paths 2026-02-01 15:03:13 +09:00
justsisyphus
e48be69a62 fix(rules-injector): remove dead batch code, add .sisyphus support
- Remove non-functional batch tool handling (OpenCode has no batch tool)
- Keep working direct tool call path (read/write/edit/multiedit)
- Apply same cleanup to directory-agents-injector and directory-readme-injector
- Add .sisyphus/rules directory support
2026-02-01 15:01:09 +09:00
justsisyphus
3808fd3a4b feat(command): add Oracle safety review for deployment check 2026-02-01 14:48:04 +09:00
justsisyphus
ac33b76193 chore(command): remove hardcoded model from get-unpublished-changes 2026-02-01 14:45:24 +09:00
justsisyphus
a24f1e905e chore: fix bun-build gitignore pattern to catch all variants 2026-02-01 14:43:30 +09:00
justsisyphus
08439a511a fix(test): add missing ToolContext fields to test mocks
@opencode-ai/plugin ToolContext now requires directory, worktree,
metadata, and ask fields. Updated all tool test mocks to comply.
2026-02-01 14:16:28 +09:00
justsisyphus
cbbc7bd075 refactor: remove orphaned compaction-context-injector hook
Hook was disconnected from plugin flow since commit 4a82ff40.
Never called at runtime, superseded by preemptive-compaction hook.
2026-02-01 14:16:21 +09:00
justsisyphus
f9bc23b39f fix: regenerate bun.lock to restore vscode-jsonrpc dependency
- vscode-jsonrpc was missing from lockfile, breaking LSP tools
- Platform binaries restored to 3.1.10 (was incorrectly 3.0.0-beta.8)
2026-02-01 14:16:14 +09:00
github-actions[bot]
69e3bbe362 @edxeth has signed the CLA in code-yeongyu/oh-my-opencode#1348 2026-02-01 00:58:36 +00:00
github-actions[bot]
8c3feb8a9d @dmealing has signed the CLA in code-yeongyu/oh-my-opencode#1296 2026-01-31 20:24:00 +00:00
github-actions[bot]
8b2c134622 @taetaetae has signed the CLA in code-yeongyu/oh-my-opencode#1333 2026-01-31 17:49:05 +00:00
YeonGyu-Kim
96e7b39a83 fix: use _resetForTesting() consistently to prevent flaky tests (#1318)
- Replace setMainSession(undefined) with _resetForTesting() in keyword-detector tests
- Add _resetForTesting() to afterEach hooks for proper cleanup
- Un-skip the previously flaky mainSessionID test in state.test.ts

Fixes #848

Co-authored-by: 배지훈 <new0126@naver.com>
2026-01-31 16:34:07 +09:00
Sisyphus
bb181ee572 fix(background-agent): track and cancel completion timers to prevent memory leaks (#1058)
Track setTimeout timers in notifyParentSession using a completionTimers Map.
Clear all timers on shutdown() and when tasks are deleted via session.deleted.
This prevents the BackgroundManager instance from being held in memory by
uncancelled timer callbacks.

Fixes #1043

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-01-31 16:26:01 +09:00
YeonGyu-Kim
8aa2549368 Merge pull request #1056 from code-yeongyu/feat/glm-4.7-thinking-mode
feat(think-mode): add GLM-4.7 thinking mode support
2026-01-31 16:12:28 +09:00
YeonGyu-Kim
d18bd068c3 Merge pull request #1053 from code-yeongyu/fix/windows-lsp-bun-version-check
fix(lsp): add Bun version check for Windows LSP segfault bug
2026-01-31 16:12:05 +09:00
Nguyen Khac Trung Kien
b03e463bde fix: prevent zombie processes with proper process lifecycle management (#1306)
* fix: prevent zombie processes with proper process lifecycle management

- Await proc.exited for fire-and-forget spawns in tmux-utils.ts
- Remove competing process.exit() calls from LSP client and skill-mcp-manager
  signal handlers to let background-agent manager coordinate final exit
- Await process exit after kill() in interactive-bash timeout handler
- Await process exit after kill() in LSP client stop() method

These changes ensure spawned processes are properly reaped and prevent
orphan/zombie processes when running with tmux integration.

* fix: address Copilot review comments on process cleanup

- LSP cleanup: use async/sync split with Promise.allSettled for proper subprocess cleanup
- LSP stop(): make idempotent by nulling proc before await to prevent race conditions
- Interactive-bash timeout: use .then()/.catch() pattern instead of async callback to avoid unhandled rejections
- Skill-mcp-manager: use void+catch pattern for fire-and-forget signal handlers

* fix: address remaining Copilot review comments

- interactive-bash: reject timeout immediately, fire-and-forget zombie cleanup
- skill-mcp-manager: update comments to accurately describe signal handling strategy

* fix: address additional Copilot review comments

- LSP stop(): add 5s timeout to prevent indefinite hang on stuck processes
- tmux-utils: log warnings when pane title setting fails (both spawn/replace)
- BackgroundManager: delay process.exit() to next tick via setImmediate to allow other signal handlers to complete cleanup

* fix: address code review findings

- Increase exit delay from setImmediate to 100ms setTimeout to allow async cleanup
- Use asyncCleanup for SIGBREAK on Windows for consistency with SIGINT/SIGTERM
- Add try/catch around stderr read in spawnTmuxPane for consistency with replaceTmuxPane

* fix: address latest Copilot review comments

- LSP stop(): properly clear timeout when proc.exited wins the race
- BackgroundManager: use process.exitCode before delayed exit for cleaner shutdown
- spawnTmuxPane: remove redundant log import, reuse existing one

* fix: address latest Copilot review comments

- LSP stop(): escalate to SIGKILL on timeout, add logging
- tmux spawnTmuxPane/replaceTmuxPane: drain stderr immediately to avoid backpressure

* fix: address latest Copilot review comments

- Add .catch() to asyncCleanup() signal handlers to prevent unhandled rejections
- Await proc.exited after SIGKILL with 1s timeout to confirm termination

* fix: increase exit delay to 6s to accommodate LSP cleanup

LSP cleanup can take up to 5s (timeout) + 1s (SIGKILL wait), so the exit
delay must be at least 6s to ensure child processes are properly reaped.
2026-01-31 16:01:19 +09:00
YeonGyu-Kim
4a82ff40fb Consolidate duplicate patterns and simplify codebase (#1317)
* refactor(shared): unify binary downloader and session path storage

- Create binary-downloader.ts for common download/extract logic
- Create session-injected-paths.ts for unified path tracking
- Refactor comment-checker, ast-grep, grep downloaders to use shared util
- Consolidate directory injector types into shared module

* feat(shared): implement unified model resolution pipeline

- Create ModelResolutionPipeline for centralized model selection
- Refactor model-resolver to use pipeline
- Update delegate-task and config-handler to use unified logic
- Ensure consistent model resolution across all agent types

* refactor(agents): simplify agent utils and metadata management

- Extract helper functions for config merging and env context
- Register prompt metadata for all agents
- Simplify agent variant detection logic

* cleanup: inline utilities and remove unused exports

- Remove case-insensitive.ts (inline with native JS)
- Simplify opencode-version helpers
- Remove unused getModelLimit, createCompactionContextInjector exports
- Inline transcript entry creation in claude-code-hooks
- Update tests accordingly

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-31 15:46:14 +09:00
justsisyphus
4b5e38f8f8 fix(hooks): make /stop-continuation one-time only and respect in session recovery
- Clear stop state when user sends new message (chat.message handler)
- Add isContinuationStopped check to session error recovery block
- Continuation resumes automatically after user interaction
2026-01-31 15:24:27 +09:00
YeonGyu-Kim
e63c568c4f feat(hooks): add /stop-continuation command to halt all continuation mechanisms (#1316)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-31 15:09:05 +09:00
justsisyphus
ddfbdbb84e docs(skill): enforce exhaustive pagination in github-issue-triage
- Add critical warnings about using --limit 500 instead of 100
- Add verification checklist before proceeding to Phase 2
- Add severity levels to anti-patterns (CRITICAL/HIGH/MEDIUM)
- Emphasize counting results and fetching additional pages if needed
2026-01-31 14:25:16 +09:00
justsisyphus
41dd4ce22a fix: always switch to atlas in /start-work to fix Prometheus sessions
Fixes #1298
2026-01-31 13:00:18 +09:00
github-actions[bot]
4f26e99ee7 release: v3.1.10 2026-01-31 03:52:22 +00:00
Kwanghyun Moon
b405494808 fix: resolve deadlock in config handler during plugin initialization (#1304)
* fix: resolve deadlock in config handler during plugin initialization

The config handler and createBuiltinAgents were calling fetchAvailableModels
with client, which triggers client.provider.list() API call to OpenCode server.
This caused a deadlock because:
- Plugin initialization waits for server response
- Server waits for plugin init to complete before handling requests

Now using cache-only mode by passing undefined instead of client.
If cache is unavailable, the fallback chain will use the first model.

Fixes #1301

* test: add regression tests for deadlock prevention in fetchAvailableModels

Add tests to ensure fetchAvailableModels is called with undefined client
during plugin initialization. This prevents regression on issue #1301.

- config-handler.test.ts: verify config handler does not pass client
- utils.test.ts: verify createBuiltinAgents does not pass client

* test: restore spies in utils.test.ts to prevent test pollution

Add mockRestore() calls for all spies created in test cases to ensure proper cleanup between tests and prevent state leakage.

* test: restore fetchAvailableModels spy

---------

Co-authored-by: robin <robin@watcha.com>
Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-31 12:46:05 +09:00
github-actions[bot]
839a4c5316 @robin-watcha has signed the CLA in code-yeongyu/oh-my-opencode#1303 2026-01-30 22:37:44 +00:00
github-actions[bot]
08d43efdb0 @khduy has signed the CLA in code-yeongyu/oh-my-opencode#1297 2026-01-30 18:35:46 +00:00
khduy
4c40c3adb1 fix(claude-code-hooks): deduplicate settings paths to prevent double hook execution
When cwd equals home directory, ~/.claude/settings.json was being loaded
twice (once as home config and once as cwd config), causing hooks like
Stop to execute twice.

This adds deduplication using Set to ensure each config file is only
loaded once.
2026-01-31 01:30:28 +07:00
justsisyphus
061a5f5132 refactor(momus): simplify prompt to prevent nitpicking and infinite loops
- Reduce prompt from 392 to 125 lines
- Add APPROVAL BIAS: approve by default, reject only for blockers
- Limit max 3 issues per rejection to prevent overwhelming feedback
- Remove 'ruthlessly critical' tone, add 'practical reviewer' approach
- Add explicit anti-patterns section for what NOT to reject
- Define 'good enough' criteria (80% clear = pass)
- Update tests to match simplified prompt structure
2026-01-31 00:51:51 +09:00
github-actions[bot]
d4acd23630 @KonaEspresso94 has signed the CLA in code-yeongyu/oh-my-opencode#1289 2026-01-30 15:33:41 +00:00
konaespresso94
ba129784f5 fix(agents): honor tools overrides via permission migration 2026-01-31 00:29:11 +09:00
github-actions[bot]
c77c9ceb53 release: v3.1.9 2026-01-30 14:15:54 +00:00
YeonGyu-Kim
8c2625cfb0 🏆 test: optimize test suite with FakeTimers and race condition fixes (#1284)
* fix: exclude prompt/permission from plan agent config

plan agent should only inherit model settings from prometheus,
not the prompt or permission. This ensures plan agent uses
OpenCode's default behavior while only overriding the model.

* test(todo-continuation-enforcer): use FakeTimers for 15x faster tests

- Add custom FakeTimers implementation (~100 lines)
- Replace all real setTimeout waits with fakeTimers.advanceBy()
- Test time: 104.6s → 7.01s

* test(callback-server): fix race conditions with Promise.all and Bun.fetch

- Use Bun.fetch.bind(Bun) to avoid globalThis.fetch mock interference
- Use Promise.all pattern for concurrent fetch/waitForCallback
- Add Bun.sleep(10) in afterEach for port release

* test(concurrency): replace placeholder assertions with getCount checks

Replace 6 meaningless expect(true).toBe(true) assertions with
actual getCount() verifications for test quality improvement

* refactor(config-handler): simplify planDemoteConfig creation

Remove unnecessary IIFE and destructuring, use direct spread instead

* test(executor): use FakeTimeouts for faster tests

- Add custom FakeTimeouts implementation
- Replace setTimeout waits with fakeTimeouts.advanceBy()
- Test time reduced from ~26s to ~6.8s

* test: fix gemini model mock for artistry unstable mode

* test: fix model list mock payload shape

* test: mock provider models for artistry category

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-30 22:10:52 +09:00
github-actions[bot]
3ced20d1ab @kunal70006 has signed the CLA in code-yeongyu/oh-my-opencode#1282 2026-01-30 09:56:07 +00:00
github-actions[bot]
fb02cc9e95 @Zacks-Zhang has signed the CLA in code-yeongyu/oh-my-opencode#1280 2026-01-30 08:51:59 +00:00
Zacks Zhang
3bb4289b18 fix(lsp): prevent stale diagnostics by syncing didChange 2026-01-30 16:39:55 +08:00
justsisyphus
80ee52fe3b fix: improve model resolution with client API fallback and explicit model passing
- fetchAvailableModels now falls back to client.model.list() when cache is empty
- provider-models cache empty → models.json → client API (3-tier fallback)
- look-at tool explicitly passes registered agent's model to session.prompt
- Ensures multimodal-looker uses correctly resolved model (e.g., gemini-3-flash-preview)
- Add comprehensive tests for fuzzy matching and fallback scenarios
2026-01-30 16:57:21 +09:00
github-actions[bot]
2f7e188cb5 @Hisir0909 has signed the CLA in code-yeongyu/oh-my-opencode#1275 2026-01-30 07:33:44 +00:00
justsisyphus
f8be01c6dd test: update Atlas fallback test and misc code improvements
- Update Atlas fallback test to expect k2p5 as primary (kimi-for-coding)

- Minor improvements to connected-providers-cache and utils

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-30 16:19:02 +09:00
justsisyphus
0dbec08923 feat(cli): add kimi-for-coding provider to model fallback
- Add kimiForCoding field to ProviderAvailability interface

- Add kimi-for-coding provider mapping in isProviderAvailable

- Include kimi-for-coding in Sisyphus fallback chain for non-max plan

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-30 16:19:02 +09:00
justsisyphus
691fa8b815 refactor(sisyphus-junior): extract MODE constant and add export
- Add AgentMode type import and MODE constant

- Export mode on createSisyphusJuniorAgentWithOverrides function

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-30 16:19:02 +09:00
justsisyphus
a73d806d4e docs: update explore agent model and category descriptions
- Change explore agent from Grok Code to Claude Haiku 4.5

- Update deep category description for clarity

- Fix Momus fallback chain order

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-30 16:19:02 +09:00
justsisyphus
a424f81cd5 docs: update Sisyphus fallback chain across all documentation
Update Sisyphus fallback chain to include gpt-5.2-codex and gemini-3-pro

Files: AGENTS.md, README*.md, src/agents/AGENTS.md

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-30 16:19:02 +09:00
justsisyphus
1187a02020 fix: Atlas respects fallbackChain, always refresh provider-models cache
- Remove uiSelectedModel from Atlas model resolution (use k2p5 as primary)
- Always overwrite provider-models.json on session start to prevent stale cache
2026-01-30 16:19:02 +09:00
Junho Yeo
3074434887 fix: use correct gh api command for starring repo (#1274)
`gh repo star` is not a valid GitHub CLI command.
Use `gh api --silent --method PUT /user/starred/OWNER/REPO` instead.
2026-01-30 15:58:56 +09:00
justsisyphus
6bb2854162 Merge branch 'omo-avail' into dev 2026-01-30 15:28:20 +09:00
justsisyphus
e08904a27a feat: add artistry category to ultrawork-mode specialist delegation
- Add oracle vs artistry distinction in MANDATORY CERTAINTY PROTOCOL
- Update WHEN IN DOUBT examples with both delegation options
- Add artistry to IF YOU ENCOUNTER A BLOCKER section
- Add 'Hard problem (non-conventional)' row to AGENTS UTILIZATION table
- Update analyze-mode message with artistry specialist option

Oracle: conventional problems (architecture, debugging, complex logic)
Artistry: non-conventional problems (different approach needed)
2026-01-30 15:19:38 +09:00
justsisyphus
0188d69233 test: add requiresModel and isModelAvailable tests 2026-01-30 15:11:32 +09:00
justsisyphus
2c74f608f0 feat(delegate-task, agents): check requiresModel for conditional activation 2026-01-30 15:11:27 +09:00
justsisyphus
baefd16b3f feat(shared): add requiresModel field and isModelAvailable helper 2026-01-30 15:11:19 +09:00
justsisyphus
b1b4578906 feat: add opencode/kimi-k2.5-free fallback and prioritize kimi for atlas 2026-01-30 15:10:38 +09:00
justsisyphus
9d20a5b11c feat: add kimi-for-coding provider to installer and fix model ID to k2p5 2026-01-30 15:08:26 +09:00
justsisyphus
d2d8d1a782 feat: add kimi-k2.5 to agent fallback chains and update model catalog
- sisyphus: opus → kimi-k2.5 → glm-4.7 → gpt-5.2-codex → gemini-3-pro
- atlas: sonnet-4-5 → kimi-k2.5 → gpt-5.2 → gemini-3-pro
- prometheus/metis: opus → kimi-k2.5 → gpt-5.2 → gemini-3-pro
- multimodal-looker: gemini-flash → gpt-5.2 → glm-4.6v → kimi-k2.5 → haiku → gpt-5-nano
- visual-engineering: remove gpt-5.2 from chain
- ultrabrain: reorder to gpt-5.2-codex → gemini-3-pro → opus
- Add cross-provider fuzzy match for model resolution
- Update all documentation (AGENTS.md, features.md, configurations.md, category-skill-guide.md)
2026-01-30 14:53:50 +09:00
justsisyphus
10bdb6c694 chore: update artistry category description for creative problem-solving 2026-01-30 14:53:50 +09:00
justsisyphus
5f243e2d3a chore: add glm-4.7 to visual-engineering fallback chain 2026-01-30 14:53:50 +09:00
justsisyphus
82a47ff928 chore: add code style requirements to ultrabrain prompt
- MUST search existing codebase for patterns before writing code
- MUST match project's existing conventions
- MUST write readable, human-friendly code
2026-01-30 14:53:50 +09:00
justsisyphus
c06f38693e refactor: revamp ultrabrain category with deep work mindset
- Add variant: max to ultrabrain's gemini-3-pro fallback entry
- Rename STRATEGIC_CATEGORY_PROMPT_APPEND to ULTRABRAIN_CATEGORY_PROMPT_APPEND
- Keep original strategic advisor prompt content (no micromanagement instructions)
- Update description: use only for genuinely hard tasks, give clear goals only
- Update tests to match renamed constant
2026-01-30 14:53:50 +09:00
justsisyphus
6e9cb7ecd8 chore: add variant max to momus opus-4-5 fallback entry 2026-01-30 14:53:50 +09:00
justsisyphus
b731399edf chore: prioritize gemini-3-pro over opus in oracle fallback chain
- Move gemini-3-pro above claude-opus-4-5 in oracle's fallbackChain
- Add variant: "max" to gemini-3-pro entry
2026-01-30 14:53:50 +09:00
github-actions[bot]
0a28f6a790 @gabriel-ecegi has signed the CLA in code-yeongyu/oh-my-opencode#1271 2026-01-30 05:13:19 +00:00
justsisyphus
4e529b74e0 revert: remove unnecessary NODE_AUTH_TOKEN from publish.yml (OIDC works) 2026-01-30 13:54:46 +09:00
justsisyphus
90eec0a369 fix: add NODE_AUTH_TOKEN env to main publish workflow 2026-01-30 13:50:55 +09:00
justsisyphus
3b5d18e6bf fix(agents): exclude subagents from UI model selection override
Subagents (explore, librarian, oracle, etc.) now use their own fallback
chain instead of inheriting the UI-selected model. This fixes the issue
where explore agent was incorrectly using Opus instead of Haiku.

- Add AgentMode type and static mode property to AgentFactory
- Each agent declares its own mode via factory.mode = MODE pattern
- createBuiltinAgents() checks source.mode before passing uiSelectedModel
2026-01-30 13:49:40 +09:00
justsisyphus
67aeb9cb8c chore: replace big-pickle model with glm-4.7-free 2026-01-30 13:44:04 +09:00
justsisyphus
b1c1f02172 fix: add NODE_AUTH_TOKEN env to publish step 2026-01-30 13:36:20 +09:00
justsisyphus
2b39d119cd fix: restore registry-url for npm auth with new granular token 2026-01-30 13:21:35 +09:00
justsisyphus
afa2ece847 fix: remove registry-url from setup-node to enable OIDC auth 2026-01-30 13:11:44 +09:00
justsisyphus
390c25197f fix: manually create .npmrc without token for OIDC
setup-node with registry-url injects NODE_AUTH_TOKEN secret which is revoked.
Create .npmrc manually with empty _authToken to force OIDC authentication.
2026-01-30 12:57:15 +09:00
justsisyphus
9e07b143df fix: match main workflow's OIDC setup exactly
Main workflow works with registry-url + NPM_CONFIG_PROVENANCE.
Removed all extra env vars and debugging - simplify to match working pattern.
2026-01-30 12:52:57 +09:00
justsisyphus
ad95880198 fix(start-work): restore atlas agent and proper model fallback chain
- Restore agent: 'atlas' in start-work command (removed by PR #1201)
- Fix model-resolver to properly iterate through fallback chain providers
- Remove broken parent model inheritance that bypassed fallback logic
- Add model-suggestion-retry for runtime API failures (cherry-pick 800846c1)

Fixes #1200
2026-01-30 12:52:46 +09:00
justsisyphus
86088d3a6e fix: remove registry-url to enable npm OIDC auto-detection
- Remove registry-url from setup-node (was injecting NODE_AUTH_TOKEN)
- Add npm version check and auto-upgrade for OIDC support (11.5.1+)
- Add explicit --registry flag to npm publish
- Remove empty NODE_AUTH_TOKEN/NPM_CONFIG_USERCONFIG env vars that were breaking OIDC
2026-01-30 12:47:15 +09:00
justsisyphus
ae8a6c5eb8 refactor: replace console.log/warn/error with file-based log() for silent logging
Replace all console output with shared logger to write to
/tmp/oh-my-opencode.log instead of stdout/stderr.

Files changed:
- index.ts: console.warn → log()
- hook-message-injector/injector.ts: console.warn → log()
- lsp/client.ts: console.error → log()
- ast-grep/downloader.ts: console.log/error → log()
- session-recovery/index.ts: console.error → log()
- comment-checker/downloader.ts: console.log/error → log()

CLI tools (install.ts, doctor, etc.) retain console output for UX.
2026-01-30 12:45:37 +09:00
justsisyphus
db538c7e6b fix(ci): override env vars to disable token auth, force OIDC 2026-01-30 12:41:00 +09:00
justsisyphus
dfed2abd3e fix(ci): also remove NPM_CONFIG_USERCONFIG .npmrc and unset tokens for OIDC 2026-01-30 12:37:12 +09:00
justsisyphus
300a3fdc14 fix(ci): remove .npmrc to enable pure OIDC auth for npm publish 2026-01-30 12:33:51 +09:00
justsisyphus
c993cf007f fix(ci): remove registry-url to use pure OIDC auth for npm publish 2026-01-30 12:29:33 +09:00
justsisyphus
3d7de0a050 fix(publish-platform): use 7z on Windows, simplify skip logic 2026-01-30 12:25:30 +09:00
justsisyphus
8e19ffdce4 ci(publish-platform): separate build/publish jobs with OIDC provenance
- Split into two jobs: build (compile binaries) and publish (npm publish)
- Build job uploads compressed artifacts (tar.gz/zip)
- Publish job downloads artifacts and uses OIDC Trusted Publishing
- Removes NODE_AUTH_TOKEN dependency, uses npm provenance instead
- Increased timeout for large binary uploads (40-120MB)
- Build parallelism increased to 7 (all platforms simultaneously)
- Fixes npm classic token deprecation issue

Benefits:
- Fresh OIDC token at publish time avoids timeout issues
- No token rotation needed (OIDC is ephemeral)
- Build failures isolated from publish failures
- Artifacts can be reused if publish fails
2026-01-30 12:21:24 +09:00
github-actions[bot]
456d9cea65 release: v3.1.8 2026-01-30 02:58:12 +00:00
justsisyphus
30f893b766 fix(cli/run): fix [undefine] tag and add text preview to verbose log
- Fix sessionTag showing '[undefine]' when sessionID is undefined
  - System events now display as '[system]' instead
- Fix message.updated expecting non-existent 'content' field
  - SDK's EventMessageUpdated only contains info metadata, not content
  - Content is streamed via message.part.updated events
- Add text preview to message.part.updated verbose logging
- Update MessageUpdatedProps type to match SDK structure
- Update tests to reflect actual SDK behavior
2026-01-30 11:45:58 +09:00
justsisyphus
c905e1cb7a fix(delegate-task): restore resolved.model to category userModel chain (#1227)
PR #1227 incorrectly removed resolved.model from the userModel chain,
assuming it was bypassing the fallback chain. However, resolved.model
contained the category's DEFAULT_CATEGORIES model (e.g., quick ->
claude-haiku-4-5), not the main session model.

Without resolved.model, when connectedProvidersCache is null and
availableModels is empty, category model resolution falls through to
systemDefaultModel (opus) instead of using the category's default.

This fix restores the original priority:
1. User category model override
2. Category default model (from resolved.model)
3. sisyphusJuniorModel
4. Fallback chain
5. System default
2026-01-30 11:45:19 +09:00
YeonGyu-Kim
d3e2b36e3d refactor(tmux-subagent): introduce dependency injection for testability (#1267)
Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-30 10:59:54 +09:00
YeonGyu-Kim
5f0b6d49f5 fix(run): prevent premature exit on idle before meaningful work (#1263)
The run command's completion check had a race condition: when a session
transitions busy->idle before the LLM generates any output (empty
response or API delay), checkCompletionConditions() returns true because
0 incomplete todos + 0 busy children = complete. This caused the runner
to exit with 'All tasks completed' before any work was done.

Fix:
- Add hasReceivedMeaningfulWork flag to EventState
- Set flag on: assistant text content, tool execution, or message update
  with actual content (all scoped to main session only)
- Guard completion check in runner poll loop: skip if no meaningful work
  has been observed yet

This ensures the runner waits until the session has produced at least one
observable output before considering completion conditions.

Adds 6 new test cases covering the race condition scenarios.
2026-01-30 09:10:24 +09:00
github-actions[bot]
b45408dd9c @LeekJay has signed the CLA in code-yeongyu/oh-my-opencode#1254 2026-01-29 17:03:39 +00:00
LeekJay
64b29ea097 feat(skill-loader): support nested skill directories
Add recursive directory scanning to discover skills in nested directories
like superpowers (e.g., skills/superpowers/brainstorming/SKILL.md).

Changes:
- Add namePrefix, depth, and maxDepth parameters to loadSkillsFromDir
- Recurse into subdirectories when no SKILL.md found at current level
- Construct hierarchical skill names (e.g., 'superpowers/brainstorming')
- Limit recursion depth to 2 levels to prevent infinite loops

This enables compatibility with the superpowers plugin which installs
skills as: ~/.config/opencode/skills/superpowers/ -> superpowers/skills/

Fixes skill discovery for nested directory structures.
2026-01-30 00:39:43 +08:00
github-actions[bot]
6c8527f29b release: v3.1.7 2026-01-29 12:39:22 +00:00
justsisyphus
cd4da93bf2 fix(test): migrate config-handler tests from mock.module to spyOn to prevent cross-file cache pollution 2026-01-29 21:35:14 +09:00
justsisyphus
71b2f1518a chore(agents): unify agent description format with OhMyOpenCode attribution 2026-01-29 21:27:04 +09:00
YeonGyu-Kim
dcda8769cc feat(mcp-oauth): add full OAuth 2.1 authentication for MCP servers (#1169)
* feat(mcp-oauth): add oauth field to ClaudeCodeMcpServer schema

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(mcp-oauth): add RFC 7591 Dynamic Client Registration

* feat(mcp-oauth): add RFC 9728 PRM + RFC 8414 AS discovery

* feat(mcp-oauth): add secure token storage with {host}/{resource} key format

* feat(mcp-oauth): add dynamic port OAuth callback server

* feat(mcp-oauth): add RFC 8707 Resource Indicators

* feat(mcp-oauth): implement full-spec McpOAuthProvider

* feat(mcp-oauth): add step-up authorization handler

* feat(mcp-oauth): integrate authProvider into SkillMcpManager

* feat(doctor): add MCP OAuth token status check

* feat(cli): add mcp oauth subcommand structure

* feat(cli): implement mcp oauth login command

* fix(mcp-oauth): address cubic review — security, correctness, and test issues

- Remove @ts-nocheck from provider.ts, storage.ts, provider.test.ts
- Fix server resource leak on missing code/state (close + reject)
- Fix command injection in openBrowser (spawn array args, cross-platform)
- Mock McpOAuthProvider in login.test.ts for deterministic CI
- Recreate auth provider with merged scopes in step-up flow
- Add listAllTokens() for global status listing
- Fix logout to accept --server-url for correct token deletion
- Support both quoted and unquoted WWW-Authenticate params (RFC 2617)
- Save/restore OPENCODE_CONFIG_DIR in storage.test.ts
- Fix index.test.ts: vitest → bun:test

* fix(mcp-oauth): use explorer instead of cmd /c start on Windows to prevent shell injection

* fix(mcp-oauth): address remaining cubic review issues

- Add 5-minute timeout to provider callback server to prevent indefinite hangs
- Persist client registration from token storage across process restarts
- Require --server-url for logout to match token storage key format
- Use listTokensByHost for server-specific status lookups
- Fix callback-server test to handle promise rejection ordering
- Fix provider test port expectations (8912 → 19877)
- Fix cli-guide.md duplicate Section 7 numbering
- Fix manager test for login-on-missing-tokens behavior

* fix(mcp-oauth): address final review issues

- P1: Redact token values in status.ts output to prevent credential leakage
- P2: Read OAuth error response body before throwing in token exchange
- Test: Fix mcp-oauth doctor test to use epoch seconds (not milliseconds)

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-29 19:48:36 +09:00
YeonGyu-Kim
a94fbadd57 Migrate LSP client to vscode-jsonrpc for improved stability (#1095)
* refactor(lsp): migrate to vscode-jsonrpc for improved stability

Replace custom JSON-RPC implementation with vscode-jsonrpc library.
Use MessageConnection with StreamMessageReader/Writer.
Implement Bun↔Node stream bridges for compatibility.
Preserve all existing functionality (warmup, cleanup, capabilities).
Net reduction of ~60 lines while improving protocol handling.

* fix(lsp): clear timeout on successful response to prevent unhandled rejections

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-29 19:48:28 +09:00
YeonGyu-Kim
23b49c4a5c fix: expand override.category and explicit reasoningEffort priority (#1219) (#1235)
* fix: expand override.category and explicit reasoningEffort priority (#1219)

Two bugs fixed:

1. createBuiltinAgents(): override.category was never expanded into concrete
   config properties (model, variant, reasoningEffort, etc.). Added
   applyCategoryOverride() helper and applied it in the standard agent loop,
   Sisyphus path, and Atlas path.

2. Prometheus config-handler: reasoningEffort/textVerbosity/thinking from
   direct override now use explicit priority chains (direct > category)
   matching the existing variant pattern, instead of relying on spread
   ordering.

Priority order (highest to lowest):
  1. Direct override properties
  2. Override category properties
  3. Resolved variant from model fallback chain
  4. Factory base defaults

Closes #1219

* fix: use undefined check for thinking to allow explicit false
2026-01-29 19:46:34 +09:00
YeonGyu-Kim
b4973954e3 fix(background-agent): prevent zombie processes by aborting sessions on shutdown (#1240) (#1243)
- BackgroundManager.shutdown() now aborts all running child sessions via
  client.session.abort() before clearing state, preventing orphaned
  opencode processes when parent exits
- Add onShutdown callback to BackgroundManager constructor, used to
  trigger TmuxSessionManager.cleanup() on process exit signals
- Interactive bash session hook now aborts tracked subagent opencode
  sessions when killing tmux sessions (defense-in-depth)
- Add 4 tests verifying shutdown abort behavior and callback invocation

Closes #1240
2026-01-29 18:29:47 +09:00
github-actions[bot]
6d50fbe563 @Lynricsy has signed the CLA in code-yeongyu/oh-my-opencode#1241 2026-01-29 09:00:40 +00:00
YeonGyu-Kim
9850dd0f6e fix(test): align agent tests with connected-providers-cache fallback behavior (#1227)
Tests in utils.test.ts were written before bffa1ad introduced
connected-providers-cache fallback in resolveModelWithFallback.
Update assertions to match the new resolution path:
- Oracle resolves to openai/gpt-5.2 via cache (not systemDefault)
- Agents are created via cache fallback even without systemDefaultModel
2026-01-29 11:47:17 +09:00
YeonGyu-Kim
34aaef2219 fix(delegate-task): pass registered agent model explicitly for subagent_type (#1225)
When delegate_task uses subagent_type, extract the matched agent's model
object and pass it explicitly to session.prompt/manager.launch. This
ensures the model is always in the correct object format regardless of
how OpenCode handles string→object conversion for plugin-registered
agents.

Closes #1225
2026-01-29 11:27:07 +09:00
Mike
faca80caa9 fix(start-work): prevent overwriting session agent if already set; inherit parent model for subagent types (#1201)
* fix(start-work): prevent overwriting session agent if already set; inherit parent model for subagent types

* fix(model): include variant in StoredMessage model structure for better context propagation

* fix(injector): include variant in model structure for hook message injection
2026-01-29 09:30:37 +09:00
SUHO LEE
0c3fbd724b fix(model-resolver): respect UI model selection in agent initialization (#1158)
- Add uiSelectedModel parameter to resolveModelWithFallback()
- Update model resolution priority: UI Selection → Config Override → Fallback → System Default
- Pass config.model as uiSelectedModel in createBuiltinAgents()
- Fix ProviderModelNotFoundError when model is unset in config but selected in UI
2026-01-29 09:30:35 +09:00
Srijan Guchhait
c7455708f8 docs: Add missing configuration options to configurations.md (#1186)
- Add disabled_commands section with available commands
- Add comment_checker configuration (custom_prompt)
- Add notification configuration (force_enable)
- Add sisyphus tasks & swarm configuration sections
- Add staleTimeoutMs to background_task section
- Add dynamic_context_pruning to experimental section with full documentation
- Extend skills configuration with advanced options (sources, custom skills)
- Extend agents configuration with missing options (category, variant, maxTokens, thinking, reasoningEffort, textVerbosity, providerOptions)
- Extend categories configuration with missing options (description, is_unstable_agent)
- Extend LSP configuration with missing server options (env, initialization, disabled) and detailed examples
- Add missing hooks (auto-slash-command, sisyphus-junior-notepad, start-work) to hooks list
- Update available agents list to include all agents from schema

Co-authored-by: GitHub Actions <actions@github.com>
2026-01-29 09:30:32 +09:00
Peïo Thibault
bffa1ad43d fix(model-resolver): use connected providers cache when model cache is empty (#1227)
- Remove resolved.model from userModel in tools.ts (was bypassing fallback chain)
- Use connected providers cache in model-resolver when availableModels is empty
- Allows proper provider selection (e.g., github-copilot instead of google)
2026-01-29 09:30:19 +09:00
github-actions[bot]
6560dedd4c @mrdavidlaing has signed the CLA in code-yeongyu/oh-my-opencode#1226 2026-01-28 19:51:45 +00:00
sisyphus-dev-ai
b7e32a99f2 chore: changes by sisyphus-dev-ai 2026-01-28 16:51:21 +00:00
github-actions[bot]
a06e656565 release: v3.1.6 2026-01-28 16:15:27 +00:00
justsisyphus
30ed086c40 fix(delegate-task): use category default model when availableModels is empty 2026-01-29 01:11:42 +09:00
justsisyphus
7c15b06da7 fix(test): update tests to reflect new model-resolver behavior 2026-01-29 00:54:16 +09:00
justsisyphus
0e7ee2ac30 chore: remove noisy console.warn for AGENTS.md auto-disable 2026-01-29 00:46:16 +09:00
justsisyphus
ca93d2f0fe fix(model-resolver): skip fallback chain when model availability cannot be verified
When model cache is empty, the fallback chain resolution was blindly
trusting connected providers without verifying if the model actually
exists. This caused errors when a provider (e.g., opencode) was marked
as connected but didn't have the requested model (e.g., claude-haiku-4-5).

Now skips fallback chain entirely when model cache is unavailable and
falls through to system default, letting OpenCode handle the resolution.
2026-01-29 00:15:57 +09:00
YeonGyu-Kim
3ab4529bc7 fix(look-at): handle JSON parse errors from session.prompt gracefully (#1216)
When multimodal-looker agent returns empty/malformed response, the SDK
throws 'JSON Parse error: Unexpected EOF'. This commit adds try-catch
around session.prompt() to provide user-friendly error message with
troubleshooting guidance.

- Add error handling for JSON parse errors with detailed guidance
- Add error handling for generic prompt failures
- Add test cases for both error scenarios
2026-01-28 23:58:01 +09:00
github-actions[bot]
9d3e152b19 @KennyDizi has signed the CLA in code-yeongyu/oh-my-opencode#1214 2026-01-28 14:26:21 +00:00
github-actions[bot]
68c8f3dda7 release: v3.1.5 2026-01-28 14:15:42 +00:00
justsisyphus
03f6e72c9b refactor(ultrawork): replace prometheus with plan agent, add parallel task graph output
- Change all prometheus references to plan agent in ultrawork mode
- Add MANDATORY OUTPUT section to ULTRAWORK_PLANNER_SECTION:
  - Parallel Execution Waves structure
  - Dependency Matrix format
  - TODO List with category + skills + parallel group
  - Agent Dispatch Summary table
- Plan agent now outputs parallel task graphs for orchestrator execution
2026-01-28 23:09:51 +09:00
justsisyphus
4fd9f0fd04 refactor(agents): enforce zero user intervention in QA/acceptance criteria
- Prometheus: rename 'Manual QA' to 'Automated Verification Only'
- Prometheus: add explicit ZERO USER INTERVENTION principle
- Prometheus: replace placeholder examples with concrete executable commands
- Metis: add QA automation directives in output format
- Metis: strengthen CRITICAL RULES to forbid user-intervention criteria
2026-01-28 23:00:55 +09:00
github-actions[bot]
4413336724 @youming-ai has signed the CLA in code-yeongyu/oh-my-opencode#1203 2026-01-28 13:04:28 +00:00
Doyoon Kwon
895f366a11 docs: add Ollama streaming NDJSON issue guide and workaround (#1197)
* docs: add Ollama streaming NDJSON issue troubleshooting guide

- Document problem: JSON Parse error when using Ollama with stream: true
- Explain root cause: NDJSON vs single JSON object mismatch
- Provide 3 solutions: disable streaming, avoid tool agents, wait for SDK fix
- Include NDJSON parsing code example for SDK maintainers
- Add curl testing command for verification
- Link to issue #1124 and Ollama API docs

Fixes #1124

* docs: add Ollama provider configuration with streaming workaround

- Add Ollama Provider section to configurations.md
- Document stream: false requirement for Ollama
- Explain NDJSON vs single JSON mismatch
- Provide supported models table (qwen3-coder, ministral-3, lfm2.5-thinking)
- Add troubleshooting steps and curl test command
- Link to troubleshooting guide

feat: add NDJSON parser utility for Ollama streaming responses

- Create src/shared/ollama-ndjson-parser.ts
- Implement parseOllamaStreamResponse() for merging NDJSON lines
- Implement isNDJSONResponse() for format detection
- Add TypeScript interfaces for Ollama message structures
- Include JSDoc with usage examples
- Handle edge cases: malformed lines, stats aggregation

This utility can be contributed to Claude Code SDK for proper NDJSON support.

Related to #1124

* fix: use logger instead of console, remove trailing whitespace

- Replace console.warn with log() from shared/logger
- Remove trailing whitespace from troubleshooting guide
- Ensure TypeScript compatibility
2026-01-28 19:01:33 +09:00
YeonGyu-Kim
acc19fcd41 feat(hooks): auto-disable directory-agents-injector for OpenCode 1.1.37+ native support (#1204)
* feat(delegate-task): add prometheus self-delegation block and delegate_task permission

- Block prometheus from delegating to itself via delegate_task
- Grant delegate_task permission to prometheus when called as subagent
- Other subagents still have delegate_task disabled

* feat(version): add OPENCODE_NATIVE_AGENTS_INJECTION_VERSION constant

* docs: add deprecation notes for directory-agents-injector

* feat(hooks): auto-disable directory-agents-injector for OpenCode 1.1.37+

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-28 18:46:51 +09:00
justsisyphus
68e0a32183 chore(issue-templates): add English language requirement checkbox 2026-01-28 18:24:15 +09:00
justsisyphus
dee89c1556 feat(delegate-task): add prometheus self-delegation block and delegate_task permission
- Block prometheus from delegating to itself via delegate_task
- Grant delegate_task permission to prometheus when called as subagent
- Other subagents still have delegate_task disabled
2026-01-28 18:24:15 +09:00
github-actions[bot]
315c75c51e @rooftop-Owl has signed the CLA in code-yeongyu/oh-my-opencode#1197 2026-01-28 08:47:09 +00:00
YeonGyu-Kim
3dd80889a5 fix(tools): add permission field to session.create() for consistency (#1192) (#1199)
- Add permission field to look_at and call_omo_agent session.create()
- Match pattern used in delegate_task and background-agent
- Add better error messages for Unauthorized failures
- Provide actionable guidance in error messages

This addresses potential session creation failures by ensuring
consistent session configuration across all tools that create
child sessions.
2026-01-28 17:35:25 +09:00
Sisyphus
8f6ed5b20f fix(hooks): add null guard for tool.execute.after output (#1054)
/review command and some Claude Code built-in commands trigger
tool.execute.after hooks with undefined output, causing crashes
when accessing output.metadata or output.output.

Fixes #1035

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-01-28 16:26:40 +09:00
TheEpTic
01500f1ebe Fix: prevent system-reminder tags from triggering mode keywords (#1155)
Automated system messages with <system-reminder> tags were incorrectly
triggering [search-mode], [analyze-mode], and other keyword modes when
they contained words like "search", "find", "explore", etc.

Changes:
- Add removeSystemReminders() to strip <system-reminder> content before keyword detection
- Add hasSystemReminder() utility function
- Update keyword-detector to clean text before pattern matching
- Add comprehensive test coverage for system-reminder filtering

Fixes issue where automated system notifications caused agents to
incorrectly enter MAXIMUM SEARCH EFFORT mode.

Co-authored-by: TheEpTic <git@eptic.me>
2026-01-28 16:26:37 +09:00
Thanh Nguyen
48f6c5e06d fix(skill): support YAML array format for allowed-tools field (#1163)
Fixes #1021

The allowed-tools field in skill frontmatter now supports both formats:
- Space-separated string: 'allowed-tools: Read Write Edit Bash'
- YAML array: 'allowed-tools: [Read, Write, Edit, Bash]'
- Multi-line YAML array format also works

Previously, skills using YAML array format would silently fail to parse,
causing them to not appear in the <available_skills> list.

Changes:
- Updated parseAllowedTools() in loader.ts, async-loader.ts, and merger.ts
  to handle both string and string[] types
- Updated SkillMetadata type to accept string | string[] for allowed-tools
- Added 4 test cases covering all allowed-tools formats
2026-01-28 16:26:34 +09:00
Moha Abdi
3e32afe646 fix(agent-variant): resolve variant based on current model, not static config (#1179) 2026-01-28 16:26:31 +09:00
Xiaoya Wang
d11c4a1f81 fix: guard JSON.parse(result.stdout) with || "{}" fallback in hook handlers (#1191)
Co-authored-by: wangxiaoya.2000 <wangxiaoya.2000@bytedance.com>
2026-01-28 16:26:28 +09:00
github-actions[bot]
5558ddf468 release: v3.1.4 2026-01-28 07:22:03 +00:00
justsisyphus
aa03d9b811 ci: sync publish.yml test isolation with ci.yml 2026-01-28 16:18:21 +09:00
YeonGyu-Kim
28a0dd06c7 fix: resolve version detection for npm global installations (#1194)
When oh-my-opencode is installed via npm global install and run as a
compiled binary, import.meta.url returns a virtual bun path ($bunfs)
instead of the actual filesystem path. This caused getCachedVersion()
to return null, resulting in 'unknown' version display.

Add fallback using process.execPath which correctly points to the actual
binary location, allowing us to walk up and find the package.json.

Fixes #1182
2026-01-28 15:54:17 +09:00
YeonGyu-Kim
995b7751af ci(cla): add repository owner to CLA allowlist (#1195)
The repository owner (code-yeongyu) was not in the CLA allowlist,
causing CLA signature requirement on their own PRs.

Added code-yeongyu to the allowlist to skip CLA for owner commits.

Co-authored-by: 김연규 <yeongyu@mengmotaMacbookAir.local>
2026-01-28 15:46:42 +09:00
justsisyphus
5087788f66 ci: split test execution to prevent mock.module pollution 2026-01-28 15:06:32 +09:00
justsisyphus
19524c8a27 ci: run tests sequentially to prevent mock.module pollution 2026-01-28 14:59:26 +09:00
justsisyphus
fbb4d46945 fix: explicit reset in mainSessionID test for parallel test safety 2026-01-28 14:40:15 +09:00
justsisyphus
5dc8d577a4 fix: add afterEach cleanup in session-state tests for parallel test isolation 2026-01-28 14:36:58 +09:00
justsisyphus
c249763d7e fix: reset sessionAgentMap in _resetForTesting for test isolation
- Add sessionAgentMap.clear() to _resetForTesting()
- Prevents test pollution when tests run in parallel in CI
2026-01-28 14:33:14 +09:00
justsisyphus
b2d618e851 fix: mock provider cache in delegate-task tests for CI stability
- Add spyOn for readConnectedProvidersCache to return connected providers
- Tests now work consistently regardless of actual provider cache state
- Fixes CI failures for category variant and unstable agent tests
2026-01-28 14:27:34 +09:00
justsisyphus
6f348a8a5c fix: resolve CI test timeouts with configurable timing
- Add timing.ts module for test-only timing configuration
- Replace hardcoded wait times with getTimingConfig()
- Enable all previously skipped tests (ralph-loop, session-state, delegate-task)
- Tests now complete in ~2s instead of timing out
2026-01-28 14:17:56 +09:00
justsisyphus
1da0adcbe8 feat(index): add provider cache missing warning toast
Show warning toast when hasConnectedProvidersCache() returns false,
indicating model filtering is disabled. Prompts user to restart
OpenCode for full functionality.
2026-01-28 13:31:11 +09:00
justsisyphus
8a9d966a3d fix(model-resolver): skip fallback chain when no cache exists
When no provider cache exists, skip the fallback chain entirely and let
OpenCode use Provider.defaultModel() as the final fallback. This prevents
incorrect model selection when the plugin loads before providers connect.

- Remove forced first-entry fallback when no cache
- Add log messages for cache miss scenarios
- Update tests for new behavior
2026-01-28 13:31:03 +09:00
justsisyphus
76f8c500cb fix(config): add 'dev-browser' to BrowserAutomationProviderSchema
Config validation was failing when 'dev-browser' was set as the browser
automation provider, causing the entire config to be rejected. This
silently disabled all config options including tmux.enabled.

- Add 'dev-browser' as valid option in BrowserAutomationProviderSchema
- Update JSDoc with dev-browser description
- Regenerate JSON schema
2026-01-28 12:05:20 +09:00
github-actions[bot]
388516bcc5 @agno01 has signed the CLA in code-yeongyu/oh-my-opencode#1188 2026-01-28 01:02:15 +00:00
github-actions[bot]
8dff875929 @zycaskevin has signed the CLA in code-yeongyu/oh-my-opencode#1184 2026-01-27 16:20:49 +00:00
github-actions[bot]
966cc90a02 release: v3.1.3 2026-01-27 16:12:43 +00:00
justsisyphus
1d27d78127 test: skip flaky sync variant test (CI timeout) 2026-01-28 01:07:14 +09:00
justsisyphus
38156d49f3 ci: use find/xargs to exclude mock-heavy test files 2026-01-28 01:01:45 +09:00
justsisyphus
897eea0263 ci: isolate mock-heavy test files to prevent parallel pollution 2026-01-28 01:00:17 +09:00
justsisyphus
9b59ef66e4 test: fix flaky tests caused by mock.module pollution across parallel test files 2026-01-28 00:54:20 +09:00
github-actions[bot]
0d938059f9 @moha-abdi has signed the CLA in code-yeongyu/oh-my-opencode#1179 2026-01-27 12:36:31 +00:00
github-actions[bot]
9d35f23725 @MoerAI has signed the CLA in code-yeongyu/oh-my-opencode#1172 2026-01-27 09:31:52 +00:00
justsisyphus
aa1646f82c fix(delegate-task): pass variant as top-level field in prompt body
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-27 17:54:58 +09:00
justsisyphus
e47ab084fd fix(keyword-detector): skip ultrawork injection for planner agents
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-27 17:54:52 +09:00
justsisyphus
baf6358736 fix(background-agent): pass variant as top-level field in prompt body 2026-01-27 16:49:03 +09:00
justsisyphus
488c89156b test(config-handler): add tests for plan demote and prometheus mode 2026-01-27 16:06:03 +09:00
justsisyphus
c4957a469d fix(prometheus): set mode to 'all' and restore plan demote logic
- Change prometheus mode from 'primary' to 'all' to allow delegate_task calls
- Restore plan agent demote logic to use prometheus config as base
- Revert d481c596 changes that broke plan agent inheritance
2026-01-27 15:57:45 +09:00
justsisyphus
d481c596bd fix(plan-agent): only inherit model from prometheus as fallback
Plan agent was incorrectly inheriting prometheus's entire config (prompt,
permission, etc.) causing it to behave as primary instead of subagent.

Now plan agent:
1. Uses plan config model if explicitly set
2. Falls back to prometheus model only if plan config has no model
3. Keeps original OpenCode plan config intact
2026-01-27 15:18:28 +09:00
justsisyphus
655d511294 Revert "docs: add v2.x to v3.x migration guide (#1057)"
This PR was incorrectly merged by AI agent without proper project owner review.

This reverts commit 1cb6b3de39a49acb43b76ac55a5b44b47ca4a9f7.
2026-01-27 14:09:37 +09:00
justsisyphus
7dedd6cf90 Revert "Add oh-my-opencode-slim (#1100)"
This PR was incorrectly merged by AI agent without proper project owner review.

The AI evaluated this as 'ULTRA SAFE' because it only modified README files,
but failed to recognize that adding external fork promotions to the project
README requires explicit project owner approval - not just technical safety.

This reverts commit 912a56db85.
2026-01-27 14:09:18 +09:00
justsisyphus
bd18f231f5 feat(sisyphus): add foundation schemas for tasks and swarm (Wave 1)
- Add SisyphusTasksConfig and SisyphusSwarmConfig to schema.ts
- Create Task JSON schema with Zod validation
- Create Mailbox IPC protocol message schemas
- Add storage utilities with Claude Code path compatibility
- 25 tests passing
2026-01-27 13:07:09 +09:00
justsisyphus
de439edc22 feat(subagent): block question tool at both SDK and hook level
- Add permission: [{ permission: 'question', action: 'deny' }] to session.create()
  in background-agent and delegate-task for SDK-level blocking
- Add subagent-question-blocker hook as backup layer to intercept question tool
  calls in tool.execute.before event
- Ensures subagents cannot ask questions to users and must work autonomously
2026-01-27 13:07:09 +09:00
github-actions[bot]
04500bae7d @code-yeongyu has signed the CLA in code-yeongyu/oh-my-opencode#1100 2026-01-27 02:59:24 +00:00
Sisyphus
1cb6b3de7d docs: add v2.x to v3.x migration guide (#1057)
Comprehensive migration guide covering:
- TL;DR quick upgrade section for most users
- What's new in v3.x (Atlas, Prometheus, categories, skills)
- Breaking changes checklist (high/medium/low impact)
- Step-by-step upgrade path
- Configuration changes (categories, permissions)
- API changes for plugin developers
- Troubleshooting common issues
- Complete agent and category reference

Consulted Oracle for migration guide strategy and structure.

Closes #1034 (item 4)

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-01-27 11:59:15 +09:00
Alvin
912a56db85 Add oh-my-opencode-slim (#1100) 2026-01-27 11:59:12 +09:00
itsmylife44
a5d9929c0a feat: support OPENCODE_SERVER_PORT and OPENCODE_SERVER_HOSTNAME env vars (#1157)
Add support for customizing the OpenCode server port and hostname via
environment variables. This enables orchestration tools like Open Agent
to run multiple concurrent missions without port conflicts.

Environment variables:
- OPENCODE_SERVER_PORT: Custom port for the OpenCode server
- OPENCODE_SERVER_HOSTNAME: Custom hostname for the OpenCode server

When running oh-my-opencode in parallel (e.g., multiple missions in
Open Agent), each instance can now use a unique port to avoid conflicts
with the default port 4096.
2026-01-27 11:59:10 +09:00
vmlinuzx
7f43f160b5 docs: clarify category model resolution priority and fallback behavior (#1074)
The previous documentation implied that categories automatically use their
built-in default models (e.g., Gemini for visual, GPT-5.2 for ultrabrain).

This was misleading. Categories only use built-in defaults if explicitly
configured. Otherwise, they fall back to the system default model.

Changes:
- Add explicit warning about model resolution priority
- Document all 7 built-in categories (was only showing 2)
- Show complete example config with all categories
- Explain the wasteful fallback scenario
- Add 'variant' to supported category options

Fixes confusion where users expect optimized model selection but get
system default for all unconfigured categories.

Co-authored-by: DC <vmlinux@p16.tailnet.freeflight.co>
2026-01-27 11:58:59 +09:00
0ln
af67bc8592 fix(mcp): add optional Context7 Authorization header (#1133)
Context7 should mirror `websearch` by only sending auth when
`CONTEXT7_API_KEY` is set.

Change: set bearer auth in `headers` using `CONTEXT7_API_KEY` if said environment variable is set, otherwise leave `headers` to `undefined`.
2026-01-27 11:58:55 +09:00
Peter Rallojay
c74d79e28a fix: prevent builtin MCPs from overwriting user MCP configs (#956) 2026-01-27 11:58:42 +09:00
justsisyphus
fc5298d778 feat(workflow): add ZAI Coding + OpenAI provider for sisyphus-agent
- Add zai-coding-plan provider with GLM 4.7 and GLM 4.6v models
- Add OpenAI provider with GPT-5.2 models
- Configure unspecified-low category to use zai-coding-plan/glm-4.7
- Auth is provided via OPENCODE_AUTH_JSON secret
2026-01-27 10:51:24 +09:00
justsisyphus
3e8e3db961 feat(prompts): enhance plan output with TL;DR, agent profiles, and parallelization
- prometheus-prompt: Add TL;DR section with quick summary, deliverables, effort estimate
- prometheus-prompt: Add recommended agent profile (category + skills) per task
- prometheus-prompt: Enhance parallelization with execution waves and dependency matrix
- ultrawork: Change plan agent to prometheus agent invocation
- ultrawork: Add session_id resume workflow for Prometheus iteration
2026-01-27 10:50:38 +09:00
justsisyphus
6fa5cac616 fix(compaction): preserve agent verification state (#1144) 2026-01-27 10:35:20 +09:00
justsisyphus
158ccabf24 fix(notification): prevent false positive plugin detection (#1148) 2026-01-27 10:35:20 +09:00
justsisyphus
2efbf2650f fix(cli): add baseline builds for non-AVX2 CPUs (#1154) 2026-01-27 10:35:20 +09:00
justsisyphus
acded4ba2a fix(delegate-task): add clear error when model not configured (#1139) 2026-01-27 10:35:20 +09:00
github-actions[bot]
911e43445f @ghtndl has signed the CLA in code-yeongyu/oh-my-opencode#1158 2026-01-27 01:27:26 +00:00
sisyphus-dev-ai
3049e1ebfb chore: changes by sisyphus-dev-ai 2026-01-27 01:10:31 +00:00
github-actions[bot]
62921b9e44 release: v3.1.2 2026-01-27 01:07:09 +00:00
github-actions[bot]
cd23f7ab7d release: v3.1.1 2026-01-26 23:48:28 +00:00
justsisyphus
518dceac72 Revert "feat(librarian): conditionally enable thinking based on model type"
This reverts commit f033b30549a396db90e148756130cddec1fcdb2b.
2026-01-27 08:39:45 +09:00
justsisyphus
19f43e30c8 feat(librarian): conditionally enable thinking based on model type
- Add isGeminiModel helper to detect Gemini models
- Disable thinking config for Gemini models (not supported)
- Enable thinking with 32000 token budget for other models
- Add tests verifying both Gemini and Claude behavior

🤖 Generated with assistance of OhMyOpenCode
2026-01-27 08:39:45 +09:00
justsisyphus
b3be9f33c6 feat(ultrawork): enforce plan agent invocation and parallel delegation
- Add MANDATORY section for delegate_task(subagent_type='plan') at top of ultrawork prompt
- Establish 'DELEGATE by default, work yourself only when trivial' principle
- Add parallel execution rules with anti-pattern and correct pattern examples
- Remove emoji (checkmark/cross) from PLAN_AGENT_SYSTEM_PREPEND
- Restructure workflow into clear 4-step sequence
2026-01-27 08:39:45 +09:00
github-actions[bot]
430098856a @itsmylife44 has signed the CLA in code-yeongyu/oh-my-opencode#1157 2026-01-26 23:20:52 +00:00
github-actions[bot]
5932f5f94f @acamq has signed the CLA in code-yeongyu/oh-my-opencode#1151 2026-01-26 18:20:30 +00:00
github-actions[bot]
fcf2e32071 @craftaholic has signed the CLA in code-yeongyu/oh-my-opencode#1110 2026-01-26 16:12:39 +00:00
github-actions[bot]
19827dac70 @orientpine has signed the CLA in code-yeongyu/oh-my-opencode#1145 2026-01-26 14:30:44 +00:00
github-actions[bot]
3ed1c6644e @Jeremy-Kr has signed the CLA in code-yeongyu/oh-my-opencode#1141 2026-01-26 11:59:22 +00:00
justsisyphus
cf6e714946 feat(plan-agent): apply prometheus config to plan agent with fallback chain
- Add prometheus model fallback chain (claude-opus-4-5 → gpt-5.2 → gemini-3-pro)
- Plan agent now inherits prometheus settings (model, prompt, permission, variant)
- Plan agent mode remains 'subagent' while using prometheus config
- Add name field to prometheus config to fix agent.name undefined error
2026-01-26 18:31:48 +09:00
justsisyphus
383f43548b feat(plan-agent): enforce dependency/parallel graphs and category+skill recommendations
Add mandatory sections to PLAN_AGENT_SYSTEM_PREPEND:
- Task Dependency Graph with blockers/dependents/reasons
- Parallel Execution Graph with wave structure
- Category + Skills recommendations per task
- Response format specification with exact structure

Uses ASCII art banners and visual emphasis for critical requirements.
2026-01-26 18:31:35 +09:00
justsisyphus
26b1c67964 fix(background-agent): disable question tool for background tasks 2026-01-26 18:25:06 +09:00
justsisyphus
7e065dfe12 feat(delegate-task): prepend system prompt for plan agent invocations
When plan agent (plan/prometheus/planner) is invoked via delegate_task,
automatically prepend a <system> prompt instructing the agent to:
- Launch explore/librarian agents in background to gather context
- Summarize user request and list uncertainties
- Ask clarifying questions until requirements are 100% clear
2026-01-26 18:25:06 +09:00
justsisyphus
8429da02b8 feat(config): add thinking/reasoningEffort/providerOptions to AgentOverrideConfigSchema
- Add maxTokens, thinking, reasoningEffort, textVerbosity, providerOptions fields to AgentOverrideConfigSchema
- Update think-mode hook to respect agent-level thinking settings (disabled or custom providerOptions)
- Add tests for agent-level thinking configuration override behavior
2026-01-26 18:25:06 +09:00
github-actions[bot]
ab51f5d39f @boguan has signed the CLA in code-yeongyu/oh-my-opencode#1137 2026-01-26 08:46:14 +00:00
justsisyphus
3ee519c7b0 feat: make systemDefaultModel optional for OpenCode fallback (#1136)
- Remove mandatory model requirement from plugin initialization
- Allow OpenCode to use its built-in model fallback when user doesn't specify
- Update model-resolver to handle undefined systemDefaultModel
- Remove throw errors in config-handler, utils, atlas, delegate-task
- Add tests for optional model scenarios

Closes #1129

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-26 17:01:08 +09:00
justsisyphus
c9b86b7815 test(cli): add version display test to verify package.json reading (#1134)
Closes #1063

Investigation findings:
- The CLI code correctly reads version from package.json
- The reported issue (bunx showing old version) is a caching issue
- Added test to ensure version is read as valid semver from package.json

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-26 17:00:55 +09:00
github-actions[bot]
9b6d8f629a @misyuari has signed the CLA in code-yeongyu/oh-my-opencode#1132 2026-01-26 07:31:12 +00:00
justsisyphus
6a2f43858a docs: add server mode and shell function examples for tmux integration
- Add --port flag requirement for tmux subagent pane spawning
- Add Fish shell function example with automatic port allocation
- Add Bash/Zsh equivalent function example
- Document how subagent panes work (opencode attach flow)
- Add OPENCODE_PORT environment variable documentation
- Add server mode reference section with opencode serve command
2026-01-26 16:24:14 +09:00
justsisyphus
601ea32a1c docs: add tmux integration and interactive terminal documentation
- Add Tmux Integration section to configurations.md with all config options
- Add Visual Multi-Agent with Tmux subsection to features.md
- Add Interactive Terminal Tools section documenting interactive_bash tool
2026-01-26 16:02:34 +09:00
github-actions[bot]
8f31211c75 release: v3.1.0 2026-01-26 06:46:47 +00:00
justsisyphus
04f2b513c6 feat(tmux-subagent): add replace action to prevent mass eviction
- Add column-based splittable calculation (getColumnCount, getColumnWidth)
- New decision tree: splittable → split, k=1 eviction → close+spawn, else → replace
- Add 'replace' action type using tmux respawn-pane (preserves layout)
- Replace oldest pane in-place instead of closing all panes when unsplittable
- Prevents scenario where all agent panes get closed leaving only 1
2026-01-26 15:25:11 +09:00
justsisyphus
8ebc933118 fix(tmux-subagent): enable 2D grid layout with divider-aware calculations
- Account for tmux pane dividers (1 char) in all size calculations
- Reduce MIN_PANE_WIDTH from 53 to 52 to fit 2 columns in standard terminals
- Fix enforceMainPaneWidth to use (windowWidth - divider) / 2
- Add virtual mainPane handling for close-spawn eviction loop
- Add comprehensive decision-engine tests (23 test cases)
2026-01-26 15:11:16 +09:00
justsisyphus
a67a35aea8 docs: regenerate AGENTS.md knowledge base via /init-deep 2026-01-26 14:56:55 +09:00
justsisyphus
9d66b80709 feat(hooks): add active working context section to compaction summary
Include files, code in progress, external references, and state/variables
in compaction summary for seamless continuation after context compaction.
2026-01-26 14:23:05 +09:00
justsisyphus
5c7eb02d5b chore(test): sync agent name casing in tests (#1128)
Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-26 12:10:30 +09:00
justsisyphus
68aa913499 refactor(tmux-subagent): state-first architecture with decision engine (#1125)
* refactor(tmux-subagent): add state-first architecture with decision engine

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(tmux): add pane spawn callbacks for background and sync sessions

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-26 12:02:37 +09:00
justsisyphus
3a79b8761b feat(shared): add connected-providers-cache for model availability (#1121)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-26 11:53:41 +09:00
justsisyphus
da416b362b feat(hooks): add category-skill-reminder hook (#1123)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-26 11:48:32 +09:00
justsisyphus
90054b28ad chore(docs): regenerate AGENTS.md knowledge base (#1118)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-26 11:48:30 +09:00
justsisyphus
892b245779 fix(test): update builtin skills count from 3 to 4 (#1126)
* fix(test): update builtin skills count from 3 to 4 (dev-browser added)

* chore(ci): add block-master-pr workflow

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-26 02:29:28 +00:00
YeonGyu-Kim
aead4aebd2 Add tmux pane management for background agent sessions (#1094)
* feat(config): add TmuxConfigSchema for tmux subagent pane management

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(shared): add tmux module structure

* feat(shared/tmux): implement tmux pane utilities

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* test(tmux-subagent): add TmuxSessionManager tests (TDD RED)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(tmux-subagent): implement TmuxSessionManager

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(integration): wire TmuxSessionManager with 500ms delay

- Task 5: Add 500ms delay in BackgroundManager after session creation
- Task 6: Wire TmuxSessionManager event handlers (session.created/deleted)
- Both changes integrate tmux pane management into plugin lifecycle

Co-authored-by: Sisyphus <ultrawork@oh-my-opencode>

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Co-authored-by: Sisyphus <ultrawork@oh-my-opencode>
2026-01-25 15:34:10 +09:00
YeonGyu-Kim
bccc943173 feat(skills): add dev-browser skill with Windows support (#1093)
* feat(skills): add dev-browser skill with Windows support

* chore: trigger CI
2026-01-25 15:34:07 +09:00
justsisyphus
05904ca617 docs(agent-browser): add detailed installation guide with Playwright troubleshooting 2026-01-25 15:12:32 +09:00
YeonGyu-Kim
3af30b0a21 feat(skills): add agent-browser option for browser automation (#1090)
Add configurable browser automation allowing users to choose between
Playwright MCP (default) and Vercel's agent-browser CLI.

Changes:
- Add browser_automation_engine.provider config option
- Dynamic skill loading based on provider selection
- Comprehensive agent-browser CLI reference (inline in skills.ts)
- Propagate browserProvider to delegate_task and buildAgent
- Update documentation with provider comparison

Co-authored-by: Suyeol Jeon <devxoul@gmail.com>
Co-authored-by: YeonGyu Kim <code.yeongyu@gmail.com>
2026-01-25 15:02:41 +09:00
YeonGyu-Kim
b55fd8d76f feat(explore): add github-copilot/gpt-5-mini to fallback chain (#1091)
* feat(explore): add github-copilot/gpt-5-mini to fallback chain

* test(explore): add tests for github-copilot/gpt-5-mini fallback

---------

Co-authored-by: Suyeol Jeon <devxoul@gmail.com>
2026-01-25 05:53:11 +00:00
Sisyphus
208af055ef fix: generate skill/slashcommand descriptions synchronously when pre-provided (#1087)
* fix: generate skill/slashcommand tool descriptions synchronously when pre-provided

When skills are passed via options (pre-resolved), build the tool description
synchronously instead of fire-and-forget async. This eliminates the race
condition where the description getter returns the bare prefix before the
async cache-warming microtask completes.

Fixes #1039

* chore: changes by sisyphus-dev-ai

---------

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
2026-01-25 14:52:50 +09:00
YeonGyu-Kim
0aa8f486af feat(hooks): add sisyphus-junior-notepad hook for conditional notepad rules injection (#1092)
* refactor(shared): extract isCallerOrchestrator to session-utils

* refactor(atlas): use shared isCallerOrchestrator, change to prepend

* refactor(prometheus-md-only): change to prepend pattern

* refactor(sisyphus-junior): remove Work_Context (moved to hook)

* feat(hooks): add sisyphus-junior-notepad hook

* fix(shared): replace dynamic require with static import in session-utils

- Change from dynamic require to static import for better bundler compatibility
- Fix import path: ../../features -> ../features
- Add barrel export to src/shared/index.ts

* feat(hooks): register sisyphus-junior-notepad hook

- Add to HookNameSchema in schema.ts
- Export from hooks/index.ts
- Register with isHookEnabled in index.ts
- Auto-generated schema.json update

---------

Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com>
2026-01-25 14:52:11 +09:00
sisyphus-dev-ai
d15794004e fix(lsp): add Bun version check for Windows LSP segfault bug
On Windows with Bun v1.3.5 and earlier, spawning LSP servers causes
a segmentation fault crash. This is a known Bun bug fixed in v1.3.6.

Added version check before LSP server spawn that:
- Detects Windows + affected Bun versions (< 1.3.6)
- Throws helpful error with upgrade instructions instead of crashing
- References the Bun issue for users to track

Closes #1047
2026-01-24 16:45:59 +09:00
sisyphus-dev-ai
de6f4b2c91 feat(think-mode): add GLM-4.7 thinking mode support
Add thinking mode support for Z.AI's GLM-4.7 model via the zai-coding-plan provider.

Changes:
- Add zai-coding-plan to THINKING_CONFIGS with extra_body.thinking config
- Add glm pattern to THINKING_CAPABLE_MODELS
- Add comprehensive tests for GLM thinking mode

GLM-4.7 uses OpenAI-compatible API with extra_body wrapper for thinking:
- thinking.type: 'enabled' or 'disabled'
- thinking.clear_thinking: false (Preserved Thinking mode)

Closes #1030
2026-01-24 16:45:34 +09:00
1593 changed files with 179303 additions and 39398 deletions

View File

@@ -14,11 +14,13 @@ body:
label: Prerequisites
description: Please confirm the following before submitting
options:
- label: I will write this issue in English (see our [Language Policy](https://github.com/code-yeongyu/oh-my-opencode/blob/dev/CONTRIBUTING.md#language-policy))
required: true
- label: I have searched existing issues to avoid duplicates
required: true
- label: I am using the latest version of oh-my-opencode
required: true
- label: I have read the [documentation](https://github.com/code-yeongyu/oh-my-opencode#readme)
- label: I have read the [documentation](https://github.com/code-yeongyu/oh-my-opencode#readme) or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer
required: true
- type: textarea

View File

@@ -14,11 +14,13 @@ body:
label: Prerequisites
description: Please confirm the following before submitting
options:
- label: I will write this issue in English (see our [Language Policy](https://github.com/code-yeongyu/oh-my-opencode/blob/dev/CONTRIBUTING.md#language-policy))
required: true
- label: I have searched existing issues and discussions to avoid duplicates
required: true
- label: This feature request is specific to oh-my-opencode (not OpenCode core)
required: true
- label: I have read the [documentation](https://github.com/code-yeongyu/oh-my-opencode#readme)
- label: I have read the [documentation](https://github.com/code-yeongyu/oh-my-opencode#readme) or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer
required: true
- type: textarea

View File

@@ -14,9 +14,11 @@ body:
label: Prerequisites
description: Please confirm the following before submitting
options:
- label: I will write this issue in English (see our [Language Policy](https://github.com/code-yeongyu/oh-my-opencode/blob/dev/CONTRIBUTING.md#language-policy))
required: true
- label: I have searched existing issues and discussions
required: true
- label: I have read the [documentation](https://github.com/code-yeongyu/oh-my-opencode#readme)
- label: I have read the [documentation](https://github.com/code-yeongyu/oh-my-opencode#readme) or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer
required: true
- label: This is a question (not a bug report or feature request)
required: true

BIN
.github/assets/building-in-public.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

BIN
.github/assets/elestyle.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

BIN
.github/assets/hephaestus.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

View File

@@ -4,13 +4,32 @@ on:
push:
branches: [master, dev]
pull_request:
branches: [dev]
branches: [master, dev]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Block PRs targeting master branch
block-master-pr:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Check PR target branch
run: |
if [ "${{ github.base_ref }}" = "master" ]; then
echo "::error::PRs to master branch are not allowed. Please target the 'dev' branch instead."
echo ""
echo "PULL REQUESTS TO MASTER ARE BLOCKED"
echo ""
echo "All PRs must target the 'dev' branch."
echo "Please close this PR and create a new one targeting 'dev'."
exit 1
else
echo "PR targets '${{ github.base_ref }}' branch - OK"
fi
test:
runs-on: ubuntu-latest
steps:
@@ -25,8 +44,61 @@ jobs:
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
- name: Run tests
run: bun test
- name: Run mock-heavy tests (isolated)
run: |
# These files use mock.module() which pollutes module cache
# Run them in separate processes to prevent cross-file contamination
bun test src/plugin-handlers
bun test src/hooks/atlas
bun test src/hooks/compaction-context-injector
bun test src/features/tmux-subagent
bun test src/cli/doctor/formatter.test.ts
bun test src/cli/doctor/format-default.test.ts
bun test src/tools/call-omo-agent/sync-executor.test.ts
bun test src/tools/call-omo-agent/session-creator.test.ts
bun test src/tools/session-manager
bun test src/features/opencode-skill-loader/loader.test.ts
bun test src/hooks/anthropic-context-window-limit-recovery/recovery-hook.test.ts
bun test src/hooks/anthropic-context-window-limit-recovery/executor.test.ts
- name: Run remaining tests
run: |
# Enumerate subdirectories/files explicitly to EXCLUDE mock-heavy files
# that were already run in isolation above.
# Excluded from src/cli: doctor/formatter.test.ts, doctor/format-default.test.ts
# Excluded from src/tools: call-omo-agent/sync-executor.test.ts, call-omo-agent/session-creator.test.ts, session-manager (all)
# Excluded from src/hooks/anthropic-context-window-limit-recovery: recovery-hook.test.ts, executor.test.ts
bun test bin script src/config src/mcp src/index.test.ts \
src/agents src/shared \
src/cli/run src/cli/config-manager src/cli/mcp-oauth \
src/cli/index.test.ts src/cli/install.test.ts src/cli/model-fallback.test.ts \
src/cli/config-manager.test.ts \
src/cli/doctor/runner.test.ts src/cli/doctor/checks \
src/tools/ast-grep src/tools/background-task src/tools/delegate-task \
src/tools/glob src/tools/grep src/tools/interactive-bash \
src/tools/look-at src/tools/lsp \
src/tools/skill src/tools/skill-mcp src/tools/slashcommand src/tools/task \
src/tools/call-omo-agent/background-agent-executor.test.ts \
src/tools/call-omo-agent/background-executor.test.ts \
src/tools/call-omo-agent/subagent-session-creator.test.ts \
src/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.test.ts src/hooks/anthropic-context-window-limit-recovery/parser.test.ts src/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.test.ts src/hooks/anthropic-context-window-limit-recovery/recovery-deduplication.test.ts src/hooks/anthropic-context-window-limit-recovery/storage.test.ts \
src/hooks/claude-code-compatibility \
src/hooks/context-injection \
src/hooks/provider-toast \
src/hooks/session-notification \
src/hooks/sisyphus \
src/hooks/todo-continuation-enforcer \
src/features/background-agent \
src/features/builtin-commands \
src/features/builtin-skills \
src/features/claude-code-session-state \
src/features/hook-message-injector \
src/features/opencode-skill-loader/config-source-discovery.test.ts \
src/features/opencode-skill-loader/merger.test.ts \
src/features/opencode-skill-loader/skill-content.test.ts \
src/features/opencode-skill-loader/blocking.test.ts \
src/features/opencode-skill-loader/async-loader.test.ts \
src/features/skill-mcp-manager
typecheck:
runs-on: ubuntu-latest

View File

@@ -25,7 +25,7 @@ jobs:
path-to-signatures: 'signatures/cla.json'
path-to-document: 'https://github.com/code-yeongyu/oh-my-opencode/blob/master/CLA.md'
branch: 'dev'
allowlist: bot*,dependabot*,github-actions*,*[bot],sisyphus-dev-ai
allowlist: code-yeongyu,bot*,dependabot*,github-actions*,*[bot],sisyphus-dev-ai,web-flow
custom-notsigned-prcomment: |
Thank you for your contribution! Before we can merge this PR, we need you to sign our [Contributor License Agreement (CLA)](https://github.com/code-yeongyu/oh-my-opencode/blob/master/CLA.md).

View File

@@ -28,18 +28,22 @@ permissions:
id-token: write
jobs:
publish-platform:
# Use windows-latest for Windows to avoid cross-compilation segfault (oven-sh/bun#18416)
# Fixes: #873, #844
runs-on: ${{ matrix.platform == 'windows-x64' && 'windows-latest' || 'ubuntu-latest' }}
# =============================================================================
# Job 1: Build binaries for all platforms
# - Windows builds on windows-latest (avoid bun cross-compile segfault)
# - All other platforms build on ubuntu-latest
# - Uploads compressed artifacts for the publish job
# =============================================================================
build:
runs-on: ${{ startsWith(matrix.platform, 'windows-') && 'windows-latest' || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
max-parallel: 2
max-parallel: 11
matrix:
platform: [darwin-arm64, darwin-x64, linux-x64, linux-arm64, linux-x64-musl, linux-arm64-musl, windows-x64]
platform: [darwin-arm64, darwin-x64, darwin-x64-baseline, linux-x64, linux-x64-baseline, linux-arm64, linux-x64-musl, linux-x64-musl-baseline, linux-arm64-musl, windows-x64, windows-x64-baseline]
steps:
- uses: actions/checkout@v4
@@ -47,11 +51,6 @@ jobs:
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: bun install
env:
@@ -60,54 +59,267 @@ jobs:
- name: Check if already published
id: check
run: |
PKG_NAME="oh-my-opencode-${{ matrix.platform }}"
VERSION="${{ inputs.version }}"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://registry.npmjs.org/${PKG_NAME}/${VERSION}")
if [ "$STATUS" = "200" ]; then
PLATFORM_KEY="${{ matrix.platform }}"
PLATFORM_KEY="${PLATFORM_KEY//-/_}"
# Check oh-my-opencode
OC_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://registry.npmjs.org/oh-my-opencode-${{ matrix.platform }}/${VERSION}")
# Check oh-my-openagent
OA_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://registry.npmjs.org/oh-my-openagent-${{ matrix.platform }}/${VERSION}")
echo "oh-my-opencode-${{ matrix.platform }}@${VERSION}: ${OC_STATUS}"
echo "oh-my-openagent-${{ matrix.platform }}@${VERSION}: ${OA_STATUS}"
if [ "$OC_STATUS" = "200" ]; then
echo "skip_opencode=true" >> $GITHUB_OUTPUT
echo "✓ oh-my-opencode-${{ matrix.platform }}@${VERSION} already published"
else
echo "skip_opencode=false" >> $GITHUB_OUTPUT
echo "→ oh-my-opencode-${{ matrix.platform }}@${VERSION} needs publishing"
fi
if [ "$OA_STATUS" = "200" ]; then
echo "skip_openagent=true" >> $GITHUB_OUTPUT
echo "✓ oh-my-openagent-${{ matrix.platform }}@${VERSION} already published"
else
echo "skip_openagent=false" >> $GITHUB_OUTPUT
echo "→ oh-my-openagent-${{ matrix.platform }}@${VERSION} needs publishing"
fi
# Skip build only if BOTH are already published
if [ "$OC_STATUS" = "200" ] && [ "$OA_STATUS" = "200" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
echo "✓ ${PKG_NAME}@${VERSION} already published"
else
echo "skip=false" >> $GITHUB_OUTPUT
echo "→ ${PKG_NAME}@${VERSION} needs publishing"
fi
- name: Update version
- name: Update version in package.json
if: steps.check.outputs.skip != 'true'
run: |
VERSION="${{ inputs.version }}"
cd packages/${{ matrix.platform }}
jq --arg v "$VERSION" '.version = $v' package.json > tmp.json && mv tmp.json package.json
- name: Set root package version
if: steps.check.outputs.skip != 'true'
run: |
jq --arg v "${{ inputs.version }}" '.version = $v' package.json > tmp.json && mv tmp.json package.json
- name: Pre-download baseline compile target
if: steps.check.outputs.skip != 'true' && endsWith(matrix.platform, '-baseline')
shell: bash
run: |
BUN_VERSION=$(bun --version)
PLATFORM="${{ matrix.platform }}"
PKG_NAME="bun-${PLATFORM}"
CACHE_DIR=$(bun pm cache)
CACHE_DEST="${CACHE_DIR}/${PKG_NAME}-v${BUN_VERSION}"
if [[ -f "$CACHE_DEST" ]]; then
echo "✓ Compile target already cached at ${CACHE_DEST}"
exit 0
fi
echo "Pre-downloading ${PKG_NAME} v${BUN_VERSION} to ${CACHE_DEST}"
TARBALL_URL="https://registry.npmjs.org/@oven/bun-${PLATFORM}/-/bun-${PLATFORM}-${BUN_VERSION}.tgz"
echo "URL: ${TARBALL_URL}"
mkdir -p "$(dirname "$CACHE_DEST")"
TMP_DIR=$(mktemp -d)
# Download and extract the bun binary from npm tarball
curl -fsSL --retry 5 --retry-delay 5 "${TARBALL_URL}" | tar -xzf - -C "${TMP_DIR}"
if [[ "$PLATFORM" == windows-* ]]; then
BIN_NAME="bun.exe"
else
BIN_NAME="bun"
fi
# npm tarball has package/bin/bun structure
if [[ -f "${TMP_DIR}/package/bin/${BIN_NAME}" ]]; then
cp "${TMP_DIR}/package/bin/${BIN_NAME}" "${CACHE_DEST}"
elif [[ -f "${TMP_DIR}/package/${BIN_NAME}" ]]; then
cp "${TMP_DIR}/package/${BIN_NAME}" "${CACHE_DEST}"
else
echo "Could not find ${BIN_NAME} in tarball, listing contents:"
find "${TMP_DIR}" -type f
exit 1
fi
chmod +x "${CACHE_DEST}" 2>/dev/null || true
echo "✓ Pre-downloaded to ${CACHE_DEST}"
ls -lh "${CACHE_DEST}"
- name: Build binary
if: steps.check.outputs.skip != 'true'
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
retry_wait_seconds: 10
shell: bash
command: |
PLATFORM="${{ matrix.platform }}"
case "$PLATFORM" in
darwin-arm64) TARGET="bun-darwin-arm64" ;;
darwin-x64) TARGET="bun-darwin-x64" ;;
darwin-x64-baseline) TARGET="bun-darwin-x64-baseline" ;;
linux-x64) TARGET="bun-linux-x64" ;;
linux-x64-baseline) TARGET="bun-linux-x64-baseline" ;;
linux-arm64) TARGET="bun-linux-arm64" ;;
linux-x64-musl) TARGET="bun-linux-x64-musl" ;;
linux-x64-musl-baseline) TARGET="bun-linux-x64-musl-baseline" ;;
linux-arm64-musl) TARGET="bun-linux-arm64-musl" ;;
windows-x64) TARGET="bun-windows-x64" ;;
windows-x64-baseline) TARGET="bun-windows-x64-baseline" ;;
esac
if [[ "$PLATFORM" == windows-* ]]; then
OUTPUT="packages/${PLATFORM}/bin/oh-my-opencode.exe"
else
OUTPUT="packages/${PLATFORM}/bin/oh-my-opencode"
fi
bun build src/cli/index.ts --compile --minify --target=$TARGET --outfile=$OUTPUT
echo "Built binary:"
ls -lh "$OUTPUT"
- name: Compress binary
if: steps.check.outputs.skip != 'true'
run: |
PLATFORM="${{ matrix.platform }}"
case "$PLATFORM" in
darwin-arm64) TARGET="bun-darwin-arm64" ;;
darwin-x64) TARGET="bun-darwin-x64" ;;
linux-x64) TARGET="bun-linux-x64" ;;
linux-arm64) TARGET="bun-linux-arm64" ;;
linux-x64-musl) TARGET="bun-linux-x64-musl" ;;
linux-arm64-musl) TARGET="bun-linux-arm64-musl" ;;
windows-x64) TARGET="bun-windows-x64" ;;
esac
cd packages/${PLATFORM}
if [ "$PLATFORM" = "windows-x64" ]; then
OUTPUT="packages/${PLATFORM}/bin/oh-my-opencode.exe"
if [[ "$PLATFORM" == windows-* ]]; then
# Windows: use 7z (pre-installed on windows-latest)
7z a -tzip ../../binary-${PLATFORM}.zip bin/ package.json
else
OUTPUT="packages/${PLATFORM}/bin/oh-my-opencode"
# Unix: use tar.gz
tar -czvf ../../binary-${PLATFORM}.tar.gz bin/ package.json
fi
bun build src/cli/index.ts --compile --minify --target=$TARGET --outfile=$OUTPUT
cd ../..
echo "Compressed artifact:"
ls -lh binary-${PLATFORM}.*
- name: Publish ${{ matrix.platform }}
- name: Upload artifact
if: steps.check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.platform }}
path: |
binary-${{ matrix.platform }}.tar.gz
binary-${{ matrix.platform }}.zip
retention-days: 1
if-no-files-found: error
publish:
needs: build
if: always() && !cancelled()
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 2
matrix:
platform: [darwin-arm64, darwin-x64, darwin-x64-baseline, linux-x64, linux-x64-baseline, linux-arm64, linux-x64-musl, linux-x64-musl-baseline, linux-arm64-musl, windows-x64, windows-x64-baseline]
steps:
- name: Check if already published
id: check
run: |
VERSION="${{ inputs.version }}"
OC_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://registry.npmjs.org/oh-my-opencode-${{ matrix.platform }}/${VERSION}")
OA_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://registry.npmjs.org/oh-my-openagent-${{ matrix.platform }}/${VERSION}")
if [ "$OC_STATUS" = "200" ]; then
echo "skip_opencode=true" >> $GITHUB_OUTPUT
echo "✓ oh-my-opencode-${{ matrix.platform }}@${VERSION} already published"
else
echo "skip_opencode=false" >> $GITHUB_OUTPUT
fi
if [ "$OA_STATUS" = "200" ]; then
echo "skip_openagent=true" >> $GITHUB_OUTPUT
echo "✓ oh-my-openagent-${{ matrix.platform }}@${VERSION} already published"
else
echo "skip_openagent=false" >> $GITHUB_OUTPUT
fi
# Need artifact if either package needs publishing
if [ "$OC_STATUS" = "200" ] && [ "$OA_STATUS" = "200" ]; then
echo "skip_all=true" >> $GITHUB_OUTPUT
else
echo "skip_all=false" >> $GITHUB_OUTPUT
fi
- name: Download artifact
id: download
if: steps.check.outputs.skip_all != 'true'
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: binary-${{ matrix.platform }}
path: .
- name: Extract artifact
if: steps.check.outputs.skip_all != 'true' && steps.download.outcome == 'success'
run: |
PLATFORM="${{ matrix.platform }}"
mkdir -p packages/${PLATFORM}
if [[ "$PLATFORM" == windows-* ]]; then
unzip binary-${PLATFORM}.zip -d packages/${PLATFORM}/
else
tar -xzvf binary-${PLATFORM}.tar.gz -C packages/${PLATFORM}/
fi
echo "Extracted contents:"
ls -la packages/${PLATFORM}/
ls -la packages/${PLATFORM}/bin/
- uses: actions/setup-node@v4
if: steps.check.outputs.skip_all != 'true' && steps.download.outcome == 'success'
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Publish oh-my-opencode-${{ matrix.platform }}
if: steps.check.outputs.skip_opencode != 'true' && steps.download.outcome == 'success'
run: |
cd packages/${{ matrix.platform }}
TAG_ARG=""
if [ -n "${{ inputs.dist_tag }}" ]; then
TAG_ARG="--tag ${{ inputs.dist_tag }}"
fi
npm publish --access public $TAG_ARG
npm publish --access public --provenance $TAG_ARG
env:
NPM_CONFIG_PROVENANCE: false
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
timeout-minutes: 15
- name: Publish oh-my-openagent-${{ matrix.platform }}
if: steps.check.outputs.skip_openagent != 'true' && steps.download.outcome == 'success'
run: |
cd packages/${{ matrix.platform }}
# Rename package for oh-my-openagent
jq --arg name "oh-my-openagent-${{ matrix.platform }}" \
--arg desc "Platform-specific binary for oh-my-openagent (${{ matrix.platform }})" \
'.name = $name | .description = $desc | .bin = {"oh-my-openagent": (.bin | to_entries | .[0].value)}' \
package.json > tmp.json && mv tmp.json package.json
TAG_ARG=""
if [ -n "${{ inputs.dist_tag }}" ]; then
TAG_ARG="--tag ${{ inputs.dist_tag }}"
fi
npm publish --access public --provenance $TAG_ARG
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
timeout-minutes: 15

View File

@@ -45,8 +45,61 @@ jobs:
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
- name: Run tests
run: bun test
- name: Run mock-heavy tests (isolated)
run: |
# These files use mock.module() which pollutes module cache
# Run them in separate processes to prevent cross-file contamination
bun test src/plugin-handlers
bun test src/hooks/atlas
bun test src/hooks/compaction-context-injector
bun test src/features/tmux-subagent
bun test src/cli/doctor/formatter.test.ts
bun test src/cli/doctor/format-default.test.ts
bun test src/tools/call-omo-agent/sync-executor.test.ts
bun test src/tools/call-omo-agent/session-creator.test.ts
bun test src/tools/session-manager
bun test src/features/opencode-skill-loader/loader.test.ts
bun test src/hooks/anthropic-context-window-limit-recovery/recovery-hook.test.ts
bun test src/hooks/anthropic-context-window-limit-recovery/executor.test.ts
- name: Run remaining tests
run: |
# Enumerate subdirectories/files explicitly to EXCLUDE mock-heavy files
# that were already run in isolation above.
# Excluded from src/cli: doctor/formatter.test.ts, doctor/format-default.test.ts
# Excluded from src/tools: call-omo-agent/sync-executor.test.ts, call-omo-agent/session-creator.test.ts, session-manager (all)
# Excluded from src/hooks/anthropic-context-window-limit-recovery: recovery-hook.test.ts, executor.test.ts
bun test bin script src/config src/mcp src/index.test.ts \
src/agents src/shared \
src/cli/run src/cli/config-manager src/cli/mcp-oauth \
src/cli/index.test.ts src/cli/install.test.ts src/cli/model-fallback.test.ts \
src/cli/config-manager.test.ts \
src/cli/doctor/runner.test.ts src/cli/doctor/checks \
src/tools/ast-grep src/tools/background-task src/tools/delegate-task \
src/tools/glob src/tools/grep src/tools/interactive-bash \
src/tools/look-at src/tools/lsp \
src/tools/skill src/tools/skill-mcp src/tools/slashcommand src/tools/task \
src/tools/call-omo-agent/background-agent-executor.test.ts \
src/tools/call-omo-agent/background-executor.test.ts \
src/tools/call-omo-agent/subagent-session-creator.test.ts \
src/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.test.ts src/hooks/anthropic-context-window-limit-recovery/parser.test.ts src/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.test.ts src/hooks/anthropic-context-window-limit-recovery/recovery-deduplication.test.ts src/hooks/anthropic-context-window-limit-recovery/storage.test.ts \
src/hooks/claude-code-compatibility \
src/hooks/context-injection \
src/hooks/provider-toast \
src/hooks/session-notification \
src/hooks/sisyphus \
src/hooks/todo-continuation-enforcer \
src/features/background-agent \
src/features/builtin-commands \
src/features/builtin-skills \
src/features/claude-code-session-state \
src/features/hook-message-injector \
src/features/opencode-skill-loader/config-source-discovery.test.ts \
src/features/opencode-skill-loader/merger.test.ts \
src/features/opencode-skill-loader/skill-content.test.ts \
src/features/opencode-skill-loader/blocking.test.ts \
src/features/opencode-skill-loader/async-loader.test.ts \
src/features/skill-mcp-manager
typecheck:
runs-on: ubuntu-latest
@@ -68,7 +121,7 @@ jobs:
publish-main:
runs-on: ubuntu-latest
needs: [test, typecheck]
if: github.repository == 'code-yeongyu/oh-my-opencode'
if: github.repository == 'code-yeongyu/oh-my-openagent'
outputs:
version: ${{ steps.version.outputs.version }}
dist_tag: ${{ steps.version.outputs.dist_tag }}
@@ -136,7 +189,7 @@ jobs:
VERSION="${{ steps.version.outputs.version }}"
jq --arg v "$VERSION" '.version = $v' package.json > tmp.json && mv tmp.json package.json
for platform in darwin-arm64 darwin-x64 linux-x64 linux-arm64 linux-x64-musl linux-arm64-musl windows-x64; do
for platform in darwin-arm64 darwin-x64 darwin-x64-baseline linux-x64 linux-x64-baseline linux-arm64 linux-x64-musl linux-x64-musl-baseline linux-arm64-musl windows-x64 windows-x64-baseline; do
jq --arg v "$VERSION" '.version = $v' "packages/${platform}/package.json" > tmp.json
mv tmp.json "packages/${platform}/package.json"
done
@@ -151,7 +204,7 @@ jobs:
bunx tsc --emitDeclarationOnly
bun run build:schema
- name: Publish main package
- name: Publish oh-my-opencode
if: steps.check.outputs.skip != 'true'
run: |
TAG_ARG=""
@@ -160,20 +213,50 @@ jobs:
fi
npm publish --access public --provenance $TAG_ARG
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Git commit and tag
if: steps.check.outputs.skip != 'true'
- name: Check if oh-my-openagent already published
id: check-openagent
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add package.json assets/oh-my-opencode.schema.json packages/*/package.json || true
git diff --cached --quiet || git commit -m "release: v${{ steps.version.outputs.version }}"
git tag -f "v${{ steps.version.outputs.version }}"
git push origin --tags --force
git push origin HEAD || echo "Branch push failed (non-critical)"
VERSION="${{ steps.version.outputs.version }}"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://registry.npmjs.org/oh-my-openagent/${VERSION}")
if [ "$STATUS" = "200" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
echo "✓ oh-my-openagent@${VERSION} already published"
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
- name: Publish oh-my-openagent
if: steps.check-openagent.outputs.skip != 'true'
run: |
VERSION="${{ steps.version.outputs.version }}"
# Update package name, version, and optionalDependencies for oh-my-openagent
jq --arg v "$VERSION" '
.name = "oh-my-openagent" |
.version = $v |
.optionalDependencies = (
.optionalDependencies | to_entries |
map(.key = (.key | sub("^oh-my-opencode-"; "oh-my-openagent-")) | .value = $v) |
from_entries
)
' package.json > tmp.json && mv tmp.json package.json
TAG_ARG=""
if [ -n "${{ steps.version.outputs.dist_tag }}" ]; then
TAG_ARG="--tag ${{ steps.version.outputs.dist_tag }}"
fi
npm publish --access public --provenance $TAG_ARG || echo "::warning::oh-my-openagent publish failed"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Restore package.json
if: steps.check-openagent.outputs.skip != 'true'
run: |
git checkout -- package.json
trigger-platform:
runs-on: ubuntu-latest
@@ -198,31 +281,23 @@ jobs:
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
env:
BUN_INSTALL_ALLOW_SCRIPTS: "@ast-grep/napi"
- name: Generate changelog
id: changelog
run: |
VERSION="${{ needs.publish-main.outputs.version }}"
PREV_TAG=""
if [[ "$VERSION" == *"-beta."* ]]; then
BASE="${VERSION%-beta.*}"
NUM="${VERSION##*-beta.}"
PREV_NUM=$((NUM - 1))
if [ $PREV_NUM -ge 1 ]; then
PREV_TAG="${BASE}-beta.${PREV_NUM}"
git rev-parse "v${PREV_TAG}" >/dev/null 2>&1 || PREV_TAG=""
fi
fi
if [ -z "$PREV_TAG" ]; then
PREV_TAG=$(curl -s https://registry.npmjs.org/oh-my-opencode/latest | jq -r '.version // "0.0.0"')
fi
echo "Comparing v${PREV_TAG}..v${VERSION}"
NOTES=$(git log "v${PREV_TAG}..v${VERSION}" --oneline --format="- %h %s" 2>/dev/null | grep -vE "^- \w+ (ignore:|test:|chore:|ci:|release:)" || echo "No notable changes")
echo "$NOTES" > /tmp/changelog.md
bun run script/generate-changelog.ts > /tmp/changelog.md
cat /tmp/changelog.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub release
run: |

View File

@@ -135,14 +135,14 @@ jobs:
"limit": { "context": 190000, "output": 128000 },
"options": { "effort": "high", "thinking": { "type": "enabled", "budgetTokens": 64000 } }
},
"claude-sonnet-4-5": {
"id": "claude-sonnet-4-5-20250929",
"name": "Sonnet 4.5",
"claude-sonnet-4-6": {
"id": "claude-sonnet-4-6-20250929",
"name": "Sonnet 4.6",
"limit": { "context": 200000, "output": 64000 }
},
"claude-sonnet-4-5-high": {
"id": "claude-sonnet-4-5-20250929",
"name": "Sonnet 4.5 High",
"claude-sonnet-4-6-high": {
"id": "claude-sonnet-4-6-20250929",
"name": "Sonnet 4.6 High",
"limit": { "context": 200000, "output": 128000 },
"options": { "thinking": { "type": "enabled", "budgetTokens": 64000 } }
},
@@ -152,6 +152,41 @@ jobs:
"limit": { "context": 200000, "output": 64000 }
}
}
} |
.provider["zai-coding-plan"] = {
"name": "Z.AI Coding Plan",
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://api.z.ai/api/paas/v4"
},
"models": {
"glm-4.7": {
"id": "glm-4.7",
"name": "GLM 4.7",
"limit": { "context": 128000, "output": 16000 }
},
"glm-4.6v": {
"id": "glm-4.6v",
"name": "GLM 4.6 Vision",
"limit": { "context": 128000, "output": 16000 }
}
}
} |
.provider.openai = {
"name": "OpenAI",
"npm": "@ai-sdk/openai",
"models": {
"gpt-5.2": {
"id": "gpt-5.2",
"name": "GPT-5.2",
"limit": { "context": 128000, "output": 16000 }
},
"gpt-5.2-codex": {
"id": "gpt-5.2-codex",
"name": "GPT-5.2 Codex",
"limit": { "context": 128000, "output": 32000 }
}
}
}
' "$OPENCODE_JSON" > /tmp/oc.json && mv /tmp/oc.json "$OPENCODE_JSON"
@@ -287,6 +322,9 @@ jobs:
)
jq --arg append "$PROMPT_APPEND" '.agents.Sisyphus.prompt_append = $append' "$OMO_JSON" > /tmp/omo.json && mv /tmp/omo.json "$OMO_JSON"
# Add categories configuration for unspecified-low to use GLM 4.7
jq '.categories["unspecified-low"] = { "model": "zai-coding-plan/glm-4.7" }' "$OMO_JSON" > /tmp/omo.json && mv /tmp/omo.json "$OMO_JSON"
mkdir -p ~/.local/share/opencode
echo "$OPENCODE_AUTH_JSON" > ~/.local/share/opencode/auth.json
chmod 600 ~/.local/share/opencode/auth.json

6
.gitignore vendored
View File

@@ -1,5 +1,6 @@
# Dependencies
.sisyphus/
.sisyphus/*
!.sisyphus/rules/
node_modules/
# Build output
@@ -8,6 +9,7 @@ dist/
# Platform binaries (built, not committed)
packages/*/bin/oh-my-opencode
packages/*/bin/oh-my-opencode.exe
packages/*/bin/*.map
# IDE
.idea/
@@ -33,3 +35,5 @@ yarn.lock
test-injection/
notepad.md
oauth-success.html
*.bun-build
.omx/

View File

@@ -1,6 +1,5 @@
---
description: Compare HEAD with the latest published npm version and list all unpublished changes
model: anthropic/claude-haiku-4-5
---
<command-instruction>
@@ -55,30 +54,95 @@ For each commit, you MUST:
### feat
| Scope | What Changed |
|-------|--------------|
| X | 실제 변경 내용 설명 |
| X | Description of actual changes |
### fix
| Scope | What Changed |
|-------|--------------|
| X | 실제 변경 내용 설명 |
| X | Description of actual changes |
### refactor
| Scope | What Changed |
|-------|--------------|
| X | 실제 변경 내용 설명 |
| X | Description of actual changes |
### docs
| Scope | What Changed |
|-------|--------------|
| X | 실제 변경 내용 설명 |
| X | Description of actual changes |
### Breaking Changes
None 또는 목록
None or list
### Files Changed
{diff-stat}
### Suggested Version Bump
- **Recommendation**: patch|minor|major
- **Reason**: 이유
- **Reason**: Reason for recommendation
</output-format>
<oracle-safety-review>
## Oracle Deployment Safety Review (Only when user explicitly requests)
**Trigger keywords**: "safe to deploy", "can I deploy", "is it safe", "review", "check", "oracle"
When user includes any of the above keywords in their request:
### 1. Pre-validation
```bash
bun run typecheck
bun test
```
- On failure → Report "❌ Cannot deploy" immediately without invoking Oracle
### 2. Oracle Invocation Prompt
Collect the following information and pass to Oracle:
```
## Deployment Safety Review Request
### Changes Summary
{Changes table analyzed above}
### Key diffs (organized by feature)
{Core code changes for each feat/fix/refactor - only key parts, not full diff}
### Validation Results
- Typecheck: ✅/❌
- Tests: {pass}/{total} (✅/❌)
### Review Items
1. **Regression Risk**: Are there changes that could affect existing functionality?
2. **Side Effects**: Are there areas where unexpected side effects could occur?
3. **Breaking Changes**: Are there changes that affect external users?
4. **Edge Cases**: Are there missed edge cases?
5. **Deployment Recommendation**: SAFE / CAUTION / UNSAFE
### Request
Please analyze the above changes deeply and provide your judgment on deployment safety.
If there are risks, explain with specific scenarios.
Suggest keywords to monitor after deployment if any.
```
### 3. Output Format After Oracle Response
## 🔍 Oracle Deployment Safety Review Result
### Verdict: ✅ SAFE / ⚠️ CAUTION / ❌ UNSAFE
### Risk Analysis
| Area | Risk Level | Description |
|------|------------|-------------|
| ... | 🟢/🟡/🔴 | ... |
### Recommendations
- ...
### Post-deployment Monitoring Keywords
- ...
### Conclusion
{Oracle's final judgment}
</oracle-safety-review>

View File

@@ -14,7 +14,7 @@ You are the release manager for oh-my-opencode. Execute the FULL publish workflo
- `major`: Breaking changes (1.1.7 → 2.0.0)
**If the user did not provide a bump type argument, STOP IMMEDIATELY and ask:**
> "배포를 진행하려면 버전 범프 타입을 지정해주세요: `patch`, `minor`, 또는 `major`"
> "To proceed with deployment, please specify a version bump type: `patch`, `minor`, or `major`"
**DO NOT PROCEED without explicit user confirmation of bump type.**
@@ -31,9 +31,9 @@ You are the release manager for oh-my-opencode. Execute the FULL publish workflo
{ "id": "sync-remote", "content": "Sync with remote (pull --rebase && push if unpushed commits)", "status": "pending", "priority": "high" },
{ "id": "run-workflow", "content": "Trigger GitHub Actions publish workflow", "status": "pending", "priority": "high" },
{ "id": "wait-workflow", "content": "Wait for workflow completion (poll every 30s)", "status": "pending", "priority": "high" },
{ "id": "verify-release", "content": "Verify GitHub release was created", "status": "pending", "priority": "high" },
{ "id": "draft-release-notes", "content": "Draft enhanced release notes content", "status": "pending", "priority": "high" },
{ "id": "update-release-notes", "content": "Update GitHub release with enhanced notes", "status": "pending", "priority": "high" },
{ "id": "verify-and-preview", "content": "Verify release created + preview auto-generated changelog & contributor thanks", "status": "pending", "priority": "high" },
{ "id": "draft-summary", "content": "Draft enhanced release summary (mandatory for minor/major, optional for patch — ask user)", "status": "pending", "priority": "high" },
{ "id": "apply-summary", "content": "Prepend enhanced summary to release (if user opted in)", "status": "pending", "priority": "high" },
{ "id": "verify-npm", "content": "Verify npm package published successfully", "status": "pending", "priority": "high" },
{ "id": "wait-platform-workflow", "content": "Wait for publish-platform workflow completion", "status": "pending", "priority": "high" },
{ "id": "verify-platform-binaries", "content": "Verify all 7 platform binary packages published", "status": "pending", "priority": "high" },
@@ -48,7 +48,7 @@ You are the release manager for oh-my-opencode. Execute the FULL publish workflo
## STEP 1: CONFIRM BUMP TYPE
If bump type provided as argument, confirm with user:
> "버전 범프 타입: `{bump}`. 진행할까요? (y/n)"
> "Version bump type: `{bump}`. Proceed? (y/n)"
Wait for user confirmation before proceeding.
@@ -111,102 +111,165 @@ gh run view {run_id} --log-failed
---
## STEP 5: VERIFY GITHUB RELEASE
## STEP 5: VERIFY RELEASE & PREVIEW AUTO-GENERATED CONTENT
Two goals: confirm the release exists, then show the user what the workflow already generated.
Get the new version and verify release exists:
```bash
# Get new version from package.json (workflow updates it)
# Pull latest (workflow committed version bump)
git pull --rebase
NEW_VERSION=$(node -p "require('./package.json').version")
gh release view "v${NEW_VERSION}"
# Verify release exists on GitHub
gh release view "v${NEW_VERSION}" --json tagName,url --jq '{tag: .tagName, url: .url}'
```
---
## STEP 6: DRAFT ENHANCED RELEASE NOTES
Analyze commits since the previous version and draft release notes following project conventions:
### For PATCH releases:
Keep simple format - just list commits:
```markdown
- {hash} {conventional commit message}
- ...
```
### For MINOR releases:
Use feature-focused format:
```markdown
## New Features
### Feature Name
- Description of what it does
- Why it matters
## Bug Fixes
- fix(scope): description
## Improvements
- refactor(scope): description
```
### For MAJOR releases:
Full changelog format:
```markdown
# v{version}
Brief description of the release.
## What's New Since v{previous}
### Breaking Changes
- Description of breaking change
### Features
- **Feature Name**: Description
### Bug Fixes
- Description
### Documentation
- Description
## Migration Guide (if applicable)
...
```
**CRITICAL: The enhanced notes must ADD to existing workflow-generated notes, not replace them.**
---
## STEP 7: UPDATE GITHUB RELEASE
**ZERO CONTENT LOSS POLICY:**
- First, fetch the existing release body with `gh release view`
- Your enhanced notes must be PREPENDED to the existing content
- **NOT A SINGLE CHARACTER of existing content may be removed or modified**
- The final release body = `{your_enhanced_notes}\n\n---\n\n{existing_body_exactly_as_is}`
**After verifying, generate a local preview of the auto-generated content:**
```bash
# Get existing body
EXISTING_BODY=$(gh release view "v${NEW_VERSION}" --json body --jq '.body')
bun run script/generate-changelog.ts
```
# Write enhanced notes to temp file (prepend to existing)
cat > /tmp/release-notes-v${NEW_VERSION}.md << 'EOF'
{your_enhanced_notes}
<agent-instruction>
After running the preview, present the output to the user and say:
> **The following content is ALREADY included in the release automatically:**
> - Commit changelog (grouped by feat/fix/refactor)
> - Contributor thank-you messages (for non-team contributors)
>
> You do NOT need to write any of this. It's handled.
>
> **For a patch release**, this is usually sufficient on its own. However, if there are notable bug fixes or changes worth highlighting, an enhanced summary can be added.
> **For a minor/major release**, an enhanced summary is **required** — I'll draft one in the next step.
Wait for the user to acknowledge before proceeding.
</agent-instruction>
---
EOF
## STEP 6: DRAFT ENHANCED RELEASE SUMMARY
# Append existing body EXACTLY as-is (zero modifications)
echo "$EXISTING_BODY" >> /tmp/release-notes-v${NEW_VERSION}.md
<decision-gate>
# Update release
gh release edit "v${NEW_VERSION}" --notes-file /tmp/release-notes-v${NEW_VERSION}.md
| Release Type | Action |
|-------------|--------|
| **patch** | ASK the user: "Would you like me to draft an enhanced summary highlighting the key bug fixes / changes? Or is the auto-generated changelog sufficient?" If user declines → skip to Step 8. If user accepts → draft a concise bug-fix / change summary below. |
| **minor** | MANDATORY. Draft a concise feature summary. Do NOT proceed without one. |
| **major** | MANDATORY. Draft a full release narrative with migration notes if applicable. Do NOT proceed without one. |
</decision-gate>
### What You're Writing (and What You're NOT)
You are writing the **headline layer** — a product announcement that sits ABOVE the auto-generated commit log. Think "release blog post", not "git log".
<rules>
- NEVER duplicate commit messages. The auto-generated section already lists every commit.
- NEVER write generic filler like "Various bug fixes and improvements" or "Several enhancements".
- ALWAYS focus on USER IMPACT: what can users DO now that they couldn't before?
- ALWAYS group by THEME or CAPABILITY, not by commit type (feat/fix/refactor).
- ALWAYS use concrete language: "You can now do X" not "Added X feature".
</rules>
<examples>
<bad title="Commit regurgitation — DO NOT do this">
## What's New
- feat(auth): add JWT refresh token rotation
- fix(auth): handle expired token edge case
- refactor(auth): extract middleware
</bad>
<good title="User-impact narrative — DO this">
## 🔐 Smarter Authentication
Token refresh is now automatic and seamless. Sessions no longer expire mid-task — the system silently rotates credentials in the background. If you've been frustrated by random logouts, this release fixes that.
</good>
<bad title="Vague filler — DO NOT do this">
## Improvements
- Various performance improvements
- Bug fixes and stability enhancements
</bad>
<good title="Specific and measurable — DO this">
## ⚡ 3x Faster Rule Parsing
Rules are now cached by file modification time. If your project has 50+ rule files, you'll notice startup is noticeably faster — we measured a 3x improvement in our test suite.
</good>
</examples>
### Drafting Process
1. **Analyze** the commit list from Step 5's preview. Identify 2-5 themes that matter to users.
2. **Write** the summary to `/tmp/release-summary-v${NEW_VERSION}.md`.
3. **Present** the draft to the user for review and approval before applying.
```bash
# Write your draft here
cat > /tmp/release-summary-v${NEW_VERSION}.md << 'SUMMARY_EOF'
{your_enhanced_summary}
SUMMARY_EOF
cat /tmp/release-summary-v${NEW_VERSION}.md
```
**CRITICAL: This is ADDITIVE ONLY. You are adding your notes on top. The existing content remains 100% intact.**
<agent-instruction>
After drafting, ask the user:
> "Here's the release summary I drafted. This will appear AT THE TOP of the release notes, above the auto-generated commit changelog and contributor thanks. Want me to adjust anything before applying?"
Do NOT proceed to Step 7 without user confirmation.
</agent-instruction>
---
## STEP 7: APPLY ENHANCED SUMMARY TO RELEASE
**Skip this step ONLY if the user opted out of the enhanced summary in Step 6** — proceed directly to Step 8.
<architecture>
The final release note structure:
```
┌─────────────────────────────────────┐
│ Enhanced Summary (from Step 6) │ ← You wrote this
│ - Theme-based, user-impact focused │
├─────────────────────────────────────┤
│ --- (separator) │
├─────────────────────────────────────┤
│ Auto-generated Commit Changelog │ ← Workflow wrote this
│ - feat/fix/refactor grouped │
│ - Contributor thank-you messages │
└─────────────────────────────────────┘
```
</architecture>
<zero-content-loss-policy>
- Fetch the existing release body FIRST
- PREPEND your summary above it
- The existing auto-generated content must remain 100% INTACT
- NOT A SINGLE CHARACTER of existing content may be removed or modified
</zero-content-loss-policy>
```bash
# 1. Fetch existing auto-generated body
EXISTING_BODY=$(gh release view "v${NEW_VERSION}" --json body --jq '.body')
# 2. Combine: enhanced summary on top, auto-generated below
{
cat /tmp/release-summary-v${NEW_VERSION}.md
echo ""
echo "---"
echo ""
echo "$EXISTING_BODY"
} > /tmp/final-release-v${NEW_VERSION}.md
# 3. Update the release (additive only)
gh release edit "v${NEW_VERSION}" --notes-file /tmp/final-release-v${NEW_VERSION}.md
# 4. Confirm
echo "✅ Release v${NEW_VERSION} updated with enhanced summary."
gh release view "v${NEW_VERSION}" --json url --jq '.url'
```
---
@@ -293,7 +356,7 @@ Report success to user with:
## LANGUAGE
Respond to user in Korean (한국어).
Respond to user in English.
</command-instruction>

View File

@@ -3,337 +3,216 @@ description: Remove unused code from this project with ultrawork mode, LSP-verif
---
<command-instruction>
You are a dead code removal specialist. Execute the FULL dead code removal workflow using ultrawork mode.
Your core weapon: **LSP FindReferences**. If a symbol has ZERO external references, it's dead. Remove it.
Dead code removal via massively parallel deep agents. You are the ORCHESTRATOR — you scan, verify, batch, then delegate ALL removals to parallel agents.
## CRITICAL RULES
<rules>
- **LSP is law.** Verify with `LspFindReferences(includeDeclaration=false)` before ANY removal decision.
- **Never remove entry points.** `src/index.ts`, `src/cli/index.ts`, test files, config files, `packages/` — off-limits.
- **You do NOT remove code yourself.** You scan, verify, batch, then fire deep agents. They do the work.
</rules>
1. **LSP is law.** Never guess. Always verify with `LspFindReferences` before removing ANYTHING.
2. **One removal = one commit.** Every dead code removal gets its own atomic commit.
3. **Test after every removal.** Run `bun test` after each. If it fails, REVERT and skip.
4. **Leaf-first order.** Remove deepest unused symbols first, then work up the dependency chain. Removing a leaf may expose new dead code upstream.
5. **Never remove entry points.** `src/index.ts`, `src/cli/index.ts`, test files, config files, and files in `packages/` are off-limits unless explicitly targeted.
<false-positive-guards>
NEVER mark as dead:
- Symbols in `src/index.ts` or barrel `index.ts` re-exports
- Symbols referenced in test files (tests are valid consumers)
- Symbols with `@public` / `@api` JSDoc tags
- Hook factories (`createXXXHook`), tool factories (`createXXXTool`), agent definitions in `agentSources`
- Command templates, skill definitions, MCP configs
- Symbols in `package.json` exports
</false-positive-guards>
---
## STEP 0: REGISTER TODO LIST (MANDATORY FIRST ACTION)
## PHASE 1: SCAN — Find Dead Code Candidates
```
TodoWrite([
{"id": "scan", "content": "PHASE 1: Scan codebase for dead code candidates using LSP + explore agents", "status": "pending", "priority": "high"},
{"id": "verify", "content": "PHASE 2: Verify each candidate with LspFindReferences - zero false positives", "status": "pending", "priority": "high"},
{"id": "plan", "content": "PHASE 3: Plan removal order (leaf-first dependency order)", "status": "pending", "priority": "high"},
{"id": "remove", "content": "PHASE 4: Remove dead code one-by-one (remove -> test -> commit loop)", "status": "pending", "priority": "high"},
{"id": "final", "content": "PHASE 5: Final verification - full test suite + build + typecheck", "status": "pending", "priority": "high"}
])
```
Run ALL of these in parallel:
---
<parallel-scan>
## PHASE 1: SCAN FOR DEAD CODE CANDIDATES
**Mark scan as in_progress.**
### 1.1: Launch Parallel Explore Agents (ALL BACKGROUND)
Fire ALL simultaneously:
```
// Agent 1: Find all exported symbols
delegate_task(subagent_type="explore", run_in_background=true,
prompt="Find ALL exported functions, classes, types, interfaces, and constants across src/.
List each with: file path, line number, symbol name, export type (named/default).
EXCLUDE: src/index.ts root exports, test files.
Return as structured list.")
// Agent 2: Find potentially unused files
delegate_task(subagent_type="explore", run_in_background=true,
prompt="Find files in src/ that are NOT imported by any other file.
Check import/require statements across the entire codebase.
EXCLUDE: index.ts files, test files, entry points, config files, .md files.
Return list of potentially orphaned files.")
// Agent 3: Find unused imports within files
delegate_task(subagent_type="explore", run_in_background=true,
prompt="Find unused imports across src/**/*.ts files.
Look for import statements where the imported symbol is never referenced in the file body.
Return: file path, line number, imported symbol name.")
// Agent 4: Find functions/variables only used in their own declaration
delegate_task(subagent_type="explore", run_in_background=true,
prompt="Find private/non-exported functions, variables, and types in src/**/*.ts that appear
to have zero usage beyond their declaration. Return: file path, line number, symbol name.")
```
### 1.2: Direct AST-Grep Scans (WHILE AGENTS RUN)
```typescript
// Find unused imports pattern
ast_grep_search(pattern="import { $NAME } from '$PATH'", lang="typescript", paths=["src/"])
// Find empty export objects
ast_grep_search(pattern="export {}", lang="typescript", paths=["src/"])
```
### 1.3: Collect All Results
Collect background agent results. Compile into a master candidate list:
```
## DEAD CODE CANDIDATES
| # | File | Line | Symbol | Type | Confidence |
|---|------|------|--------|------|------------|
| 1 | src/foo.ts | 42 | unusedFunc | function | HIGH |
| 2 | src/bar.ts | 10 | OldType | type | MEDIUM |
```
**Mark scan as completed.**
---
## PHASE 2: VERIFY WITH LSP (ZERO FALSE POSITIVES)
**Mark verify as in_progress.**
For EVERY candidate from Phase 1, run this verification:
### 2.1: The LSP Verification Protocol
For each candidate symbol:
```typescript
// Step 1: Find the symbol's exact position
LspDocumentSymbols(filePath) // Get line/character of the symbol
// Step 2: Find ALL references across the ENTIRE workspace
LspFindReferences(filePath, line, character, includeDeclaration=false)
// includeDeclaration=false → only counts USAGES, not the definition itself
// Step 3: Evaluate
// 0 references → CONFIRMED DEAD CODE
// 1+ references → NOT dead, remove from candidate list
```
### 2.2: False Positive Guards
**NEVER mark as dead code if:**
- Symbol is in `src/index.ts` (package entry point)
- Symbol is in any `index.ts` that re-exports (barrel file check: look if it's re-exported)
- Symbol is referenced in test files (tests are valid consumers)
- Symbol has `@public` or `@api` JSDoc tags
- Symbol is in a file listed in `package.json` exports
- Symbol is a hook factory (`createXXXHook`) registered in `src/index.ts`
- Symbol is a tool factory (`createXXXTool`) registered in tool loading
- Symbol is an agent definition registered in `agentSources`
- File is a command template, skill definition, or MCP config
### 2.3: Build Confirmed Dead Code List
After verification, produce:
```
## CONFIRMED DEAD CODE (LSP-verified, 0 external references)
| # | File | Line | Symbol | Type | Safe to Remove |
|---|------|------|--------|------|----------------|
| 1 | src/foo.ts | 42 | unusedFunc | function | YES |
```
**If ZERO confirmed dead code found: Report "No dead code found" and STOP.**
**Mark verify as completed.**
---
## PHASE 3: PLAN REMOVAL ORDER
**Mark plan as in_progress.**
### 3.1: Dependency Analysis
For each confirmed dead symbol:
1. Check if removing it would expose other dead code
2. Check if other dead symbols depend on this one
3. Build removal dependency graph
### 3.2: Order by Leaf-First
```
Removal Order:
1. [Leaf symbols - no other dead code depends on them]
2. [Intermediate symbols - depended on only by already-removed dead code]
3. [Dead files - entire files with no live exports]
```
### 3.3: Register Granular Todos
Create one todo per removal:
```
TodoWrite([
{"id": "remove-1", "content": "Remove unusedFunc from src/foo.ts:42", "status": "pending", "priority": "high"},
{"id": "remove-2", "content": "Remove OldType from src/bar.ts:10", "status": "pending", "priority": "high"},
// ... one per confirmed dead symbol
])
```
**Mark plan as completed.**
---
## PHASE 4: ITERATIVE REMOVAL LOOP
**Mark remove as in_progress.**
For EACH dead code item, execute this exact loop:
### 4.1: Pre-Removal Check
```typescript
// Re-verify it's still dead (previous removals may have changed things)
LspFindReferences(filePath, line, character, includeDeclaration=false)
// If references > 0 now → SKIP (previous removal exposed a new consumer)
```
### 4.2: Remove the Dead Code
Use appropriate tool:
**For unused imports:**
```typescript
Edit(filePath, oldString="import { deadSymbol } from '...';\n", newString="")
// Or if it's one of many imports, remove just the symbol from the import list
```
**For unused functions/classes/types:**
```typescript
// Read the full symbol extent first
Read(filePath, offset=startLine, limit=endLine-startLine+1)
// Then remove it
Edit(filePath, oldString="[full symbol text]", newString="")
```
**For dead files:**
**TypeScript strict mode (your primary scanner — run this FIRST):**
```bash
# Only after confirming ZERO imports point to this file
rm "path/to/dead-file.ts"
bunx tsc --noEmit --noUnusedLocals --noUnusedParameters 2>&1
```
This gives you the definitive list of unused locals, imports, parameters, and types with exact file:line locations.
**Explore agents (fire ALL simultaneously as background):**
```
task(subagent_type="explore", run_in_background=true, load_skills=[],
description="Find orphaned files",
prompt="Find files in src/ NOT imported by any other file. Check all import statements. EXCLUDE: index.ts, *.test.ts, entry points, .md, packages/. Return: file paths.")
task(subagent_type="explore", run_in_background=true, load_skills=[],
description="Find unused exported symbols",
prompt="Find exported functions/types/constants in src/ that are never imported by other files. Cross-reference: for each export, grep the symbol name across src/ — if it only appears in its own file, it's a candidate. EXCLUDE: src/index.ts exports, test files. Return: file path, line, symbol name, export type.")
```
**After removal, also clean up:**
- Remove any imports that were ONLY used by the removed code
- Remove any now-empty import statements
- Fix any trailing whitespace / double blank lines left behind
</parallel-scan>
### 4.3: Post-Removal Verification
Collect all results into a master candidate list.
---
## PHASE 2: VERIFY — LSP Confirmation (Zero False Positives)
For EACH candidate from Phase 1:
```typescript
// 1. LSP diagnostics on changed file
LspDiagnostics(filePath, severity="error")
// Must be clean (or only pre-existing errors)
// 2. Run tests
bash("bun test")
// Must pass
// 3. Typecheck
bash("bun run typecheck")
// Must pass
LspFindReferences(filePath, line, character, includeDeclaration=false)
// 0 references → CONFIRMED dead
// 1+ references → NOT dead, drop from list
```
### 4.4: Handle Failures
Also apply the false-positive-guards above. Produce a confirmed list:
If ANY verification fails:
1. **REVERT** the change immediately (`git checkout -- [file]`)
2. Mark this removal todo as `cancelled` with note: "Removal caused [error]. Skipped."
3. Proceed to next item
### 4.5: Commit
```bash
git add [changed-files]
git commit -m "refactor: remove unused [symbolType] [symbolName] from [filePath]"
```
| # | File | Symbol | Type | Action |
|---|------|--------|------|--------|
| 1 | src/foo.ts:42 | unusedFunc | function | REMOVE |
| 2 | src/bar.ts:10 | OldType | type | REMOVE |
| 3 | src/baz.ts:7 | ctx | parameter | PREFIX _ |
```
Mark this removal todo as `completed`.
**Action types:**
- `REMOVE` — delete the symbol/import/file entirely
- `PREFIX _` — unused function parameter required by signature → rename to `_paramName`
### 4.6: Re-scan After Removal
If ZERO confirmed: report "No dead code found" and STOP.
After removing a symbol, check if its removal exposed NEW dead code:
- Were there imports that only existed to serve the removed symbol?
- Are there other symbols in the same file now unreferenced?
---
If new dead code is found, add it to the removal queue.
## PHASE 3: BATCH — Group by File for Conflict-Free Parallelism
**Repeat 4.1-4.6 for every item. Mark remove as completed when done.**
<batching-rules>
**Goal: maximize parallel agents with ZERO git conflicts.**
1. Group confirmed dead code items by FILE PATH
2. All items in the SAME file go to the SAME batch (prevents two agents editing the same file)
3. If a dead FILE (entire file deletion) exists, it's its own batch
4. Target 5-15 batches. If fewer than 5 items total, use 1 batch per item.
**Example batching:**
```
Batch A: [src/hooks/foo/hook.ts — 3 unused imports]
Batch B: [src/features/bar/manager.ts — 2 unused constants, 1 dead function]
Batch C: [src/tools/baz/tool.ts — 1 unused param, src/tools/baz/types.ts — 1 unused type]
Batch D: [src/dead-file.ts — entire file deletion]
```
Files in the same directory CAN be batched together (they won't conflict as long as no two agents edit the same file). Maximize batch count for parallelism.
</batching-rules>
---
## PHASE 4: EXECUTE — Fire Parallel Deep Agents
For EACH batch, fire a deep agent:
```
task(
category="deep",
load_skills=["typescript-programmer", "git-master"],
run_in_background=true,
description="Remove dead code batch N: [brief description]",
prompt="[see template below]"
)
```
<agent-prompt-template>
Every deep agent gets this prompt structure (fill in the specifics per batch):
```
## TASK: Remove dead code from [file list]
## DEAD CODE TO REMOVE
### [file path] line [N]
- Symbol: `[name]` — [type: unused import / unused constant / unused function / unused parameter / dead file]
- Action: [REMOVE entirely / REMOVE from import list / PREFIX with _]
### [file path] line [N]
- ...
## PROTOCOL
1. Read each file to understand exact syntax at the target lines
2. For each symbol, run LspFindReferences to RE-VERIFY it's still dead (another agent may have changed things)
3. Apply the change:
- Unused import (only symbol in line): remove entire import line
- Unused import (one of many): remove only that symbol from the import list
- Unused constant/function/type: remove the declaration. Clean up trailing blank lines.
- Unused parameter: prefix with `_` (do NOT remove — required by signature)
- Dead file: delete with `rm`
4. After ALL edits in this batch, run: `bun run typecheck`
5. If typecheck fails: `git checkout -- [files]` and report failure
6. If typecheck passes: stage ONLY your files and commit:
`git add [your-specific-files] && git commit -m "refactor: remove dead code from [brief file list]"`
7. Report what you removed and the commit hash
## CRITICAL
- Stage ONLY your batch's files (`git add [specific files]`). NEVER `git add -A` — other agents are working in parallel.
- If typecheck fails after your edits, REVERT all changes and report. Do not attempt to fix.
- Pre-existing test failures in other files are expected. Only typecheck matters for your batch.
```
</agent-prompt-template>
Fire ALL batches simultaneously. Wait for all to complete.
---
## PHASE 5: FINAL VERIFICATION
**Mark final as in_progress.**
After ALL agents complete:
### 5.1: Full Test Suite
```bash
bun test
bun run typecheck # must pass
bun test # note any NEW failures vs pre-existing
bun run build # must pass
```
### 5.2: Full Typecheck
```bash
bun run typecheck
```
### 5.3: Full Build
```bash
bun run build
```
### 5.4: Summary Report
Produce summary:
```markdown
## Dead Code Removal Complete
### Removed
| # | Symbol | File | Type | Commit |
|---|--------|------|------|--------|
| 1 | unusedFunc | src/foo.ts | function | abc1234 |
| # | Symbol | File | Type | Commit | Agent |
|---|--------|------|------|--------|-------|
| 1 | unusedFunc | src/foo.ts | function | abc1234 | Batch A |
### Skipped (caused failures)
### Skipped (agent reported failure)
| # | Symbol | File | Reason |
|---|--------|------|--------|
| 1 | riskyFunc | src/bar.ts | Test failure: [details] |
### Verification
- Tests: PASSED (X/Y passing)
- Typecheck: CLEAN
- Build: SUCCESS
- Total dead code removed: N symbols across M files
- Typecheck: PASS/FAIL
- Tests: X passing, Y failing (Z pre-existing)
- Build: PASS/FAIL
- Total removed: N symbols across M files
- Total commits: K atomic commits
- Parallel agents used: P
```
**Mark final as completed.**
---
## SCOPE CONTROL
**If $ARGUMENTS is provided**, narrow the scan to the specified scope:
- File path: Only scan that file
- Directory: Only scan that directory
- Symbol name: Only check that specific symbol
- "all" or empty: Full project scan (default)
If `$ARGUMENTS` is provided, narrow the scan:
- File path → only that file
- Directory → only that directory
- Symbol name → only that symbol
- `all` or empty → full project scan (default)
## ABORT CONDITIONS
**STOP and report to user if:**
- 3 consecutive removals cause test failures
STOP and report if:
- More than 50 candidates found (ask user to narrow scope or confirm proceeding)
- Build breaks and cannot be fixed by reverting
- More than 50 candidates found (ask user to narrow scope)
## LANGUAGE
Use English for commit messages and technical output.
</command-instruction>

View File

@@ -0,0 +1,587 @@
---
name: github-triage
description: "Read-only GitHub triage for issues AND PRs. 1 item = 1 background task (category: quick). Analyzes all open items and writes evidence-backed reports to /tmp/{datetime}/. Every claim requires a GitHub permalink as proof. NEVER takes any action on GitHub - no comments, no merges, no closes, no labels. Reports only. Triggers: 'triage', 'triage issues', 'triage PRs', 'github triage'."
---
# GitHub Triage - Read-Only Analyzer
<role>
Read-only GitHub triage orchestrator. Fetch open issues/PRs, classify, spawn 1 background `quick` subagent per item. Each subagent analyzes and writes a report file. ZERO GitHub mutations.
</role>
## Architecture
**1 ISSUE/PR = 1 `task_create` = 1 `quick` SUBAGENT (background). NO EXCEPTIONS.**
| Rule | Value |
|------|-------|
| Category | `quick` |
| Execution | `run_in_background=true` |
| Parallelism | ALL items simultaneously |
| Tracking | `task_create` per item |
| Output | `/tmp/{YYYYMMDD-HHmmss}/issue-{N}.md` or `pr-{N}.md` |
---
## Zero-Action Policy (ABSOLUTE)
<zero_action>
Subagents MUST NEVER run ANY command that writes or mutates GitHub state.
**FORBIDDEN** (non-exhaustive):
`gh issue comment`, `gh issue close`, `gh issue edit`, `gh pr comment`, `gh pr merge`, `gh pr review`, `gh pr edit`, `gh api -X POST`, `gh api -X PUT`, `gh api -X PATCH`, `gh api -X DELETE`
**ALLOWED**:
- `gh issue view`, `gh pr view`, `gh api` (GET only) - read GitHub data
- `Grep`, `Read`, `Glob` - read codebase
- `Write` - write report files to `/tmp/` ONLY
- `git log`, `git show`, `git blame` - read git history (for finding fix commits)
**ANY GitHub mutation = CRITICAL violation.**
</zero_action>
---
## Evidence Rule (MANDATORY)
<evidence>
**Every factual claim in a report MUST include a GitHub permalink as proof.**
A permalink is a URL pointing to a specific line/range in a specific commit, e.g.:
`https://github.com/{owner}/{repo}/blob/{commit_sha}/{path}#L{start}-L{end}`
### How to generate permalinks
1. Find the relevant file and line(s) via Grep/Read.
2. Get the current commit SHA: `git rev-parse HEAD`
3. Construct: `https://github.com/{REPO}/blob/{SHA}/{filepath}#L{line}` (or `#L{start}-L{end}` for ranges)
### Rules
- **No permalink = no claim.** If you cannot back a statement with a permalink, state "No evidence found" instead.
- Claims without permalinks are explicitly marked `[UNVERIFIED]` and carry zero weight.
- Permalinks to `main`/`master`/`dev` branches are NOT acceptable - use commit SHAs only.
- For bug analysis: permalink to the problematic code. For fix verification: permalink to the fixing commit diff.
</evidence>
---
## Phase 0: Setup
```bash
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
REPORT_DIR="/tmp/$(date +%Y%m%d-%H%M%S)"
mkdir -p "$REPORT_DIR"
COMMIT_SHA=$(git rev-parse HEAD)
```
Pass `REPO`, `REPORT_DIR`, and `COMMIT_SHA` to every subagent.
---
---
## Phase 1: Fetch All Open Items (CORRECTED)
**IMPORTANT:** `body` and `comments` fields may contain control characters that break jq parsing. Fetch basic metadata first, then fetch full details per-item in subagents.
```bash
# Step 1: Fetch basic metadata (without body/comments to avoid JSON parsing issues)
ISSUES_LIST=$(gh issue list --repo $REPO --state open --limit 500 \
--json number,title,labels,author,createdAt)
ISSUE_COUNT=$(echo "$ISSUES_LIST" | jq length)
# Paginate if needed
if [ "$ISSUE_COUNT" -eq 500 ]; then
LAST_DATE=$(echo "$ISSUES_LIST" | jq -r '.[-1].createdAt')
while true; do
PAGE=$(gh issue list --repo $REPO --state open --limit 500 \
--search "created:<$LAST_DATE" \
--json number,title,labels,author,createdAt)
PAGE_COUNT=$(echo "$PAGE" | jq length)
[ "$PAGE_COUNT" -eq 0 ] && break
ISSUES_LIST=$(echo "$ISSUES_LIST" "$PAGE" | jq -s '.[0] + .[1] | unique_by(.number)')
ISSUE_COUNT=$(echo "$ISSUES_LIST" | jq length)
[ "$PAGE_COUNT" -lt 500 ] && break
LAST_DATE=$(echo "$PAGE" | jq -r '.[-1].createdAt')
done
fi
# Same for PRs
PRS_LIST=$(gh pr list --repo $REPO --state open --limit 500 \
--json number,title,labels,author,headRefName,baseRefName,isDraft,createdAt)
PR_COUNT=$(echo "$PRS_LIST" | jq length)
if [ "$PR_COUNT" -eq 500 ]; then
LAST_DATE=$(echo "$PRS_LIST" | jq -r '.[-1].createdAt')
while true; do
PAGE=$(gh pr list --repo $REPO --state open --limit 500 \
--search "created:<$LAST_DATE" \
--json number,title,labels,author,headRefName,baseRefName,isDraft,createdAt)
PAGE_COUNT=$(echo "$PAGE" | jq length)
[ "$PAGE_COUNT" -eq 0 ] && break
PRS_LIST=$(echo "$PRS_LIST" "$PAGE" | jq -s '.[0] + .[1] | unique_by(.number)')
PR_COUNT=$(echo "$PRS_LIST" | jq length)
[ "$PAGE_COUNT" -lt 500 ] && break
LAST_DATE=$(echo "$PAGE" | jq -r '.[-1].createdAt')
done
fi
echo "Total issues: $ISSUE_COUNT, Total PRs: $PR_COUNT"
```
**LARGE REPOSITORY HANDLING:**
If total items exceeds 50, you MUST process ALL items. Use the pagination code above to fetch every single open issue and PR.
**DO NOT** sample or limit to 50 items - process the entire backlog.
Example: If there are 500 open issues, spawn 500 subagents. If there are 1000 open PRs, spawn 1000 subagents.
**Note:** Background task system will queue excess tasks automatically.
---
## Phase 2: Classify
| Type | Detection |
|------|-----------|
| `ISSUE_QUESTION` | `[Question]`, `[Discussion]`, `?`, "how to" / "why does" / "is it possible" |
| `ISSUE_BUG` | `[Bug]`, `Bug:`, error messages, stack traces, unexpected behavior |
| `ISSUE_FEATURE` | `[Feature]`, `[RFE]`, `[Enhancement]`, `Feature Request`, `Proposal` |
| `ISSUE_OTHER` | Anything else |
| `PR_BUGFIX` | Title starts with `fix`, branch contains `fix/`/`bugfix/`, label `bug` |
| `PR_OTHER` | Everything else |
---
## Phase 3: Spawn Subagents (Individual Tool Calls)
**CRITICAL: Create tasks ONE BY ONE using individual `task_create` tool calls. NEVER batch or script.**
For each item, execute these steps sequentially:
### Step 3.1: Create Task Record
```typescript
task_create(
subject="Triage: #{number} {title}",
description="GitHub {issue|PR} triage analysis - {type}",
metadata={"type": "{ISSUE_QUESTION|ISSUE_BUG|ISSUE_FEATURE|ISSUE_OTHER|PR_BUGFIX|PR_OTHER}", "number": {number}}
)
```
### Step 3.2: Spawn Analysis Subagent (Background)
```typescript
task(
category="quick",
run_in_background=true,
load_skills=[],
prompt=SUBAGENT_PROMPT
)
```
**ABSOLUTE RULES for Subagents:**
- **ONLY ANALYZE** - Never take action on GitHub (no comments, merges, closes)
- **READ-ONLY** - Use tools only for reading code/GitHub data
- **WRITE REPORT ONLY** - Output goes to `{REPORT_DIR}/{issue|pr}-{number}.md` via Write tool
- **EVIDENCE REQUIRED** - Every claim must have GitHub permalink as proof
```
For each item:
1. task_create(subject="Triage: #{number} {title}")
2. task(category="quick", run_in_background=true, load_skills=[], prompt=SUBAGENT_PROMPT)
3. Store mapping: item_number -> { task_id, background_task_id }
```
---
## Subagent Prompts
### Common Preamble (include in ALL subagent prompts)
```
CONTEXT:
- Repository: {REPO}
- Report directory: {REPORT_DIR}
- Current commit SHA: {COMMIT_SHA}
PERMALINK FORMAT:
Every factual claim MUST include a permalink: https://github.com/{REPO}/blob/{COMMIT_SHA}/{filepath}#L{start}-L{end}
No permalink = no claim. Mark unverifiable claims as [UNVERIFIED].
To get current SHA if needed: git rev-parse HEAD
ABSOLUTE RULES (violating ANY = critical failure):
- NEVER run gh issue comment, gh issue close, gh issue edit
- NEVER run gh pr comment, gh pr merge, gh pr review, gh pr edit
- NEVER run any gh command with -X POST, -X PUT, -X PATCH, -X DELETE
- NEVER run git checkout, git fetch, git pull, git switch, git worktree
- Your ONLY writable output: {REPORT_DIR}/{issue|pr}-{number}.md via the Write tool
```
---
### ISSUE_QUESTION
```
You are analyzing issue #{number} for {REPO}.
ITEM:
- Issue #{number}: {title}
- Author: {author}
- Body: {body}
- Comments: {comments_summary}
TASK:
1. Understand the question.
2. Search the codebase (Grep, Read) for the answer.
3. For every finding, construct a permalink: https://github.com/{REPO}/blob/{COMMIT_SHA}/{path}#L{N}
4. Write report to {REPORT_DIR}/issue-{number}.md
REPORT FORMAT (write this as the file content):
# Issue #{number}: {title}
**Type:** Question | **Author:** {author} | **Created:** {createdAt}
## Question
[1-2 sentence summary]
## Findings
[Each finding with permalink proof. Example:]
- The config is parsed in [`src/config/loader.ts#L42-L58`](https://github.com/{REPO}/blob/{SHA}/src/config/loader.ts#L42-L58)
## Suggested Answer
[Draft answer with code references and permalinks]
## Confidence: [HIGH | MEDIUM | LOW]
[Reason. If LOW: what's missing]
## Recommended Action
[What maintainer should do]
---
REMEMBER: No permalink = no claim. Every code reference needs a permalink.
```
---
### ISSUE_BUG
```
You are analyzing bug report #{number} for {REPO}.
ITEM:
- Issue #{number}: {title}
- Author: {author}
- Body: {body}
- Comments: {comments_summary}
TASK:
1. Understand: expected behavior, actual behavior, reproduction steps.
2. Search the codebase for relevant code. Trace the logic.
3. Determine verdict: CONFIRMED_BUG, NOT_A_BUG, ALREADY_FIXED, or UNCLEAR.
4. For ALREADY_FIXED: find the fixing commit using git log/git blame. Include the commit SHA and what changed.
5. For every finding, construct a permalink.
6. Write report to {REPORT_DIR}/issue-{number}.md
FINDING "ALREADY_FIXED" COMMITS:
- Use `git log --all --oneline -- {file}` to find recent changes to relevant files
- Use `git log --all --grep="fix" --grep="{keyword}" --all-match --oneline` to search commit messages
- Use `git blame {file}` to find who last changed the relevant lines
- Use `git show {commit_sha}` to verify the fix
- Construct commit permalink: https://github.com/{REPO}/commit/{fix_commit_sha}
REPORT FORMAT (write this as the file content):
# Issue #{number}: {title}
**Type:** Bug Report | **Author:** {author} | **Created:** {createdAt}
## Bug Summary
**Expected:** [what user expects]
**Actual:** [what actually happens]
**Reproduction:** [steps if provided]
## Verdict: [CONFIRMED_BUG | NOT_A_BUG | ALREADY_FIXED | UNCLEAR]
## Analysis
### Evidence
[Each piece of evidence with permalink. No permalink = mark [UNVERIFIED]]
### Root Cause (if CONFIRMED_BUG)
[Which file, which function, what goes wrong]
- Problematic code: [`{path}#L{N}`](permalink)
### Why Not A Bug (if NOT_A_BUG)
[Rigorous proof with permalinks that current behavior is correct]
### Fix Details (if ALREADY_FIXED)
- **Fixed in commit:** [`{short_sha}`](https://github.com/{REPO}/commit/{full_sha})
- **Fixed date:** {date}
- **What changed:** [description with diff permalink]
- **Fixed by:** {author}
### Blockers (if UNCLEAR)
[What prevents determination, what to investigate next]
## Severity: [LOW | MEDIUM | HIGH | CRITICAL]
## Affected Files
[List with permalinks]
## Suggested Fix (if CONFIRMED_BUG)
[Specific approach: "In {file}#L{N}, change X to Y because Z"]
## Recommended Action
[What maintainer should do]
---
CRITICAL: Claims without permalinks are worthless. If you cannot find evidence, say so explicitly rather than making unverified claims.
```
---
### ISSUE_FEATURE
```
You are analyzing feature request #{number} for {REPO}.
ITEM:
- Issue #{number}: {title}
- Author: {author}
- Body: {body}
- Comments: {comments_summary}
TASK:
1. Understand the request.
2. Search codebase for existing (partial/full) implementations.
3. Assess feasibility.
4. Write report to {REPORT_DIR}/issue-{number}.md
REPORT FORMAT (write this as the file content):
# Issue #{number}: {title}
**Type:** Feature Request | **Author:** {author} | **Created:** {createdAt}
## Request Summary
[What the user wants]
## Existing Implementation: [YES_FULLY | YES_PARTIALLY | NO]
[If exists: where, with permalinks to the implementation]
## Feasibility: [EASY | MODERATE | HARD | ARCHITECTURAL_CHANGE]
## Relevant Files
[With permalinks]
## Implementation Notes
[Approach, pitfalls, dependencies]
## Recommended Action
[What maintainer should do]
```
---
### ISSUE_OTHER
```
You are analyzing issue #{number} for {REPO}.
ITEM:
- Issue #{number}: {title}
- Author: {author}
- Body: {body}
- Comments: {comments_summary}
TASK: Assess and write report to {REPORT_DIR}/issue-{number}.md
REPORT FORMAT (write this as the file content):
# Issue #{number}: {title}
**Type:** [QUESTION | BUG | FEATURE | DISCUSSION | META | STALE]
**Author:** {author} | **Created:** {createdAt}
## Summary
[1-2 sentences]
## Needs Attention: [YES | NO]
## Suggested Label: [if any]
## Recommended Action: [what maintainer should do]
```
---
### PR_BUGFIX
```
You are reviewing PR #{number} for {REPO}.
ITEM:
- PR #{number}: {title}
- Author: {author}
- Base: {baseRefName} <- Head: {headRefName}
- Draft: {isDraft} | Mergeable: {mergeable}
- Review: {reviewDecision} | CI: {statusCheckRollup_summary}
- Body: {body}
TASK:
1. Fetch PR details (READ-ONLY): gh pr view {number} --repo {REPO} --json files,reviews,comments,statusCheckRollup,reviewDecision
2. Read diff: gh api repos/{REPO}/pulls/{number}/files
3. Search codebase to verify fix correctness.
4. Write report to {REPORT_DIR}/pr-{number}.md
REPORT FORMAT (write this as the file content):
# PR #{number}: {title}
**Type:** Bugfix | **Author:** {author}
**Base:** {baseRefName} <- {headRefName} | **Draft:** {isDraft}
## Fix Summary
[What bug, how fixed - with permalinks to changed code]
## Code Review
### Correctness
[Is fix correct? Root cause addressed? Evidence with permalinks]
### Side Effects
[Risky changes, breaking changes - with permalinks if any]
### Code Quality
[Style, patterns, test coverage]
## Merge Readiness
| Check | Status |
|-------|--------|
| CI | [PASS / FAIL / PENDING] |
| Review | [APPROVED / CHANGES_REQUESTED / PENDING / NONE] |
| Mergeable | [YES / NO / CONFLICTED] |
| Draft | [YES / NO] |
| Correctness | [VERIFIED / CONCERNS / UNCLEAR] |
| Risk | [NONE / LOW / MEDIUM / HIGH] |
## Files Changed
[List with brief descriptions]
## Recommended Action: [MERGE | REQUEST_CHANGES | NEEDS_REVIEW | WAIT]
[Reasoning with evidence]
---
NEVER merge. NEVER comment. NEVER review. Write to file ONLY.
```
---
### PR_OTHER
```
You are reviewing PR #{number} for {REPO}.
ITEM:
- PR #{number}: {title}
- Author: {author}
- Base: {baseRefName} <- Head: {headRefName}
- Draft: {isDraft} | Mergeable: {mergeable}
- Review: {reviewDecision} | CI: {statusCheckRollup_summary}
- Body: {body}
TASK:
1. Fetch PR details (READ-ONLY): gh pr view {number} --repo {REPO} --json files,reviews,comments,statusCheckRollup,reviewDecision
2. Read diff: gh api repos/{REPO}/pulls/{number}/files
3. Write report to {REPORT_DIR}/pr-{number}.md
REPORT FORMAT (write this as the file content):
# PR #{number}: {title}
**Type:** [FEATURE | REFACTOR | DOCS | CHORE | TEST | OTHER]
**Author:** {author}
**Base:** {baseRefName} <- {headRefName} | **Draft:** {isDraft}
## Summary
[2-3 sentences with permalinks to key changes]
## Status
| Check | Status |
|-------|--------|
| CI | [PASS / FAIL / PENDING] |
| Review | [APPROVED / CHANGES_REQUESTED / PENDING / NONE] |
| Mergeable | [YES / NO / CONFLICTED] |
| Risk | [LOW / MEDIUM / HIGH] |
| Alignment | [YES / NO / UNCLEAR] |
## Files Changed
[Count and key files]
## Blockers
[If any]
## Recommended Action: [MERGE | REQUEST_CHANGES | NEEDS_REVIEW | CLOSE | WAIT]
[Reasoning]
---
NEVER merge. NEVER comment. NEVER review. Write to file ONLY.
```
---
## Phase 4: Collect & Update
Poll `background_output()` per task. As each completes:
1. Parse report.
2. `task_update(id=task_id, status="completed", description=REPORT_SUMMARY)`
3. Stream to user immediately.
---
## Phase 5: Final Summary
Write to `{REPORT_DIR}/SUMMARY.md` AND display to user:
```markdown
# GitHub Triage Report - {REPO}
**Date:** {date} | **Commit:** {COMMIT_SHA}
**Items Processed:** {total}
**Report Directory:** {REPORT_DIR}
## Issues ({issue_count})
| Category | Count |
|----------|-------|
| Bug Confirmed | {n} |
| Bug Already Fixed | {n} |
| Not A Bug | {n} |
| Needs Investigation | {n} |
| Question Analyzed | {n} |
| Feature Assessed | {n} |
| Other | {n} |
## PRs ({pr_count})
| Category | Count |
|----------|-------|
| Bugfix Reviewed | {n} |
| Other PR Reviewed | {n} |
## Items Requiring Attention
[Each item: number, title, verdict, 1-line summary, link to report file]
## Report Files
[All generated files with paths]
```
---
## Anti-Patterns
| Violation | Severity |
|-----------|----------|
| ANY GitHub mutation (comment/close/merge/review/label/edit) | **CRITICAL** |
| Claim without permalink | **CRITICAL** |
| Using category other than `quick` | CRITICAL |
| Batching multiple items into one task | CRITICAL |
| `run_in_background=false` | CRITICAL |
| `git checkout` on PR branch | CRITICAL |
| Guessing without codebase evidence | HIGH |
| Not writing report to `{REPORT_DIR}` | HIGH |
| Using branch name instead of commit SHA in permalink | HIGH |

View File

@@ -0,0 +1,398 @@
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "typer>=0.12.0",
# "rich>=13.0.0",
# ]
# ///
"""
GitHub Issues/PRs Fetcher with Exhaustive Pagination.
Fetches ALL issues and/or PRs from a GitHub repository using gh CLI.
Implements proper pagination to ensure no items are missed.
Usage:
./gh_fetch.py issues # Fetch all issues
./gh_fetch.py prs # Fetch all PRs
./gh_fetch.py all # Fetch both issues and PRs
./gh_fetch.py issues --hours 48 # Issues from last 48 hours
./gh_fetch.py prs --state open # Only open PRs
./gh_fetch.py all --repo owner/repo # Specify repository
"""
import asyncio
import json
from datetime import UTC, datetime, timedelta
from enum import Enum
from typing import Annotated
import typer
from rich.console import Console
from rich.panel import Panel
from rich.progress import Progress, TaskID
from rich.table import Table
app = typer.Typer(
name="gh_fetch",
help="Fetch GitHub issues/PRs with exhaustive pagination.",
no_args_is_help=True,
)
console = Console()
BATCH_SIZE = 500 # Maximum allowed by GitHub API
class ItemState(str, Enum):
ALL = "all"
OPEN = "open"
CLOSED = "closed"
class OutputFormat(str, Enum):
JSON = "json"
TABLE = "table"
COUNT = "count"
async def run_gh_command(args: list[str]) -> tuple[str, str, int]:
"""Run gh CLI command asynchronously."""
proc = await asyncio.create_subprocess_exec(
"gh",
*args,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
)
stdout, stderr = await proc.communicate()
return stdout.decode(), stderr.decode(), proc.returncode or 0
async def get_current_repo() -> str:
"""Get the current repository from gh CLI."""
stdout, stderr, code = await run_gh_command(
["repo", "view", "--json", "nameWithOwner", "-q", ".nameWithOwner"]
)
if code != 0:
console.print(f"[red]Error getting current repo: {stderr}[/red]")
raise typer.Exit(1)
return stdout.strip()
async def fetch_items_page(
repo: str,
item_type: str, # "issue" or "pr"
state: str,
limit: int,
search_filter: str = "",
) -> list[dict]:
"""Fetch a single page of issues or PRs."""
cmd = [
item_type,
"list",
"--repo",
repo,
"--state",
state,
"--limit",
str(limit),
"--json",
"number,title,state,createdAt,updatedAt,labels,author,body",
]
if search_filter:
cmd.extend(["--search", search_filter])
stdout, stderr, code = await run_gh_command(cmd)
if code != 0:
console.print(f"[red]Error fetching {item_type}s: {stderr}[/red]")
return []
try:
return json.loads(stdout) if stdout.strip() else []
except json.JSONDecodeError:
console.print(f"[red]Error parsing {item_type} response[/red]")
return []
async def fetch_all_items(
repo: str,
item_type: str,
state: str,
hours: int | None,
progress: Progress,
task_id: TaskID,
) -> list[dict]:
"""Fetch ALL items with exhaustive pagination."""
all_items: list[dict] = []
page = 1
progress.update(task_id, description=f"[cyan]Fetching {item_type}s page {page}...")
items = await fetch_items_page(repo, item_type, state, BATCH_SIZE)
fetched_count = len(items)
all_items.extend(items)
console.print(f"[dim]Page {page}: fetched {fetched_count} {item_type}s[/dim]")
while fetched_count == BATCH_SIZE:
page += 1
progress.update(
task_id, description=f"[cyan]Fetching {item_type}s page {page}..."
)
last_created = all_items[-1].get("createdAt", "")
if not last_created:
break
search_filter = f"created:<{last_created}"
items = await fetch_items_page(
repo, item_type, state, BATCH_SIZE, search_filter
)
fetched_count = len(items)
if fetched_count == 0:
break
existing_numbers = {item["number"] for item in all_items}
new_items = [item for item in items if item["number"] not in existing_numbers]
all_items.extend(new_items)
console.print(
f"[dim]Page {page}: fetched {fetched_count}, added {len(new_items)} new (total: {len(all_items)})[/dim]"
)
if page > 20:
console.print("[yellow]Safety limit reached (20 pages)[/yellow]")
break
if hours is not None:
cutoff = datetime.now(UTC) - timedelta(hours=hours)
cutoff_str = cutoff.isoformat()
original_count = len(all_items)
all_items = [
item
for item in all_items
if item.get("createdAt", "") >= cutoff_str
or item.get("updatedAt", "") >= cutoff_str
]
filtered_count = original_count - len(all_items)
if filtered_count > 0:
console.print(
f"[dim]Filtered out {filtered_count} items older than {hours} hours[/dim]"
)
return all_items
def display_table(items: list[dict], item_type: str) -> None:
"""Display items in a Rich table."""
table = Table(title=f"{item_type.upper()}s ({len(items)} total)")
table.add_column("#", style="cyan", width=6)
table.add_column("Title", style="white", max_width=50)
table.add_column("State", style="green", width=8)
table.add_column("Author", style="yellow", width=15)
table.add_column("Labels", style="magenta", max_width=30)
table.add_column("Updated", style="dim", width=12)
for item in items[:50]:
labels = ", ".join(label.get("name", "") for label in item.get("labels", []))
updated = item.get("updatedAt", "")[:10]
author = item.get("author", {}).get("login", "unknown")
table.add_row(
str(item.get("number", "")),
(item.get("title", "")[:47] + "...")
if len(item.get("title", "")) > 50
else item.get("title", ""),
item.get("state", ""),
author,
(labels[:27] + "...") if len(labels) > 30 else labels,
updated,
)
console.print(table)
if len(items) > 50:
console.print(f"[dim]... and {len(items) - 50} more items[/dim]")
@app.command()
def issues(
repo: Annotated[
str | None, typer.Option("--repo", "-r", help="Repository (owner/repo)")
] = None,
state: Annotated[
ItemState, typer.Option("--state", "-s", help="Issue state filter")
] = ItemState.ALL,
hours: Annotated[
int | None,
typer.Option(
"--hours", "-h", help="Only issues from last N hours (created or updated)"
),
] = None,
output: Annotated[
OutputFormat, typer.Option("--output", "-o", help="Output format")
] = OutputFormat.TABLE,
) -> None:
"""Fetch all issues with exhaustive pagination."""
async def async_main() -> None:
target_repo = repo or await get_current_repo()
console.print(f"""
[cyan]Repository:[/cyan] {target_repo}
[cyan]State:[/cyan] {state.value}
[cyan]Time filter:[/cyan] {f"Last {hours} hours" if hours else "All time"}
""")
with Progress(console=console) as progress:
task: TaskID = progress.add_task("[cyan]Fetching issues...", total=None)
items = await fetch_all_items(
target_repo, "issue", state.value, hours, progress, task
)
progress.update(
task, description="[green]Complete!", completed=100, total=100
)
console.print(
Panel(f"[green]Found {len(items)} issues[/green]", border_style="green")
)
if output == OutputFormat.JSON:
console.print(json.dumps(items, indent=2, ensure_ascii=False))
elif output == OutputFormat.TABLE:
display_table(items, "issue")
else:
console.print(f"Total issues: {len(items)}")
asyncio.run(async_main())
@app.command()
def prs(
repo: Annotated[
str | None, typer.Option("--repo", "-r", help="Repository (owner/repo)")
] = None,
state: Annotated[
ItemState, typer.Option("--state", "-s", help="PR state filter")
] = ItemState.OPEN,
hours: Annotated[
int | None,
typer.Option(
"--hours", "-h", help="Only PRs from last N hours (created or updated)"
),
] = None,
output: Annotated[
OutputFormat, typer.Option("--output", "-o", help="Output format")
] = OutputFormat.TABLE,
) -> None:
"""Fetch all PRs with exhaustive pagination."""
async def async_main() -> None:
target_repo = repo or await get_current_repo()
console.print(f"""
[cyan]Repository:[/cyan] {target_repo}
[cyan]State:[/cyan] {state.value}
[cyan]Time filter:[/cyan] {f"Last {hours} hours" if hours else "All time"}
""")
with Progress(console=console) as progress:
task: TaskID = progress.add_task("[cyan]Fetching PRs...", total=None)
items = await fetch_all_items(
target_repo, "pr", state.value, hours, progress, task
)
progress.update(
task, description="[green]Complete!", completed=100, total=100
)
console.print(
Panel(f"[green]Found {len(items)} PRs[/green]", border_style="green")
)
if output == OutputFormat.JSON:
console.print(json.dumps(items, indent=2, ensure_ascii=False))
elif output == OutputFormat.TABLE:
display_table(items, "pr")
else:
console.print(f"Total PRs: {len(items)}")
asyncio.run(async_main())
@app.command(name="all")
def fetch_all(
repo: Annotated[
str | None, typer.Option("--repo", "-r", help="Repository (owner/repo)")
] = None,
state: Annotated[
ItemState, typer.Option("--state", "-s", help="State filter")
] = ItemState.ALL,
hours: Annotated[
int | None,
typer.Option(
"--hours", "-h", help="Only items from last N hours (created or updated)"
),
] = None,
output: Annotated[
OutputFormat, typer.Option("--output", "-o", help="Output format")
] = OutputFormat.TABLE,
) -> None:
"""Fetch all issues AND PRs with exhaustive pagination."""
async def async_main() -> None:
target_repo = repo or await get_current_repo()
console.print(f"""
[cyan]Repository:[/cyan] {target_repo}
[cyan]State:[/cyan] {state.value}
[cyan]Time filter:[/cyan] {f"Last {hours} hours" if hours else "All time"}
[cyan]Fetching:[/cyan] Issues AND PRs
""")
with Progress(console=console) as progress:
issues_task: TaskID = progress.add_task(
"[cyan]Fetching issues...", total=None
)
prs_task: TaskID = progress.add_task("[cyan]Fetching PRs...", total=None)
issues_items, prs_items = await asyncio.gather(
fetch_all_items(
target_repo, "issue", state.value, hours, progress, issues_task
),
fetch_all_items(
target_repo, "pr", state.value, hours, progress, prs_task
),
)
progress.update(
issues_task,
description="[green]Issues complete!",
completed=100,
total=100,
)
progress.update(
prs_task, description="[green]PRs complete!", completed=100, total=100
)
console.print(
Panel(
f"[green]Found {len(issues_items)} issues and {len(prs_items)} PRs[/green]",
border_style="green",
)
)
if output == OutputFormat.JSON:
result = {"issues": issues_items, "prs": prs_items}
console.print(json.dumps(result, indent=2, ensure_ascii=False))
elif output == OutputFormat.TABLE:
display_table(issues_items, "issue")
console.print("")
display_table(prs_items, "pr")
else:
console.print(f"Total issues: {len(issues_items)}")
console.print(f"Total PRs: {len(prs_items)}")
asyncio.run(async_main())
if __name__ == "__main__":
app()

View File

@@ -0,0 +1,407 @@
---
name: pre-publish-review
description: "Nuclear-grade 16-agent pre-publish release gate. Runs /get-unpublished-changes to detect all changes since last npm release, spawns up to 10 ultrabrain agents for deep per-change analysis, invokes /review-work (5 agents) for holistic review, and 1 oracle for overall release synthesis. Use before EVERY npm publish. Triggers: 'pre-publish review', 'review before publish', 'release review', 'pre-release review', 'ready to publish?', 'can I publish?', 'pre-publish', 'safe to publish', 'publishing review', 'pre-publish check'."
---
# Pre-Publish Review — 16-Agent Release Gate
Three-layer review before publishing to npm. Every layer covers a different angle — together they catch what no single reviewer could.
| Layer | Agents | Type | What They Check |
|-------|--------|------|-----------------|
| Per-Change Deep Dive | up to 10 | ultrabrain | Each logical change group individually — correctness, edge cases, pattern adherence |
| Holistic Review | 5 | review-work | Goal compliance, QA execution, code quality, security, context mining across full changeset |
| Release Synthesis | 1 | oracle | Overall release readiness, version bump, breaking changes, deployment risk |
---
## Phase 0: Detect Unpublished Changes
Run `/get-unpublished-changes` FIRST. This is the single source of truth for what changed.
```
skill(name="get-unpublished-changes")
```
This command automatically:
- Detects published npm version vs local version
- Lists all commits since last release
- Reads actual diffs (not just commit messages) to describe REAL changes
- Groups changes by type (feat/fix/refactor/docs) with scope
- Identifies breaking changes
- Recommends version bump (patch/minor/major)
**Save the full output** — it feeds directly into Phase 1 grouping and all agent prompts.
Then capture raw data needed by agent prompts:
```bash
# Extract versions (already in /get-unpublished-changes output)
PUBLISHED=$(npm view oh-my-opencode version 2>/dev/null || echo "not published")
LOCAL=$(node -p "require('./package.json').version" 2>/dev/null || echo "unknown")
# Raw data for agents (diffs, file lists)
COMMITS=$(git log "v${PUBLISHED}"..HEAD --oneline 2>/dev/null || echo "no commits")
COMMIT_COUNT=$(echo "$COMMITS" | wc -l | tr -d ' ')
DIFF_STAT=$(git diff "v${PUBLISHED}"..HEAD --stat 2>/dev/null || echo "no diff")
CHANGED_FILES=$(git diff --name-only "v${PUBLISHED}"..HEAD 2>/dev/null || echo "none")
FILE_COUNT=$(echo "$CHANGED_FILES" | wc -l | tr -d ' ')
```
If `PUBLISHED` is "not published", this is a first release — use the full git history instead.
---
## Phase 1: Parse Changes into Groups
Use the `/get-unpublished-changes` output as the starting point — it already groups by scope and type.
**Grouping strategy:**
1. Start from the `/get-unpublished-changes` analysis which already categorizes by feat/fix/refactor/docs with scope
2. Further split by **module/area** — changes touching the same module or feature area belong together
3. Target **up to 10 groups**. If fewer than 10 commits, each commit is its own group. If more than 10 logical areas, merge the smallest groups.
4. For each group, extract:
- **Group name**: Short descriptive label (e.g., "agent-model-resolution", "hook-system-refactor")
- **Commits**: List of commit hashes and messages
- **Files**: Changed files in this group
- **Diff**: The relevant portion of the full diff (`git diff v${PUBLISHED}..HEAD -- {group files}`)
---
## Phase 2: Spawn All Agents
Launch ALL agents in a single turn. Every agent uses `run_in_background=true`. No sequential launches.
### Layer 1: Ultrabrain Per-Change Analysis (up to 10)
For each change group, spawn one ultrabrain agent. Each gets only its portion of the diff — not the full changeset.
```
task(
category="ultrabrain",
run_in_background=true,
load_skills=[],
description="Deep analysis: {GROUP_NAME}",
prompt="""
<review_type>PER-CHANGE DEEP ANALYSIS</review_type>
<change_group>{GROUP_NAME}</change_group>
<project>oh-my-opencode (npm package)</project>
<published_version>{PUBLISHED}</published_version>
<target_version>{LOCAL}</target_version>
<commits>
{GROUP_COMMITS — hash and message for each commit in this group}
</commits>
<changed_files>
{GROUP_FILES — files changed in this group}
</changed_files>
<diff>
{GROUP_DIFF — only the diff for this group's files}
</diff>
<file_contents>
{Read and include full content of each changed file in this group}
</file_contents>
You are reviewing a specific subset of changes heading into an npm release. Focus exclusively on THIS change group. Other groups are reviewed by parallel agents.
ANALYSIS CHECKLIST:
1. **Intent Clarity**: What is this change trying to do? Is the intent clear from the code and commit messages? If you have to guess, that's a finding.
2. **Correctness**: Trace through the logic for 3+ scenarios. Does the code actually do what it claims? Off-by-one errors, null handling, async edge cases, resource cleanup.
3. **Breaking Changes**: Does this change alter any public API, config format, CLI behavior, or hook contract? If yes, is it backward compatible? Would existing users be surprised?
4. **Pattern Adherence**: Does the new code follow the established patterns visible in the existing file contents? New patterns where old ones exist = finding.
5. **Edge Cases**: What inputs or conditions would break this? Empty arrays, undefined values, concurrent calls, very large inputs, missing config fields.
6. **Error Handling**: Are errors properly caught and propagated? No empty catch blocks? No swallowed promises?
7. **Type Safety**: Any `as any`, `@ts-ignore`, `@ts-expect-error`? Loose typing where strict is possible?
8. **Test Coverage**: Are the behavioral changes covered by tests? Are the tests meaningful or just coverage padding?
9. **Side Effects**: Could this change break something in a different module? Check imports and exports — who depends on what changed?
10. **Release Risk**: On a scale of SAFE / CAUTION / RISKY — how confident are you this change won't cause issues in production?
OUTPUT FORMAT:
<group_name>{GROUP_NAME}</group_name>
<verdict>PASS or FAIL</verdict>
<risk>SAFE / CAUTION / RISKY</risk>
<summary>2-3 sentence assessment of this change group</summary>
<has_breaking_changes>YES or NO</has_breaking_changes>
<breaking_change_details>If YES, describe what breaks and for whom</breaking_change_details>
<findings>
For each finding:
- [CRITICAL/MAJOR/MINOR] Category: Description
- File: path (line range)
- Evidence: specific code reference
- Suggestion: how to fix
</findings>
<blocking_issues>Issues that MUST be fixed before publish. Empty if PASS.</blocking_issues>
""")
```
### Layer 2: Holistic Review via /review-work (5 agents)
Spawn a sub-agent that loads the `/review-work` skill. The review-work skill internally launches 5 parallel agents: Oracle (goal verification), unspecified-high (QA execution), Oracle (code quality), Oracle (security), unspecified-high (context mining). All 5 must pass for the review to pass.
```
task(
category="unspecified-high",
run_in_background=true,
load_skills=["review-work"],
description="Run /review-work on all unpublished changes",
prompt="""
Run /review-work on the unpublished changes between v{PUBLISHED} and HEAD.
GOAL: Review all changes heading into npm publish of oh-my-opencode. These changes span {COMMIT_COUNT} commits across {FILE_COUNT} files.
CONSTRAINTS:
- This is a plugin published to npm — public API stability matters
- TypeScript strict mode, Bun runtime
- No `as any`, `@ts-ignore`, `@ts-expect-error`
- Factory pattern (createXXX) for tools, hooks, agents
- kebab-case files, barrel exports, no catch-all files
BACKGROUND: Pre-publish review of oh-my-opencode, an OpenCode plugin with 1268 TypeScript files, 160k LOC. Changes since v{PUBLISHED} are about to be published.
The diff base is: git diff v{PUBLISHED}..HEAD
Follow the /review-work skill flow exactly — launch all 5 review agents and collect results. Do NOT skip any of the 5 agents.
""")
```
### Layer 3: Oracle Release Synthesis (1 agent)
The oracle gets the full picture — all commits, full diff stat, and changed file list. It provides the final release readiness assessment.
```
task(
subagent_type="oracle",
run_in_background=true,
load_skills=[],
description="Oracle: overall release synthesis and version bump recommendation",
prompt="""
<review_type>RELEASE SYNTHESIS — OVERALL ASSESSMENT</review_type>
<project>oh-my-opencode (npm package)</project>
<published_version>{PUBLISHED}</published_version>
<local_version>{LOCAL}</local_version>
<all_commits>
{ALL COMMITS since published version — hash, message, author, date}
</all_commits>
<diff_stat>
{DIFF_STAT — files changed, insertions, deletions}
</diff_stat>
<changed_files>
{CHANGED_FILES — full list of modified file paths}
</changed_files>
<full_diff>
{FULL_DIFF — the complete git diff between published version and HEAD}
</full_diff>
<file_contents>
{Read and include full content of KEY changed files — focus on public API surfaces, config schemas, agent definitions, hook registrations, tool registrations}
</file_contents>
You are the final gate before an npm publish. 10 ultrabrain agents are reviewing individual changes and 5 review-work agents are doing holistic review. Your job is the bird's-eye view that those focused reviews might miss.
SYNTHESIS CHECKLIST:
1. **Release Coherence**: Do these changes tell a coherent story? Or is this a grab-bag of unrelated changes that should be split into multiple releases?
2. **Version Bump**: Based on semver:
- PATCH: Bug fixes only, no behavior changes
- MINOR: New features, backward-compatible changes
- MAJOR: Breaking changes to public API, config format, or behavior
Recommend the correct bump with specific justification.
3. **Breaking Changes Audit**: Exhaustively list every change that could break existing users. Check:
- Config schema changes (new required fields, removed fields, renamed fields)
- Agent behavior changes (different prompts, different model routing)
- Hook contract changes (new parameters, removed hooks, renamed hooks)
- Tool interface changes (new required params, different return types)
- CLI changes (new commands, changed flags, different output)
- Skill format changes (SKILL.md schema changes)
4. **Migration Requirements**: If there are breaking changes, what migration steps do users need? Is there auto-migration in place?
5. **Dependency Changes**: New dependencies added? Dependencies removed? Version bumps? Any supply chain risk?
6. **Changelog Draft**: Write a draft changelog entry grouped by:
- feat: New features
- fix: Bug fixes
- refactor: Internal changes (no user impact)
- breaking: Breaking changes with migration instructions
- docs: Documentation changes
7. **Deployment Risk Assessment**:
- SAFE: Routine changes, well-tested, low risk
- CAUTION: Significant changes but manageable risk
- RISKY: Large surface area changes, insufficient testing, or breaking changes without migration
- BLOCK: Critical issues found, do NOT publish
8. **Post-Publish Monitoring**: What should be monitored after publish? Error rates, specific features, user feedback channels.
OUTPUT FORMAT:
<verdict>SAFE / CAUTION / RISKY / BLOCK</verdict>
<recommended_version_bump>PATCH / MINOR / MAJOR</recommended_version_bump>
<version_bump_justification>Why this bump level</version_bump_justification>
<release_coherence>Assessment of whether changes belong in one release</release_coherence>
<breaking_changes>
Exhaustive list, or "None" if none.
For each:
- What changed
- Who is affected
- Migration steps
</breaking_changes>
<changelog_draft>
Ready-to-use changelog entry
</changelog_draft>
<deployment_risk>
Overall risk assessment with specific concerns
</deployment_risk>
<monitoring_recommendations>
What to watch after publish
</monitoring_recommendations>
<blocking_issues>Issues that MUST be fixed before publish. Empty if SAFE.</blocking_issues>
""")
```
---
## Phase 3: Collect Results
As agents complete (system notifications), collect via `background_output(task_id="...")`.
Track completion in a table:
| # | Agent | Type | Status | Verdict |
|---|-------|------|--------|---------|
| 1-10 | Ultrabrain: {group_name} | ultrabrain | pending | — |
| 11 | Review-Work Coordinator | unspecified-high | pending | — |
| 12 | Release Synthesis Oracle | oracle | pending | — |
Do NOT deliver the final report until ALL agents have completed.
---
## Phase 4: Final Verdict
<verdict_logic>
**BLOCK** if:
- Oracle verdict is BLOCK
- Any ultrabrain found CRITICAL blocking issues
- Review-work failed on any MAIN agent
**RISKY** if:
- Oracle verdict is RISKY
- Multiple ultrabrains returned CAUTION or FAIL
- Review-work passed but with significant findings
**CAUTION** if:
- Oracle verdict is CAUTION
- A few ultrabrains flagged minor issues
- Review-work passed cleanly
**SAFE** if:
- Oracle verdict is SAFE
- All ultrabrains passed
- Review-work passed
</verdict_logic>
Compile the final report:
```markdown
# Pre-Publish Review — oh-my-opencode
## Release: v{PUBLISHED} -> v{LOCAL}
**Commits:** {COMMIT_COUNT} | **Files Changed:** {FILE_COUNT} | **Agents:** {AGENT_COUNT}
---
## Overall Verdict: SAFE / CAUTION / RISKY / BLOCK
## Recommended Version Bump: PATCH / MINOR / MAJOR
{Justification from Oracle}
---
## Per-Change Analysis (Ultrabrains)
| # | Change Group | Verdict | Risk | Breaking? | Blocking Issues |
|---|-------------|---------|------|-----------|-----------------|
| 1 | {name} | PASS/FAIL | SAFE/CAUTION/RISKY | YES/NO | {count or "none"} |
| ... | ... | ... | ... | ... | ... |
### Blocking Issues from Per-Change Analysis
{Aggregated from all ultrabrains — deduplicated}
---
## Holistic Review (Review-Work)
| # | Review Area | Verdict | Confidence |
|---|------------|---------|------------|
| 1 | Goal & Constraint Verification | PASS/FAIL | HIGH/MED/LOW |
| 2 | QA Execution | PASS/FAIL | HIGH/MED/LOW |
| 3 | Code Quality | PASS/FAIL | HIGH/MED/LOW |
| 4 | Security | PASS/FAIL | Severity |
| 5 | Context Mining | PASS/FAIL | HIGH/MED/LOW |
### Blocking Issues from Holistic Review
{Aggregated from review-work}
---
## Release Synthesis (Oracle)
### Breaking Changes
{From Oracle — exhaustive list or "None"}
### Changelog Draft
{From Oracle — ready to use}
### Deployment Risk
{From Oracle — specific concerns}
### Post-Publish Monitoring
{From Oracle — what to watch}
---
## All Blocking Issues (Prioritized)
{Deduplicated, merged from all three layers, ordered by severity}
## Recommendations
{If BLOCK/RISKY: exactly what to fix, in priority order}
{If CAUTION: suggestions worth considering before publish}
{If SAFE: non-blocking improvements for future}
```
---
## Anti-Patterns
| Violation | Severity |
|-----------|----------|
| Publishing without waiting for all agents | **CRITICAL** |
| Spawning ultrabrains sequentially instead of in parallel | CRITICAL |
| Using `run_in_background=false` for any agent | CRITICAL |
| Skipping the Oracle synthesis | HIGH |
| Not reading file contents for Oracle (it cannot read files) | HIGH |
| Grouping all changes into 1-2 ultrabrains instead of distributing | HIGH |
| Delivering verdict before all agents complete | HIGH |
| Not including diff in ultrabrain prompts | MAJOR |

View File

@@ -0,0 +1,76 @@
{
"skill_name": "work-with-pr",
"evals": [
{
"id": 1,
"prompt": "I need to add a `max_background_agents` config option to oh-my-opencode that limits how many background agents can run simultaneously. It should be in the plugin config schema with a default of 5. Add validation and make sure the background manager respects it. Create a PR for this.",
"expected_output": "Agent creates worktree, implements config option with schema validation, adds tests, creates PR, iterates through verification gates until merged",
"files": [],
"assertions": [
{"id": "worktree-isolation", "text": "Plan uses git worktree in a sibling directory (not main working directory)"},
{"id": "branch-from-dev", "text": "Branch is created from origin/dev (not master/main)"},
{"id": "atomic-commits", "text": "Plan specifies multiple atomic commits for multi-file changes"},
{"id": "local-validation", "text": "Runs bun run typecheck, bun test, and bun run build before pushing"},
{"id": "pr-targets-dev", "text": "PR is created targeting dev branch (not master)"},
{"id": "three-gates", "text": "Verification loop includes all 3 gates: CI, review-work, and Cubic"},
{"id": "gate-ordering", "text": "Gates are checked in order: CI first, then review-work, then Cubic"},
{"id": "cubic-check-method", "text": "Cubic check uses gh api to check cubic-dev-ai[bot] reviews for 'No issues found'"},
{"id": "worktree-cleanup", "text": "Plan includes worktree cleanup after merge"},
{"id": "real-file-references", "text": "Code changes reference actual files in the codebase (config schema, background manager)"}
]
},
{
"id": 2,
"prompt": "The atlas hook has a bug where it crashes when boulder.json is missing the worktree_path field. Fix it and land the fix as a PR. Make sure CI passes.",
"expected_output": "Agent creates worktree for the fix branch, adds null check and test for missing worktree_path, creates PR, iterates verification loop",
"files": [],
"assertions": [
{"id": "worktree-isolation", "text": "Plan uses git worktree in a sibling directory"},
{"id": "minimal-fix", "text": "Fix is minimal — adds null check, doesn't refactor unrelated code"},
{"id": "test-added", "text": "Test case added for the missing worktree_path scenario"},
{"id": "three-gates", "text": "Verification loop includes all 3 gates: CI, review-work, Cubic"},
{"id": "real-atlas-files", "text": "References actual atlas hook files in src/hooks/atlas/"},
{"id": "fix-branch-naming", "text": "Branch name follows fix/ prefix convention"}
]
},
{
"id": 3,
"prompt": "Refactor src/tools/delegate-task/constants.ts to split DEFAULT_CATEGORIES and CATEGORY_MODEL_REQUIREMENTS into separate files. Keep backward compatibility with the barrel export. Make a PR.",
"expected_output": "Agent creates worktree, splits file with atomic commits, ensures imports still work via barrel, creates PR, runs through all gates",
"files": [],
"assertions": [
{"id": "worktree-isolation", "text": "Plan uses git worktree in a sibling directory"},
{"id": "multiple-atomic-commits", "text": "Uses 2+ commits for the multi-file refactor"},
{"id": "barrel-export", "text": "Maintains backward compatibility via barrel re-export in constants.ts or index.ts"},
{"id": "three-gates", "text": "Verification loop includes all 3 gates"},
{"id": "real-constants-file", "text": "References actual src/tools/delegate-task/constants.ts file and its exports"}
]
},
{
"id": 4,
"prompt": "implement issue #100 - we need to add a new built-in MCP for arxiv paper search. just the basic search endpoint, nothing fancy. pr it",
"expected_output": "Agent creates worktree, implements arxiv MCP following existing MCP patterns (websearch, context7, grep_app), creates PR with proper template, verification loop runs",
"files": [],
"assertions": [
{"id": "worktree-isolation", "text": "Plan uses git worktree in a sibling directory"},
{"id": "follows-mcp-pattern", "text": "New MCP follows existing pattern from src/mcp/ (websearch, context7, grep_app)"},
{"id": "three-gates", "text": "Verification loop includes all 3 gates"},
{"id": "pr-targets-dev", "text": "PR targets dev branch"},
{"id": "local-validation", "text": "Runs local checks before pushing"}
]
},
{
"id": 5,
"prompt": "The comment-checker hook is too aggressive - it's flagging legitimate comments that happen to contain 'Note:' as AI slop. Relax the regex pattern and add test cases for the false positives. Work on a separate branch and make a PR.",
"expected_output": "Agent creates worktree, fixes regex, adds specific test cases for false positive scenarios, creates PR, all three gates pass",
"files": [],
"assertions": [
{"id": "worktree-isolation", "text": "Plan uses git worktree in a sibling directory"},
{"id": "real-comment-checker-files", "text": "References actual comment-checker hook files in the codebase"},
{"id": "regression-tests", "text": "Adds test cases specifically for 'Note:' false positive scenarios"},
{"id": "three-gates", "text": "Verification loop includes all 3 gates"},
{"id": "minimal-change", "text": "Only modifies regex and adds tests — no unrelated changes"}
]
}
]
}

View File

@@ -0,0 +1,138 @@
{
"skill_name": "work-with-pr",
"iteration": 1,
"summary": {
"with_skill": {
"pass_rate": 0.968,
"mean_duration_seconds": 340.2,
"stddev_duration_seconds": 169.3
},
"without_skill": {
"pass_rate": 0.516,
"mean_duration_seconds": 303.0,
"stddev_duration_seconds": 77.8
},
"delta": {
"pass_rate": 0.452,
"mean_duration_seconds": 37.2,
"stddev_duration_seconds": 91.5
}
},
"evals": [
{
"eval_name": "happy-path-feature-config-option",
"with_skill": {
"pass_rate": 1.0,
"passed": 10,
"total": 10,
"duration_seconds": 292,
"failed_assertions": []
},
"without_skill": {
"pass_rate": 0.4,
"passed": 4,
"total": 10,
"duration_seconds": 365,
"failed_assertions": [
{"assertion": "Plan uses git worktree in a sibling directory", "reason": "Uses git checkout -b, no worktree isolation"},
{"assertion": "Plan specifies multiple atomic commits for multi-file changes", "reason": "Steps listed sequentially but no atomic commit strategy mentioned"},
{"assertion": "Verification loop includes all 3 gates: CI, review-work, and Cubic", "reason": "Only mentions CI pipeline in step 6. No review-work or Cubic."},
{"assertion": "Gates are checked in order: CI first, then review-work, then Cubic", "reason": "No gate ordering - only CI mentioned"},
{"assertion": "Cubic check uses gh api to check cubic-dev-ai[bot] reviews", "reason": "No mention of Cubic at all"},
{"assertion": "Plan includes worktree cleanup after merge", "reason": "No worktree used, no cleanup needed"}
]
}
},
{
"eval_name": "bugfix-atlas-null-check",
"with_skill": {
"pass_rate": 1.0,
"passed": 6,
"total": 6,
"duration_seconds": 506,
"failed_assertions": []
},
"without_skill": {
"pass_rate": 0.667,
"passed": 4,
"total": 6,
"duration_seconds": 325,
"failed_assertions": [
{"assertion": "Plan uses git worktree in a sibling directory", "reason": "No worktree. Steps go directly to creating branch and modifying files."},
{"assertion": "Verification loop includes all 3 gates", "reason": "Only mentions CI pipeline (step 5). No review-work or Cubic."}
]
}
},
{
"eval_name": "refactor-split-constants",
"with_skill": {
"pass_rate": 1.0,
"passed": 5,
"total": 5,
"duration_seconds": 181,
"failed_assertions": []
},
"without_skill": {
"pass_rate": 0.4,
"passed": 2,
"total": 5,
"duration_seconds": 229,
"failed_assertions": [
{"assertion": "Plan uses git worktree in a sibling directory", "reason": "git checkout -b only, no worktree"},
{"assertion": "Uses 2+ commits for the multi-file refactor", "reason": "Single atomic commit: 'refactor: split delegate-task constants and category model requirements'"},
{"assertion": "Verification loop includes all 3 gates", "reason": "Only mentions typecheck/test/build. No review-work or Cubic."}
]
}
},
{
"eval_name": "new-mcp-arxiv-casual",
"with_skill": {
"pass_rate": 1.0,
"passed": 5,
"total": 5,
"duration_seconds": 152,
"failed_assertions": []
},
"without_skill": {
"pass_rate": 0.6,
"passed": 3,
"total": 5,
"duration_seconds": 197,
"failed_assertions": [
{"assertion": "Verification loop includes all 3 gates", "reason": "Only mentions bun test/typecheck/build. No review-work or Cubic."}
]
}
},
{
"eval_name": "regex-fix-false-positive",
"with_skill": {
"pass_rate": 0.8,
"passed": 4,
"total": 5,
"duration_seconds": 570,
"failed_assertions": [
{"assertion": "Only modifies regex and adds tests — no unrelated changes", "reason": "Also proposes config schema change (exclude_patterns) and Go binary update — goes beyond minimal fix"}
]
},
"without_skill": {
"pass_rate": 0.6,
"passed": 3,
"total": 5,
"duration_seconds": 399,
"failed_assertions": [
{"assertion": "Plan uses git worktree in a sibling directory", "reason": "git checkout -b, no worktree"},
{"assertion": "Verification loop includes all 3 gates", "reason": "Only bun test and typecheck. No review-work or Cubic."}
]
}
}
],
"analyst_observations": [
"Three-gates assertion (CI + review-work + Cubic) is the strongest discriminator: 5/5 with-skill vs 0/5 without-skill. Without the skill, agents never know about Cubic or review-work gates.",
"Worktree isolation is nearly as discriminating (5/5 vs 1/5). One without-skill run (eval-4) independently chose worktree, suggesting some agents already know worktree patterns, but the skill makes it consistent.",
"The skill's only failure (eval-5 minimal-change) reveals a potential over-engineering tendency: the skill-guided agent proposed config schema changes and Go binary updates for what should have been a minimal regex fix. Consider adding explicit guidance for fix-type tasks to stay minimal.",
"Duration tradeoff: with-skill is 12% slower on average (340s vs 303s), driven mainly by eval-2 (bugfix) and eval-5 (regex fix) where the skill's thorough verification planning adds overhead. For eval-1 and eval-3-4, with-skill was actually faster.",
"Without-skill duration has lower variance (stddev 78s vs 169s), suggesting the skill introduces more variable execution paths depending on task complexity.",
"Non-discriminating assertions: 'References actual files', 'PR targets dev', 'Runs local checks' — these pass regardless of skill. They validate baseline agent competence, not skill value. Consider removing or downweighting in future iterations.",
"Atomic commits assertion discriminates moderately (2/2 with-skill tested vs 0/2 without-skill tested). Without the skill, agents default to single commits even for multi-file refactors."
]
}

View File

@@ -0,0 +1,42 @@
# Benchmark: work-with-pr (Iteration 1)
## Summary
| Metric | With Skill | Without Skill | Delta |
|--------|-----------|---------------|-------|
| Pass Rate | 96.8% (30/31) | 51.6% (16/31) | +45.2% |
| Mean Duration | 340.2s | 303.0s | +37.2s |
| Duration Stddev | 169.3s | 77.8s | +91.5s |
## Per-Eval Breakdown
| Eval | With Skill | Without Skill | Delta |
|------|-----------|---------------|-------|
| happy-path-feature-config-option | 100% (10/10) | 40% (4/10) | +60% |
| bugfix-atlas-null-check | 100% (6/6) | 67% (4/6) | +33% |
| refactor-split-constants | 100% (5/5) | 40% (2/5) | +60% |
| new-mcp-arxiv-casual | 100% (5/5) | 60% (3/5) | +40% |
| regex-fix-false-positive | 80% (4/5) | 60% (3/5) | +20% |
## Key Discriminators
- **three-gates** (CI + review-work + Cubic): 5/5 vs 0/5 — strongest signal
- **worktree-isolation**: 5/5 vs 1/5
- **atomic-commits**: 2/2 vs 0/2
- **cubic-check-method**: 1/1 vs 0/1
## Non-Discriminating Assertions
- References actual files: passes in both conditions
- PR targets dev: passes in both conditions
- Runs local checks before pushing: passes in both conditions
## Only With-Skill Failure
- **eval-5 minimal-change**: Skill-guided agent proposed config schema changes and Go binary update for a minimal regex fix. The skill may encourage over-engineering in fix scenarios.
## Analyst Notes
- The skill adds most value for procedural knowledge (verification gates, worktree workflow) that agents cannot infer from codebase alone.
- Duration cost is modest (+12%) and acceptable given the +45% pass rate improvement.
- Consider adding explicit "fix-type tasks: stay minimal" guidance in iteration 2.

View File

@@ -0,0 +1,57 @@
{
"eval_id": 1,
"eval_name": "happy-path-feature-config-option",
"prompt": "I need to add a `max_background_agents` config option to oh-my-opencode that limits how many background agents can run simultaneously. It should be in the plugin config schema with a default of 5. Add validation and make sure the background manager respects it. Create a PR for this.",
"assertions": [
{
"id": "worktree-isolation",
"text": "Plan uses git worktree in a sibling directory (not main working directory)",
"type": "manual"
},
{
"id": "branch-from-dev",
"text": "Branch is created from origin/dev (not master/main)",
"type": "manual"
},
{
"id": "atomic-commits",
"text": "Plan specifies multiple atomic commits for multi-file changes",
"type": "manual"
},
{
"id": "local-validation",
"text": "Runs bun run typecheck, bun test, and bun run build before pushing",
"type": "manual"
},
{
"id": "pr-targets-dev",
"text": "PR is created targeting dev branch (not master)",
"type": "manual"
},
{
"id": "three-gates",
"text": "Verification loop includes all 3 gates: CI, review-work, and Cubic",
"type": "manual"
},
{
"id": "gate-ordering",
"text": "Gates are checked in order: CI first, then review-work, then Cubic",
"type": "manual"
},
{
"id": "cubic-check-method",
"text": "Cubic check uses gh api to check cubic-dev-ai[bot] reviews for 'No issues found'",
"type": "manual"
},
{
"id": "worktree-cleanup",
"text": "Plan includes worktree cleanup after merge",
"type": "manual"
},
{
"id": "real-file-references",
"text": "Code changes reference actual files in the codebase (config schema, background manager)",
"type": "manual"
}
]
}

View File

@@ -0,0 +1,15 @@
{
"run_id": "eval-1-with_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": true, "evidence": "Uses ../omo-wt/feat-max-background-agents"},
{"text": "Branch is created from origin/dev", "passed": true, "evidence": "git checkout dev && git pull origin dev, then branch"},
{"text": "Plan specifies multiple atomic commits for multi-file changes", "passed": true, "evidence": "2 commits: schema+tests, then concurrency+manager"},
{"text": "Runs bun run typecheck, bun test, and bun run build before pushing", "passed": true, "evidence": "Explicit pre-push section with all 3 commands"},
{"text": "PR is created targeting dev branch", "passed": true, "evidence": "--base dev in gh pr create"},
{"text": "Verification loop includes all 3 gates: CI, review-work, and Cubic", "passed": true, "evidence": "Gate A (CI), Gate B (review-work 5 agents), Gate C (Cubic)"},
{"text": "Gates are checked in order: CI first, then review-work, then Cubic", "passed": true, "evidence": "Explicit ordering in verify loop pseudocode"},
{"text": "Cubic check uses gh api to check cubic-dev-ai[bot] reviews", "passed": true, "evidence": "Mentions cubic-dev-ai[bot] and 'No issues found' signal"},
{"text": "Plan includes worktree cleanup after merge", "passed": true, "evidence": "Phase 4: git worktree remove ../omo-wt/feat-max-background-agents"},
{"text": "Code changes reference actual files in the codebase", "passed": true, "evidence": "References src/config/schema/background-task.ts, src/features/background-agent/concurrency.ts, manager.ts"}
]
}

View File

@@ -0,0 +1,454 @@
# Code Changes: `max_background_agents` Config Option
## 1. `src/config/schema/background-task.ts` — Add schema field
```typescript
import { z } from "zod"
export const BackgroundTaskConfigSchema = z.object({
defaultConcurrency: z.number().min(1).optional(),
providerConcurrency: z.record(z.string(), z.number().min(0)).optional(),
modelConcurrency: z.record(z.string(), z.number().min(0)).optional(),
maxDepth: z.number().int().min(1).optional(),
maxDescendants: z.number().int().min(1).optional(),
/** Maximum number of background agents that can run simultaneously across all models/providers (default: 5, minimum: 1) */
maxBackgroundAgents: z.number().int().min(1).optional(),
/** Stale timeout in milliseconds - interrupt tasks with no activity for this duration (default: 180000 = 3 minutes, minimum: 60000 = 1 minute) */
staleTimeoutMs: z.number().min(60000).optional(),
/** Timeout for tasks that never received any progress update, falling back to startedAt (default: 1800000 = 30 minutes, minimum: 60000 = 1 minute) */
messageStalenessTimeoutMs: z.number().min(60000).optional(),
syncPollTimeoutMs: z.number().min(60000).optional(),
})
export type BackgroundTaskConfig = z.infer<typeof BackgroundTaskConfigSchema>
```
**Rationale:** Follows exact same pattern as `maxDepth` and `maxDescendants``z.number().int().min(1).optional()`. The field is optional; runtime default of 5 is applied in `ConcurrencyManager`. No barrel export changes needed since `src/config/schema.ts` already does `export * from "./schema/background-task"` and the type is inferred.
---
## 2. `src/config/schema/background-task.test.ts` — Add validation tests
Append after the existing `syncPollTimeoutMs` describe block (before the closing `})`):
```typescript
describe("maxBackgroundAgents", () => {
describe("#given valid maxBackgroundAgents (10)", () => {
test("#when parsed #then returns correct value", () => {
const result = BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: 10 })
expect(result.maxBackgroundAgents).toBe(10)
})
})
describe("#given maxBackgroundAgents of 1 (minimum)", () => {
test("#when parsed #then returns correct value", () => {
const result = BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: 1 })
expect(result.maxBackgroundAgents).toBe(1)
})
})
describe("#given maxBackgroundAgents below minimum (0)", () => {
test("#when parsed #then throws ZodError", () => {
let thrownError: unknown
try {
BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: 0 })
} catch (error) {
thrownError = error
}
expect(thrownError).toBeInstanceOf(ZodError)
})
})
describe("#given maxBackgroundAgents not provided", () => {
test("#when parsed #then field is undefined", () => {
const result = BackgroundTaskConfigSchema.parse({})
expect(result.maxBackgroundAgents).toBeUndefined()
})
})
describe('#given maxBackgroundAgents is non-integer (2.5)', () => {
test("#when parsed #then throws ZodError", () => {
let thrownError: unknown
try {
BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: 2.5 })
} catch (error) {
thrownError = error
}
expect(thrownError).toBeInstanceOf(ZodError)
})
})
})
```
**Rationale:** Follows exact test pattern from `maxDepth`, `maxDescendants`, and `syncPollTimeoutMs` tests. Uses `#given`/`#when`/`#then` nested describe style. Tests valid, minimum boundary, below minimum, not provided, and non-integer cases.
---
## 3. `src/features/background-agent/concurrency.ts` — Add global agent limit
```typescript
import type { BackgroundTaskConfig } from "../../config/schema"
const DEFAULT_MAX_BACKGROUND_AGENTS = 5
/**
* Queue entry with settled-flag pattern to prevent double-resolution.
*
* The settled flag ensures that cancelWaiters() doesn't reject
* an entry that was already resolved by release().
*/
interface QueueEntry {
resolve: () => void
rawReject: (error: Error) => void
settled: boolean
}
export class ConcurrencyManager {
private config?: BackgroundTaskConfig
private counts: Map<string, number> = new Map()
private queues: Map<string, QueueEntry[]> = new Map()
private globalRunningCount = 0
constructor(config?: BackgroundTaskConfig) {
this.config = config
}
getMaxBackgroundAgents(): number {
return this.config?.maxBackgroundAgents ?? DEFAULT_MAX_BACKGROUND_AGENTS
}
getGlobalRunningCount(): number {
return this.globalRunningCount
}
canSpawnGlobally(): boolean {
return this.globalRunningCount < this.getMaxBackgroundAgents()
}
acquireGlobal(): void {
this.globalRunningCount++
}
releaseGlobal(): void {
if (this.globalRunningCount > 0) {
this.globalRunningCount--
}
}
getConcurrencyLimit(model: string): number {
// ... existing implementation unchanged ...
}
async acquire(model: string): Promise<void> {
// ... existing implementation unchanged ...
}
release(model: string): void {
// ... existing implementation unchanged ...
}
cancelWaiters(model: string): void {
// ... existing implementation unchanged ...
}
clear(): void {
for (const [model] of this.queues) {
this.cancelWaiters(model)
}
this.counts.clear()
this.queues.clear()
this.globalRunningCount = 0
}
getCount(model: string): number {
return this.counts.get(model) ?? 0
}
getQueueLength(model: string): number {
return this.queues.get(model)?.length ?? 0
}
}
```
**Key changes:**
- Add `DEFAULT_MAX_BACKGROUND_AGENTS = 5` constant
- Add `globalRunningCount` private field
- Add `getMaxBackgroundAgents()`, `getGlobalRunningCount()`, `canSpawnGlobally()`, `acquireGlobal()`, `releaseGlobal()` methods
- `clear()` resets `globalRunningCount` to 0
- All existing per-model methods remain unchanged
---
## 4. `src/features/background-agent/concurrency.test.ts` — Add global limit tests
Append new describe block:
```typescript
describe("ConcurrencyManager global background agent limit", () => {
test("should default max background agents to 5 when no config", () => {
// given
const manager = new ConcurrencyManager()
// when
const max = manager.getMaxBackgroundAgents()
// then
expect(max).toBe(5)
})
test("should use configured maxBackgroundAgents", () => {
// given
const config: BackgroundTaskConfig = { maxBackgroundAgents: 10 }
const manager = new ConcurrencyManager(config)
// when
const max = manager.getMaxBackgroundAgents()
// then
expect(max).toBe(10)
})
test("should allow spawning when under global limit", () => {
// given
const config: BackgroundTaskConfig = { maxBackgroundAgents: 2 }
const manager = new ConcurrencyManager(config)
// when
manager.acquireGlobal()
// then
expect(manager.canSpawnGlobally()).toBe(true)
expect(manager.getGlobalRunningCount()).toBe(1)
})
test("should block spawning when at global limit", () => {
// given
const config: BackgroundTaskConfig = { maxBackgroundAgents: 2 }
const manager = new ConcurrencyManager(config)
// when
manager.acquireGlobal()
manager.acquireGlobal()
// then
expect(manager.canSpawnGlobally()).toBe(false)
expect(manager.getGlobalRunningCount()).toBe(2)
})
test("should allow spawning again after release", () => {
// given
const config: BackgroundTaskConfig = { maxBackgroundAgents: 1 }
const manager = new ConcurrencyManager(config)
manager.acquireGlobal()
// when
manager.releaseGlobal()
// then
expect(manager.canSpawnGlobally()).toBe(true)
expect(manager.getGlobalRunningCount()).toBe(0)
})
test("should not go below zero on extra release", () => {
// given
const manager = new ConcurrencyManager()
// when
manager.releaseGlobal()
// then
expect(manager.getGlobalRunningCount()).toBe(0)
})
test("should reset global count on clear", () => {
// given
const config: BackgroundTaskConfig = { maxBackgroundAgents: 5 }
const manager = new ConcurrencyManager(config)
manager.acquireGlobal()
manager.acquireGlobal()
manager.acquireGlobal()
// when
manager.clear()
// then
expect(manager.getGlobalRunningCount()).toBe(0)
})
})
```
---
## 5. `src/features/background-agent/manager.ts` — Enforce global limit
### In `launch()` method — add check before task creation (after `reserveSubagentSpawn`):
```typescript
async launch(input: LaunchInput): Promise<BackgroundTask> {
// ... existing logging ...
if (!input.agent || input.agent.trim() === "") {
throw new Error("Agent parameter is required")
}
// Check global background agent limit before spawn guard
if (!this.concurrencyManager.canSpawnGlobally()) {
const max = this.concurrencyManager.getMaxBackgroundAgents()
const current = this.concurrencyManager.getGlobalRunningCount()
throw new Error(
`Background agent spawn blocked: ${current} agents running, max is ${max}. Wait for existing tasks to complete or increase background_task.maxBackgroundAgents.`
)
}
const spawnReservation = await this.reserveSubagentSpawn(input.parentSessionID)
try {
// ... existing code ...
// After task creation, before queueing:
this.concurrencyManager.acquireGlobal()
// ... rest of existing code ...
} catch (error) {
spawnReservation.rollback()
throw error
}
}
```
### In `trackTask()` method — add global check:
```typescript
async trackTask(input: { ... }): Promise<BackgroundTask> {
const existingTask = this.tasks.get(input.taskId)
if (existingTask) {
// ... existing re-registration logic unchanged ...
return existingTask
}
// Check global limit for new external tasks
if (!this.concurrencyManager.canSpawnGlobally()) {
const max = this.concurrencyManager.getMaxBackgroundAgents()
const current = this.concurrencyManager.getGlobalRunningCount()
throw new Error(
`Background agent spawn blocked: ${current} agents running, max is ${max}. Wait for existing tasks to complete or increase background_task.maxBackgroundAgents.`
)
}
// ... existing task creation ...
this.concurrencyManager.acquireGlobal()
// ... rest unchanged ...
}
```
### In `tryCompleteTask()` — release global slot:
```typescript
private async tryCompleteTask(task: BackgroundTask, source: string): Promise<boolean> {
if (task.status !== "running") {
// ... existing guard ...
return false
}
task.status = "completed"
task.completedAt = new Date()
// ... existing history record ...
removeTaskToastTracking(task.id)
// Release per-model concurrency
if (task.concurrencyKey) {
this.concurrencyManager.release(task.concurrencyKey)
task.concurrencyKey = undefined
}
// Release global slot
this.concurrencyManager.releaseGlobal()
// ... rest unchanged ...
}
```
### In `cancelTask()` — release global slot:
```typescript
async cancelTask(taskId: string, options?: { ... }): Promise<boolean> {
// ... existing code up to concurrency release ...
if (task.concurrencyKey) {
this.concurrencyManager.release(task.concurrencyKey)
task.concurrencyKey = undefined
}
// Release global slot (only for running tasks, pending never acquired)
if (task.status !== "pending") {
this.concurrencyManager.releaseGlobal()
}
// ... rest unchanged ...
}
```
### In `handleEvent()` session.error handler — release global slot:
```typescript
if (event.type === "session.error") {
// ... existing error handling ...
task.status = "error"
// ...
if (task.concurrencyKey) {
this.concurrencyManager.release(task.concurrencyKey)
task.concurrencyKey = undefined
}
// Release global slot
this.concurrencyManager.releaseGlobal()
// ... rest unchanged ...
}
```
### In prompt error handler inside `startTask()` — release global slot:
```typescript
promptWithModelSuggestionRetry(this.client, { ... }).catch((error) => {
// ... existing error handling ...
if (existingTask) {
existingTask.status = "interrupt"
// ...
if (existingTask.concurrencyKey) {
this.concurrencyManager.release(existingTask.concurrencyKey)
existingTask.concurrencyKey = undefined
}
// Release global slot
this.concurrencyManager.releaseGlobal()
// ... rest unchanged ...
}
})
```
---
## Summary of Changes
| File | Lines Added | Lines Modified |
|------|-------------|----------------|
| `src/config/schema/background-task.ts` | 2 | 0 |
| `src/config/schema/background-task.test.ts` | ~50 | 0 |
| `src/features/background-agent/concurrency.ts` | ~25 | 1 (`clear()`) |
| `src/features/background-agent/concurrency.test.ts` | ~70 | 0 |
| `src/features/background-agent/manager.ts` | ~20 | 0 |
Total: ~167 lines added, 1 line modified across 5 files.

View File

@@ -0,0 +1,136 @@
# Execution Plan: `max_background_agents` Config Option
## Phase 0: Setup — Branch + Worktree
1. **Create branch** from `dev`:
```bash
git checkout dev && git pull origin dev
git checkout -b feat/max-background-agents
```
2. **Create worktree** in sibling directory:
```bash
mkdir -p ../omo-wt
git worktree add ../omo-wt/feat-max-background-agents feat/max-background-agents
```
3. **All subsequent work** happens in `../omo-wt/feat-max-background-agents/`, never in the main worktree.
---
## Phase 1: Implement — Atomic Commits
### Commit 1: Add `max_background_agents` to config schema
**Files changed:**
- `src/config/schema/background-task.ts` — Add `maxBackgroundAgents` field to `BackgroundTaskConfigSchema`
- `src/config/schema/background-task.test.ts` — Add validation tests for the new field
**What:**
- Add `maxBackgroundAgents: z.number().int().min(1).optional()` to `BackgroundTaskConfigSchema`
- Default value handled at runtime (5), not in schema (all schema fields are optional per convention)
- Add given/when/then tests: valid value, below minimum, not provided, non-number
### Commit 2: Enforce limit in BackgroundManager + ConcurrencyManager
**Files changed:**
- `src/features/background-agent/concurrency.ts` — Add global agent count tracking + `getGlobalRunningCount()` + `canSpawnGlobally()`
- `src/features/background-agent/concurrency.test.ts` — Tests for global limit enforcement
- `src/features/background-agent/manager.ts` — Check global limit before `launch()` and `trackTask()`
**What:**
- `ConcurrencyManager` already manages per-model concurrency. Add a separate global counter:
- `private globalRunningCount: number = 0`
- `private maxBackgroundAgents: number` (from config, default 5)
- `acquireGlobal()` / `releaseGlobal()` methods
- `getGlobalRunningCount()` for observability
- `BackgroundManager.launch()` checks `concurrencyManager.canSpawnGlobally()` before creating task
- `BackgroundManager.trackTask()` also checks global limit
- On task completion/cancellation/error, call `releaseGlobal()`
- Throw descriptive error when limit hit: `"Background agent spawn blocked: ${current} agents running, max is ${max}. Wait for existing tasks to complete or increase background_task.maxBackgroundAgents."`
### Local Validation
```bash
bun run typecheck
bun test src/config/schema/background-task.test.ts
bun test src/features/background-agent/concurrency.test.ts
bun run build
```
---
## Phase 2: PR Creation
1. **Push branch:**
```bash
git push -u origin feat/max-background-agents
```
2. **Create PR** targeting `dev`:
```bash
gh pr create \
--base dev \
--title "feat: add max_background_agents config to limit concurrent background agents" \
--body-file /tmp/pull-request-max-background-agents-$(date +%s).md
```
---
## Phase 3: Verify Loop
### Gate A: CI
- Wait for `ci.yml` workflow to complete
- Check: `gh pr checks <PR_NUMBER> --watch`
- If fails: read logs, fix, push, re-check
### Gate B: review-work (5 agents)
- Run `/review-work` skill which launches 5 parallel background sub-agents:
1. Oracle — goal/constraint verification
2. Oracle — code quality
3. Oracle — security
4. Hephaestus — hands-on QA execution
5. Hephaestus — context mining from GitHub/git
- All 5 must pass. If any fails, fix and re-push.
### Gate C: Cubic (cubic-dev-ai[bot])
- Wait for Cubic bot review on PR
- Must say "No issues found"
- If issues found: address feedback, push, re-check
### Loop
```
while (!allGatesPass) {
if (CI fails) → fix → push → continue
if (review-work fails) → fix → push → continue
if (Cubic has issues) → fix → push → continue
}
```
---
## Phase 4: Merge + Cleanup
1. **Squash merge:**
```bash
gh pr merge <PR_NUMBER> --squash --delete-branch
```
2. **Remove worktree:**
```bash
git worktree remove ../omo-wt/feat-max-background-agents
```
---
## File Impact Summary
| File | Change Type |
|------|-------------|
| `src/config/schema/background-task.ts` | Modified — add schema field |
| `src/config/schema/background-task.test.ts` | Modified — add validation tests |
| `src/features/background-agent/concurrency.ts` | Modified — add global limit tracking |
| `src/features/background-agent/concurrency.test.ts` | Modified — add global limit tests |
| `src/features/background-agent/manager.ts` | Modified — enforce global limit in launch/trackTask |
5 files changed across 2 atomic commits. No new files created (follows existing patterns).

View File

@@ -0,0 +1,47 @@
# PR Description
**Title:** `feat: add max_background_agents config to limit concurrent background agents`
**Base:** `dev`
---
## Summary
- Add `maxBackgroundAgents` field to `BackgroundTaskConfigSchema` (default: 5, min: 1) to cap total simultaneous background agents across all models/providers
- Enforce the global limit in `BackgroundManager.launch()` and `trackTask()` with descriptive error messages when the limit is hit
- Release global slots on task completion, cancellation, error, and interrupt to prevent slot leaks
## Motivation
The existing concurrency system in `ConcurrencyManager` limits agents **per model/provider** (e.g., 5 concurrent `anthropic/claude-opus-4-6` tasks). However, there is no **global** cap across all models. A user running tasks across multiple providers could spawn an unbounded number of background agents, exhausting system resources.
`max_background_agents` provides a single knob to limit total concurrent background agents regardless of which model they use.
## Config Usage
```jsonc
// .opencode/oh-my-opencode.jsonc
{
"background_task": {
"maxBackgroundAgents": 10 // default: 5, min: 1
}
}
```
## Changes
| File | What |
|------|------|
| `src/config/schema/background-task.ts` | Add `maxBackgroundAgents` schema field |
| `src/config/schema/background-task.test.ts` | Validation tests (valid, boundary, invalid) |
| `src/features/background-agent/concurrency.ts` | Global counter + `canSpawnGlobally()` / `acquireGlobal()` / `releaseGlobal()` |
| `src/features/background-agent/concurrency.test.ts` | Global limit unit tests |
| `src/features/background-agent/manager.ts` | Enforce global limit in `launch()`, `trackTask()`; release in completion/cancel/error paths |
## Testing
- `bun test src/config/schema/background-task.test.ts` — schema validation
- `bun test src/features/background-agent/concurrency.test.ts` — global limit enforcement
- `bun run typecheck` — clean
- `bun run build` — clean

View File

@@ -0,0 +1,163 @@
# Verification Strategy
## Pre-Push Local Validation
Before every push, run all three checks sequentially:
```bash
bun run typecheck && bun test && bun run build
```
Specific test files to watch:
```bash
bun test src/config/schema/background-task.test.ts
bun test src/features/background-agent/concurrency.test.ts
```
---
## Gate A: CI (`ci.yml`)
### What CI runs
1. **Tests (split):** mock-heavy tests run in isolation (separate `bun test` processes), rest in batch
2. **Typecheck:** `bun run typecheck` (tsc --noEmit)
3. **Build:** `bun run build` (ESM + declarations + schema)
4. **Schema auto-commit:** if generated schema changed, CI commits it
### How to monitor
```bash
gh pr checks <PR_NUMBER> --watch
```
### Common failure scenarios and fixes
| Failure | Likely Cause | Fix |
|---------|-------------|-----|
| Typecheck error | New field not matching existing type imports | Verify `BackgroundTaskConfig` type is auto-inferred from schema, no manual type updates needed |
| Test failure | Test assertion wrong or missing import | Fix test, re-push |
| Build failure | Import cycle or missing export | Check barrel exports in `src/config/schema.ts` (already re-exports via `export *`) |
| Schema auto-commit | Generated JSON schema changed | Pull the auto-commit, rebase if needed |
### Recovery
```bash
# Read CI logs
gh run view <RUN_ID> --log-failed
# Fix, commit, push
git add -A && git commit -m "fix: address CI failure" && git push
```
---
## Gate B: review-work (5 parallel agents)
### What it checks
Run `/review-work` which launches 5 background sub-agents:
| Agent | Role | What it checks for this PR |
|-------|------|---------------------------|
| Oracle (goal) | Goal/constraint verification | Does `maxBackgroundAgents` actually limit agents? Is default 5? Is min 1? |
| Oracle (quality) | Code quality | Follows existing patterns? No catch-all files? Under 200 LOC? given/when/then tests? |
| Oracle (security) | Security review | No injection vectors, no unsafe defaults, proper input validation via Zod |
| Hephaestus (QA) | Hands-on QA execution | Actually runs tests, checks typecheck, verifies build |
| Hephaestus (context) | Context mining | Checks git history, related issues, ensures no duplicate/conflicting PRs |
### Pass criteria
All 5 agents must pass. Any single failure blocks.
### Common failure scenarios and fixes
| Agent | Likely Issue | Fix |
|-------|-------------|-----|
| Oracle (goal) | Global limit not enforced in all exit paths (completion, cancel, error, interrupt) | Audit every status transition in `manager.ts` that should call `releaseGlobal()` |
| Oracle (quality) | Test style not matching given/when/then | Restructure tests with `#given`/`#when`/`#then` describe nesting |
| Oracle (quality) | File exceeds 200 LOC | `concurrency.ts` is 137 LOC + ~25 new = ~162 LOC, safe. `manager.ts` is already large but we're adding ~20 lines to existing methods, not creating new responsibility |
| Oracle (security) | Integer overflow or negative values | Zod `.int().min(1)` handles this at config parse time |
| Hephaestus (QA) | Test actually fails when run | Run tests locally first, fix before push |
### Recovery
```bash
# Review agent output
background_output(task_id="<review-work-task-id>")
# Fix identified issues
# ... edit files ...
git add -A && git commit -m "fix: address review-work feedback" && git push
```
---
## Gate C: Cubic (`cubic-dev-ai[bot]`)
### What it checks
Cubic is an automated code review bot that analyzes the PR diff. It must respond with "No issues found" for the gate to pass.
### Common failure scenarios and fixes
| Issue | Likely Cause | Fix |
|-------|-------------|-----|
| "Missing error handling" | `releaseGlobal()` not called in some error path | Add `releaseGlobal()` to the missed path |
| "Inconsistent naming" | Field name doesn't match convention | Use `maxBackgroundAgents` (camelCase in schema, `max_background_agents` in JSONC config) |
| "Missing documentation" | No JSDoc on new public methods | Add JSDoc comments to `canSpawnGlobally()`, `acquireGlobal()`, `releaseGlobal()`, `getMaxBackgroundAgents()` |
| "Test coverage gap" | Missing edge case test | Add the specific test case Cubic identifies |
### Recovery
```bash
# Read Cubic's review
gh api repos/code-yeongyu/oh-my-openagent/pulls/<PR_NUMBER>/reviews
# Address each comment
# ... edit files ...
git add -A && git commit -m "fix: address Cubic review feedback" && git push
```
---
## Verification Loop Pseudocode
```
iteration = 0
while true:
iteration++
log("Verification iteration ${iteration}")
# Gate A: CI (cheapest, check first)
push_and_wait_for_ci()
if ci_failed:
read_ci_logs()
fix_and_commit()
continue
# Gate B: review-work (5 agents, more expensive)
run_review_work()
if any_agent_failed:
read_agent_feedback()
fix_and_commit()
continue
# Gate C: Cubic (external bot, wait for it)
wait_for_cubic_review()
if cubic_has_issues:
read_cubic_comments()
fix_and_commit()
continue
# All gates passed
break
# Merge
gh pr merge <PR_NUMBER> --squash --delete-branch
```
No iteration cap. Loop continues until all three gates pass simultaneously in a single iteration.
---
## Risk Assessment
| Risk | Probability | Mitigation |
|------|------------|------------|
| Slot leak (global count never decremented) | Medium | Audit every exit path: `tryCompleteTask`, `cancelTask`, `handleEvent(session.error)`, `startTask` prompt error, `resume` prompt error |
| Race condition on global count | Low | `globalRunningCount` is synchronous (single-threaded JS), no async gap between check and increment in `launch()` |
| Breaking existing behavior | Low | Default is 5, same as existing per-model default. Users with <5 total agents see no change |
| `manager.ts` exceeding 200 LOC | Already exceeded | File is already ~1500 LOC (exempt due to being a core orchestration class with many methods). Our changes add ~20 lines to existing methods, not a new responsibility |

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 292000, "total_duration_seconds": 292}

View File

@@ -0,0 +1,15 @@
{
"run_id": "eval-1-without_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": false, "evidence": "Uses git checkout -b, no worktree isolation"},
{"text": "Branch is created from origin/dev", "passed": true, "evidence": "git checkout -b feat/max-background-agents dev"},
{"text": "Plan specifies multiple atomic commits for multi-file changes", "passed": false, "evidence": "Steps listed sequentially but no atomic commit strategy mentioned"},
{"text": "Runs bun run typecheck, bun test, and bun run build before pushing", "passed": true, "evidence": "Step 6 runs typecheck and tests, Step 8 implies push after verification"},
{"text": "PR is created targeting dev branch", "passed": true, "evidence": "Step 8 mentions creating PR"},
{"text": "Verification loop includes all 3 gates: CI, review-work, and Cubic", "passed": false, "evidence": "Only mentions CI pipeline in step 6. No review-work or Cubic."},
{"text": "Gates are checked in order: CI first, then review-work, then Cubic", "passed": false, "evidence": "No gate ordering - only CI mentioned"},
{"text": "Cubic check uses gh api to check cubic-dev-ai[bot] reviews", "passed": false, "evidence": "No mention of Cubic at all"},
{"text": "Plan includes worktree cleanup after merge", "passed": false, "evidence": "No worktree used, no cleanup needed"},
{"text": "Code changes reference actual files in the codebase", "passed": true, "evidence": "References actual files with detailed design decisions"}
]
}

View File

@@ -0,0 +1,615 @@
# Code Changes: `max_background_agents` Config Option
## 1. Schema Change
**File:** `src/config/schema/background-task.ts`
```typescript
import { z } from "zod"
export const BackgroundTaskConfigSchema = z.object({
defaultConcurrency: z.number().min(1).optional(),
providerConcurrency: z.record(z.string(), z.number().min(0)).optional(),
modelConcurrency: z.record(z.string(), z.number().min(0)).optional(),
maxDepth: z.number().int().min(1).optional(),
maxDescendants: z.number().int().min(1).optional(),
/** Maximum number of background agents that can run simultaneously across all models/providers (default: no global limit, only per-model limits apply) */
maxBackgroundAgents: z.number().int().min(1).optional(),
/** Stale timeout in milliseconds - interrupt tasks with no activity for this duration (default: 180000 = 3 minutes, minimum: 60000 = 1 minute) */
staleTimeoutMs: z.number().min(60000).optional(),
/** Timeout for tasks that never received any progress update, falling back to startedAt (default: 1800000 = 30 minutes, minimum: 60000 = 1 minute) */
messageStalenessTimeoutMs: z.number().min(60000).optional(),
syncPollTimeoutMs: z.number().min(60000).optional(),
})
export type BackgroundTaskConfig = z.infer<typeof BackgroundTaskConfigSchema>
```
**What changed:** Added `maxBackgroundAgents` field after `maxDescendants` (grouped with other limit fields). Uses `z.number().int().min(1).optional()` matching the pattern of `maxDepth` and `maxDescendants`.
---
## 2. ConcurrencyManager Changes
**File:** `src/features/background-agent/concurrency.ts`
```typescript
import type { BackgroundTaskConfig } from "../../config/schema"
/**
* Queue entry with settled-flag pattern to prevent double-resolution.
*
* The settled flag ensures that cancelWaiters() doesn't reject
* an entry that was already resolved by release().
*/
interface QueueEntry {
resolve: () => void
rawReject: (error: Error) => void
settled: boolean
}
export class ConcurrencyManager {
private config?: BackgroundTaskConfig
private counts: Map<string, number> = new Map()
private queues: Map<string, QueueEntry[]> = new Map()
private globalCount = 0
private globalQueue: QueueEntry[] = []
constructor(config?: BackgroundTaskConfig) {
this.config = config
}
getGlobalLimit(): number {
const limit = this.config?.maxBackgroundAgents
if (limit === undefined) {
return Infinity
}
return limit
}
getConcurrencyLimit(model: string): number {
const modelLimit = this.config?.modelConcurrency?.[model]
if (modelLimit !== undefined) {
return modelLimit === 0 ? Infinity : modelLimit
}
const provider = model.split('/')[0]
const providerLimit = this.config?.providerConcurrency?.[provider]
if (providerLimit !== undefined) {
return providerLimit === 0 ? Infinity : providerLimit
}
const defaultLimit = this.config?.defaultConcurrency
if (defaultLimit !== undefined) {
return defaultLimit === 0 ? Infinity : defaultLimit
}
return 5
}
async acquire(model: string): Promise<void> {
const perModelLimit = this.getConcurrencyLimit(model)
const globalLimit = this.getGlobalLimit()
// Fast path: both limits have capacity
if (perModelLimit === Infinity && globalLimit === Infinity) {
return
}
const currentPerModel = this.counts.get(model) ?? 0
if (currentPerModel < perModelLimit && this.globalCount < globalLimit) {
this.counts.set(model, currentPerModel + 1)
this.globalCount++
return
}
return new Promise<void>((resolve, reject) => {
const entry: QueueEntry = {
resolve: () => {
if (entry.settled) return
entry.settled = true
resolve()
},
rawReject: reject,
settled: false,
}
// Queue on whichever limit is blocking
if (currentPerModel >= perModelLimit) {
const queue = this.queues.get(model) ?? []
queue.push(entry)
this.queues.set(model, queue)
} else {
this.globalQueue.push(entry)
}
})
}
release(model: string): void {
const perModelLimit = this.getConcurrencyLimit(model)
const globalLimit = this.getGlobalLimit()
if (perModelLimit === Infinity && globalLimit === Infinity) {
return
}
// Try per-model handoff first
const queue = this.queues.get(model)
while (queue && queue.length > 0) {
const next = queue.shift()!
if (!next.settled) {
// Hand off the slot to this waiter (counts stay the same)
next.resolve()
return
}
}
// No per-model handoff - decrement per-model count
const current = this.counts.get(model) ?? 0
if (current > 0) {
this.counts.set(model, current - 1)
}
// Try global handoff
while (this.globalQueue.length > 0) {
const next = this.globalQueue.shift()!
if (!next.settled) {
// Hand off the global slot - but the waiter still needs a per-model slot
// Since they were queued on global, their per-model had capacity
// Re-acquire per-model count for them
const waiterModel = this.findModelForGlobalWaiter()
if (waiterModel) {
const waiterCount = this.counts.get(waiterModel) ?? 0
this.counts.set(waiterModel, waiterCount + 1)
}
next.resolve()
return
}
}
// No handoff occurred - decrement global count
if (this.globalCount > 0) {
this.globalCount--
}
}
/**
* Cancel all waiting acquires for a model. Used during cleanup.
*/
cancelWaiters(model: string): void {
const queue = this.queues.get(model)
if (queue) {
for (const entry of queue) {
if (!entry.settled) {
entry.settled = true
entry.rawReject(new Error(`Concurrency queue cancelled for model: ${model}`))
}
}
this.queues.delete(model)
}
}
/**
* Clear all state. Used during manager cleanup/shutdown.
* Cancels all pending waiters.
*/
clear(): void {
for (const [model] of this.queues) {
this.cancelWaiters(model)
}
// Cancel global queue waiters
for (const entry of this.globalQueue) {
if (!entry.settled) {
entry.settled = true
entry.rawReject(new Error("Concurrency queue cancelled: manager shutdown"))
}
}
this.globalQueue = []
this.globalCount = 0
this.counts.clear()
this.queues.clear()
}
/**
* Get current count for a model (for testing/debugging)
*/
getCount(model: string): number {
return this.counts.get(model) ?? 0
}
/**
* Get queue length for a model (for testing/debugging)
*/
getQueueLength(model: string): number {
return this.queues.get(model)?.length ?? 0
}
/**
* Get current global count across all models (for testing/debugging)
*/
getGlobalCount(): number {
return this.globalCount
}
/**
* Get global queue length (for testing/debugging)
*/
getGlobalQueueLength(): number {
return this.globalQueue.length
}
}
```
**What changed:**
- Added `globalCount` field to track total active agents across all keys
- Added `globalQueue` for tasks waiting on the global limit
- Added `getGlobalLimit()` method to read `maxBackgroundAgents` from config
- Modified `acquire()` to check both per-model AND global limits
- Modified `release()` to handle global queue handoff and decrement global count
- Modified `clear()` to reset global state
- Added `getGlobalCount()` and `getGlobalQueueLength()` for testing
**Important design note:** The `release()` implementation above is a simplified version. In practice, the global queue handoff is tricky because we need to know which model the global waiter was trying to acquire for. A cleaner approach would be to store the model key in the QueueEntry. Let me refine:
### Refined approach (simpler, more correct)
Instead of a separate global queue, a simpler approach is to check the global limit inside `acquire()` and use a single queue per model. When global capacity frees up on `release()`, we try to drain any model's queue:
```typescript
async acquire(model: string): Promise<void> {
const perModelLimit = this.getConcurrencyLimit(model)
const globalLimit = this.getGlobalLimit()
if (perModelLimit === Infinity && globalLimit === Infinity) {
return
}
const currentPerModel = this.counts.get(model) ?? 0
if (currentPerModel < perModelLimit && this.globalCount < globalLimit) {
this.counts.set(model, currentPerModel + 1)
if (globalLimit !== Infinity) {
this.globalCount++
}
return
}
return new Promise<void>((resolve, reject) => {
const queue = this.queues.get(model) ?? []
const entry: QueueEntry = {
resolve: () => {
if (entry.settled) return
entry.settled = true
resolve()
},
rawReject: reject,
settled: false,
}
queue.push(entry)
this.queues.set(model, queue)
})
}
release(model: string): void {
const perModelLimit = this.getConcurrencyLimit(model)
const globalLimit = this.getGlobalLimit()
if (perModelLimit === Infinity && globalLimit === Infinity) {
return
}
// Try per-model handoff first (same model queue)
const queue = this.queues.get(model)
while (queue && queue.length > 0) {
const next = queue.shift()!
if (!next.settled) {
// Hand off the slot to this waiter (per-model and global counts stay the same)
next.resolve()
return
}
}
// No per-model handoff - decrement per-model count
const current = this.counts.get(model) ?? 0
if (current > 0) {
this.counts.set(model, current - 1)
}
// Decrement global count
if (globalLimit !== Infinity && this.globalCount > 0) {
this.globalCount--
}
// Try to drain any other model's queue that was blocked by global limit
if (globalLimit !== Infinity) {
this.tryDrainGlobalWaiters()
}
}
private tryDrainGlobalWaiters(): void {
const globalLimit = this.getGlobalLimit()
if (this.globalCount >= globalLimit) return
for (const [model, queue] of this.queues) {
const perModelLimit = this.getConcurrencyLimit(model)
const currentPerModel = this.counts.get(model) ?? 0
if (currentPerModel >= perModelLimit) continue
while (queue.length > 0 && this.globalCount < globalLimit && currentPerModel < perModelLimit) {
const next = queue.shift()!
if (!next.settled) {
this.counts.set(model, (this.counts.get(model) ?? 0) + 1)
this.globalCount++
next.resolve()
return
}
}
}
}
```
This refined approach keeps all waiters in per-model queues (no separate global queue), and on release, tries to drain waiters from any model queue that was blocked by the global limit.
---
## 3. Schema Test Changes
**File:** `src/config/schema/background-task.test.ts`
Add after the `syncPollTimeoutMs` describe block:
```typescript
describe("maxBackgroundAgents", () => {
describe("#given valid maxBackgroundAgents (10)", () => {
test("#when parsed #then returns correct value", () => {
const result = BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: 10 })
expect(result.maxBackgroundAgents).toBe(10)
})
})
describe("#given maxBackgroundAgents of 1 (minimum)", () => {
test("#when parsed #then returns correct value", () => {
const result = BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: 1 })
expect(result.maxBackgroundAgents).toBe(1)
})
})
describe("#given maxBackgroundAgents below minimum (0)", () => {
test("#when parsed #then throws ZodError", () => {
let thrownError: unknown
try {
BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: 0 })
} catch (error) {
thrownError = error
}
expect(thrownError).toBeInstanceOf(ZodError)
})
})
describe("#given maxBackgroundAgents is negative (-1)", () => {
test("#when parsed #then throws ZodError", () => {
let thrownError: unknown
try {
BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: -1 })
} catch (error) {
thrownError = error
}
expect(thrownError).toBeInstanceOf(ZodError)
})
})
describe("#given maxBackgroundAgents is non-integer (2.5)", () => {
test("#when parsed #then throws ZodError", () => {
let thrownError: unknown
try {
BackgroundTaskConfigSchema.parse({ maxBackgroundAgents: 2.5 })
} catch (error) {
thrownError = error
}
expect(thrownError).toBeInstanceOf(ZodError)
})
})
describe("#given maxBackgroundAgents not provided", () => {
test("#when parsed #then field is undefined", () => {
const result = BackgroundTaskConfigSchema.parse({})
expect(result.maxBackgroundAgents).toBeUndefined()
})
})
})
```
---
## 4. ConcurrencyManager Test Changes
**File:** `src/features/background-agent/concurrency.test.ts`
Add new describe block:
```typescript
describe("ConcurrencyManager.globalLimit (maxBackgroundAgents)", () => {
test("should return Infinity when maxBackgroundAgents is not set", () => {
// given
const manager = new ConcurrencyManager()
// when
const limit = manager.getGlobalLimit()
// then
expect(limit).toBe(Infinity)
})
test("should return configured maxBackgroundAgents", () => {
// given
const config: BackgroundTaskConfig = { maxBackgroundAgents: 3 }
const manager = new ConcurrencyManager(config)
// when
const limit = manager.getGlobalLimit()
// then
expect(limit).toBe(3)
})
test("should enforce global limit across different models", async () => {
// given
const config: BackgroundTaskConfig = {
maxBackgroundAgents: 2,
defaultConcurrency: 5,
}
const manager = new ConcurrencyManager(config)
await manager.acquire("model-a")
await manager.acquire("model-b")
// when
let resolved = false
const waitPromise = manager.acquire("model-c").then(() => { resolved = true })
await Promise.resolve()
// then - should be blocked by global limit even though per-model has capacity
expect(resolved).toBe(false)
expect(manager.getGlobalCount()).toBe(2)
// cleanup
manager.release("model-a")
await waitPromise
expect(resolved).toBe(true)
})
test("should allow tasks when global limit not reached", async () => {
// given
const config: BackgroundTaskConfig = {
maxBackgroundAgents: 3,
defaultConcurrency: 5,
}
const manager = new ConcurrencyManager(config)
// when
await manager.acquire("model-a")
await manager.acquire("model-b")
await manager.acquire("model-c")
// then
expect(manager.getGlobalCount()).toBe(3)
expect(manager.getCount("model-a")).toBe(1)
expect(manager.getCount("model-b")).toBe(1)
expect(manager.getCount("model-c")).toBe(1)
})
test("should respect both per-model and global limits", async () => {
// given - per-model limit of 1, global limit of 3
const config: BackgroundTaskConfig = {
maxBackgroundAgents: 3,
defaultConcurrency: 1,
}
const manager = new ConcurrencyManager(config)
await manager.acquire("model-a")
// when - try second acquire on same model
let resolved = false
const waitPromise = manager.acquire("model-a").then(() => { resolved = true })
await Promise.resolve()
// then - blocked by per-model limit, not global
expect(resolved).toBe(false)
expect(manager.getGlobalCount()).toBe(1)
// cleanup
manager.release("model-a")
await waitPromise
})
test("should release global slot and unblock waiting tasks", async () => {
// given
const config: BackgroundTaskConfig = {
maxBackgroundAgents: 1,
defaultConcurrency: 5,
}
const manager = new ConcurrencyManager(config)
await manager.acquire("model-a")
// when
let resolved = false
const waitPromise = manager.acquire("model-b").then(() => { resolved = true })
await Promise.resolve()
expect(resolved).toBe(false)
manager.release("model-a")
await waitPromise
// then
expect(resolved).toBe(true)
expect(manager.getGlobalCount()).toBe(1)
expect(manager.getCount("model-a")).toBe(0)
expect(manager.getCount("model-b")).toBe(1)
})
test("should not enforce global limit when not configured", async () => {
// given - no maxBackgroundAgents set
const config: BackgroundTaskConfig = { defaultConcurrency: 5 }
const manager = new ConcurrencyManager(config)
// when - acquire many across different models
await manager.acquire("model-a")
await manager.acquire("model-b")
await manager.acquire("model-c")
await manager.acquire("model-d")
await manager.acquire("model-e")
await manager.acquire("model-f")
// then - all should succeed (no global limit)
expect(manager.getCount("model-a")).toBe(1)
expect(manager.getCount("model-f")).toBe(1)
})
test("should reset global count on clear", async () => {
// given
const config: BackgroundTaskConfig = { maxBackgroundAgents: 5 }
const manager = new ConcurrencyManager(config)
await manager.acquire("model-a")
await manager.acquire("model-b")
// when
manager.clear()
// then
expect(manager.getGlobalCount()).toBe(0)
})
})
```
---
## Config Usage Example
User's `.opencode/oh-my-opencode.jsonc`:
```jsonc
{
"background_task": {
// Global limit: max 5 background agents total
"maxBackgroundAgents": 5,
// Per-model limits still apply independently
"defaultConcurrency": 3,
"providerConcurrency": {
"anthropic": 2
}
}
}
```
With this config:
- Max 5 background agents running simultaneously across all models
- Max 3 per model (default), max 2 for any Anthropic model
- If 2 Anthropic + 3 OpenAI agents are running (5 total), no more can start regardless of per-model capacity

View File

@@ -0,0 +1,99 @@
# Execution Plan: Add `max_background_agents` Config Option
## Overview
Add a `max_background_agents` config option to oh-my-opencode that limits total simultaneous background agents across all models/providers. Currently, concurrency is only limited per-model/provider key (default 5 per key). This new option adds a **global ceiling** on total running background agents.
## Step-by-Step Plan
### Step 1: Create feature branch
```bash
git checkout -b feat/max-background-agents dev
```
### Step 2: Add `max_background_agents` to BackgroundTaskConfigSchema
**File:** `src/config/schema/background-task.ts`
- Add `maxBackgroundAgents` field to the Zod schema with `z.number().int().min(1).optional()`
- This follows the existing pattern of `maxDepth` and `maxDescendants` (integer, min 1, optional)
- The field name uses camelCase to match existing schema fields (`defaultConcurrency`, `maxDepth`, `maxDescendants`)
- No `.default()` needed since the hardcoded fallback of 5 lives in `ConcurrencyManager`
### Step 3: Modify `ConcurrencyManager` to enforce global limit
**File:** `src/features/background-agent/concurrency.ts`
- Add a `globalCount` field tracking total active agents across all keys
- Modify `acquire()` to check global count against `maxBackgroundAgents` before granting a slot
- Modify `release()` to decrement global count
- Modify `clear()` to reset global count
- Add `getGlobalCount()` for testing/debugging (follows existing `getCount()`/`getQueueLength()` pattern)
The global limit check happens **in addition to** the per-model limit. Both must have capacity for a task to proceed.
### Step 4: Add tests for the new config schema field
**File:** `src/config/schema/background-task.test.ts`
- Add test cases following the existing given/when/then pattern with nested describes
- Test valid value, below-minimum value, undefined (not provided), non-number type
### Step 5: Add tests for ConcurrencyManager global limit
**File:** `src/features/background-agent/concurrency.test.ts`
- Test that global limit is enforced across different model keys
- Test that tasks queue when global limit reached even if per-model limit has capacity
- Test that releasing a slot from one model allows a queued task from another model to proceed
- Test default behavior (5) when no config provided
- Test interaction between global and per-model limits
### Step 6: Run typecheck and tests
```bash
bun run typecheck
bun test src/config/schema/background-task.test.ts
bun test src/features/background-agent/concurrency.test.ts
```
### Step 7: Verify LSP diagnostics clean
Check `src/config/schema/background-task.ts` and `src/features/background-agent/concurrency.ts` for errors.
### Step 8: Create PR
- Push branch to remote
- Create PR with structured description via `gh pr create`
## Files Modified (4 files)
| File | Change |
|------|--------|
| `src/config/schema/background-task.ts` | Add `maxBackgroundAgents` field |
| `src/features/background-agent/concurrency.ts` | Add global count tracking + enforcement |
| `src/config/schema/background-task.test.ts` | Add schema validation tests |
| `src/features/background-agent/concurrency.test.ts` | Add global limit enforcement tests |
## Files NOT Modified (intentional)
| File | Reason |
|------|--------|
| `src/config/schema/oh-my-opencode-config.ts` | No change needed - `BackgroundTaskConfigSchema` is already composed into root schema via `background_task` field |
| `src/create-managers.ts` | No change needed - `pluginConfig.background_task` already passed to `BackgroundManager` constructor |
| `src/features/background-agent/manager.ts` | No change needed - already passes config to `ConcurrencyManager` |
| `src/plugin-config.ts` | No change needed - `background_task` is a simple object field, uses default override merge |
| `src/config/schema.ts` | No change needed - barrel already exports `BackgroundTaskConfigSchema` |
## Design Decisions
1. **Field name `maxBackgroundAgents`** - camelCase to match existing schema fields (`maxDepth`, `maxDescendants`, `defaultConcurrency`). The user-facing JSONC config key is also camelCase per existing convention in `background_task` section.
2. **Global limit vs per-model limit** - The global limit is a ceiling across ALL concurrency keys. Per-model limits still apply independently. A task needs both a per-model slot AND a global slot to proceed.
3. **Default of 5** - Matches the existing hardcoded default in `getConcurrencyLimit()`. When `maxBackgroundAgents` is not set, no global limit is enforced (only per-model limits apply), preserving backward compatibility.
4. **Queue behavior** - When global limit is reached, tasks wait in the same FIFO queue mechanism. The global check happens inside `acquire()` before the per-model check.
5. **0 means Infinity** - Following the existing pattern where `defaultConcurrency: 0` means unlimited, `maxBackgroundAgents: 0` would also mean no global limit.

View File

@@ -0,0 +1,50 @@
# PR Description
**Title:** feat: add `maxBackgroundAgents` config to limit total simultaneous background agents
**Body:**
## Summary
- Add `maxBackgroundAgents` field to `BackgroundTaskConfigSchema` that enforces a global ceiling on total running background agents across all models/providers
- Modify `ConcurrencyManager` to track global count and enforce the limit alongside existing per-model limits
- Add schema validation tests and concurrency enforcement tests
## Motivation
Currently, concurrency is only limited per model/provider key (default 5 per key). On resource-constrained machines or when using many different models, the total number of background agents can grow unbounded (5 per model x N models). This config option lets users set a hard ceiling.
## Changes
### Schema (`src/config/schema/background-task.ts`)
- Added `maxBackgroundAgents: z.number().int().min(1).optional()` to `BackgroundTaskConfigSchema`
- Grouped with existing limit fields (`maxDepth`, `maxDescendants`)
### ConcurrencyManager (`src/features/background-agent/concurrency.ts`)
- Added `globalCount` tracking total active agents across all concurrency keys
- Added `getGlobalLimit()` reading `maxBackgroundAgents` from config (defaults to `Infinity` = no global limit)
- Modified `acquire()` to check both per-model AND global capacity
- Modified `release()` to decrement global count and drain cross-model waiters blocked by global limit
- Modified `clear()` to reset global state
- Added `getGlobalCount()` / `getGlobalQueueLength()` for testing
### Tests
- `src/config/schema/background-task.test.ts`: 6 test cases for schema validation (valid, min boundary, below min, negative, non-integer, undefined)
- `src/features/background-agent/concurrency.test.ts`: 8 test cases for global limit enforcement (cross-model blocking, release unblocking, per-model vs global interaction, no-config default, clear reset)
## Config Example
```jsonc
{
"background_task": {
"maxBackgroundAgents": 5,
"defaultConcurrency": 3
}
}
```
## Backward Compatibility
- When `maxBackgroundAgents` is not set (default), no global limit is enforced - behavior is identical to before
- Existing `defaultConcurrency`, `providerConcurrency`, and `modelConcurrency` continue to work unchanged
- No config migration needed

View File

@@ -0,0 +1,111 @@
# Verification Strategy
## 1. Static Analysis
### TypeScript Typecheck
```bash
bun run typecheck
```
- Verify no type errors introduced
- `BackgroundTaskConfig` type is inferred from Zod schema, so adding the field automatically updates the type
- All existing consumers of `BackgroundTaskConfig` remain compatible (new field is optional)
### LSP Diagnostics
Check changed files for errors:
- `src/config/schema/background-task.ts`
- `src/features/background-agent/concurrency.ts`
- `src/config/schema/background-task.test.ts`
- `src/features/background-agent/concurrency.test.ts`
## 2. Unit Tests
### Schema Validation Tests
```bash
bun test src/config/schema/background-task.test.ts
```
| Test Case | Input | Expected |
|-----------|-------|----------|
| Valid value (10) | `{ maxBackgroundAgents: 10 }` | Parses to `10` |
| Minimum boundary (1) | `{ maxBackgroundAgents: 1 }` | Parses to `1` |
| Below minimum (0) | `{ maxBackgroundAgents: 0 }` | Throws `ZodError` |
| Negative (-1) | `{ maxBackgroundAgents: -1 }` | Throws `ZodError` |
| Non-integer (2.5) | `{ maxBackgroundAgents: 2.5 }` | Throws `ZodError` |
| Not provided | `{}` | Field is `undefined` |
### ConcurrencyManager Tests
```bash
bun test src/features/background-agent/concurrency.test.ts
```
| Test Case | Setup | Expected |
|-----------|-------|----------|
| No config = no global limit | No `maxBackgroundAgents` | `getGlobalLimit()` returns `Infinity` |
| Config respected | `maxBackgroundAgents: 3` | `getGlobalLimit()` returns `3` |
| Cross-model blocking | Global limit 2, acquire model-a + model-b, try model-c | model-c blocks |
| Under-limit allows | Global limit 3, acquire 3 different models | All succeed |
| Per-model + global interaction | Per-model 1, global 3, acquire model-a twice | Blocked by per-model, not global |
| Release unblocks | Global limit 1, acquire model-a, queue model-b, release model-a | model-b proceeds |
| No global limit = no enforcement | No config, acquire 6 different models | All succeed |
| Clear resets global count | Acquire 2, clear | `getGlobalCount()` is 0 |
### Existing Test Regression
```bash
bun test src/features/background-agent/concurrency.test.ts
bun test src/config/schema/background-task.test.ts
bun test src/config/schema.test.ts
```
All existing tests must continue to pass unchanged.
## 3. Integration Verification
### Config Loading Path
Verify the config flows correctly through the system:
1. **Schema → Type**: `BackgroundTaskConfig` type auto-includes `maxBackgroundAgents` via `z.infer`
2. **Config file → Schema**: `loadConfigFromPath()` in `plugin-config.ts` uses `OhMyOpenCodeConfigSchema.safeParse()` which includes `BackgroundTaskConfigSchema`
3. **Config → Manager**: `create-managers.ts` passes `pluginConfig.background_task` to `BackgroundManager` constructor
4. **Manager → ConcurrencyManager**: `BackgroundManager` constructor passes config to `new ConcurrencyManager(config)`
5. **ConcurrencyManager → Enforcement**: `acquire()` reads `config.maxBackgroundAgents` via `getGlobalLimit()`
No changes needed in steps 2-4 since the field is optional and the existing plumbing passes the entire `BackgroundTaskConfig` object.
### Manual Config Test
Create a test config to verify parsing:
```bash
echo '{ "background_task": { "maxBackgroundAgents": 3 } }' | bun -e "
const { BackgroundTaskConfigSchema } = require('./src/config/schema/background-task');
const result = BackgroundTaskConfigSchema.safeParse(JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf-8')).background_task);
console.log(result.success, result.data);
"
```
## 4. Build Verification
```bash
bun run build
```
- Verify build succeeds
- Schema JSON output includes the new field (if applicable)
## 5. Edge Cases to Verify
| Edge Case | Expected Behavior |
|-----------|-------------------|
| `maxBackgroundAgents` not set | No global limit enforced (backward compatible) |
| `maxBackgroundAgents: 1` | Only 1 background agent at a time across all models |
| `maxBackgroundAgents` > sum of all per-model limits | Global limit never triggers (per-model limits are tighter) |
| Per-model limit tighter than global | Per-model limit blocks first |
| Global limit tighter than per-model | Global limit blocks first |
| Release from one model unblocks different model | Global slot freed, different model's waiter proceeds |
| Manager shutdown with global waiters | `clear()` rejects all waiters and resets global count |
| Concurrent acquire/release | No race conditions (single-threaded JS event loop) |
## 6. CI Pipeline
The existing CI workflow (`ci.yml`) will run:
- `bun run typecheck` - type checking
- `bun test` - all tests including new ones
- `bun run build` - build verification
No CI changes needed.

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 365000, "total_duration_seconds": 365}

View File

@@ -0,0 +1,37 @@
{
"eval_id": 2,
"eval_name": "bugfix-atlas-null-check",
"prompt": "The atlas hook has a bug where it crashes when boulder.json is missing the worktree_path field. Fix it and land the fix as a PR. Make sure CI passes.",
"assertions": [
{
"id": "worktree-isolation",
"text": "Plan uses git worktree in a sibling directory",
"type": "manual"
},
{
"id": "minimal-fix",
"text": "Fix is minimal — adds null check, doesn't refactor unrelated code",
"type": "manual"
},
{
"id": "test-added",
"text": "Test case added for the missing worktree_path scenario",
"type": "manual"
},
{
"id": "three-gates",
"text": "Verification loop includes all 3 gates: CI, review-work, Cubic",
"type": "manual"
},
{
"id": "real-atlas-files",
"text": "References actual atlas hook files in src/hooks/atlas/",
"type": "manual"
},
{
"id": "fix-branch-naming",
"text": "Branch name follows fix/ prefix convention",
"type": "manual"
}
]
}

View File

@@ -0,0 +1,11 @@
{
"run_id": "eval-2-with_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": true, "evidence": "../omo-wt/fix-atlas-worktree-path-crash"},
{"text": "Fix is minimal — adds null check, doesn't refactor unrelated code", "passed": true, "evidence": "3 targeted changes: readBoulderState sanitization, idle-event guard, tests"},
{"text": "Test case added for the missing worktree_path scenario", "passed": true, "evidence": "Tests for missing and null worktree_path"},
{"text": "Verification loop includes all 3 gates", "passed": true, "evidence": "Gate A (CI), Gate B (review-work), Gate C (Cubic)"},
{"text": "References actual atlas hook files", "passed": true, "evidence": "src/hooks/atlas/idle-event.ts, src/features/boulder-state/storage.ts"},
{"text": "Branch name follows fix/ prefix convention", "passed": true, "evidence": "fix/atlas-worktree-path-crash"}
]
}

View File

@@ -0,0 +1,205 @@
# Code Changes
## File 1: `src/features/boulder-state/storage.ts`
**Change**: Add `worktree_path` sanitization in `readBoulderState()`
```typescript
// BEFORE (lines 29-32):
if (!Array.isArray(parsed.session_ids)) {
parsed.session_ids = []
}
return parsed as BoulderState
// AFTER:
if (!Array.isArray(parsed.session_ids)) {
parsed.session_ids = []
}
if (parsed.worktree_path !== undefined && typeof parsed.worktree_path !== "string") {
parsed.worktree_path = undefined
}
return parsed as BoulderState
```
**Rationale**: `readBoulderState` casts raw `JSON.parse()` output as `BoulderState` without validating individual fields. When boulder.json has `"worktree_path": null` (valid JSON from manual edits, corrupted state, or external tools), the runtime type is `null` but TypeScript type says `string | undefined`. This sanitization ensures downstream code always gets the correct type.
---
## File 2: `src/hooks/atlas/idle-event.ts`
**Change**: Add defensive string type guard before passing `worktree_path` to continuation functions.
```typescript
// BEFORE (lines 83-88 in scheduleRetry):
await injectContinuation({
ctx,
sessionID,
sessionState,
options,
planName: currentBoulder.plan_name,
progress: currentProgress,
agent: currentBoulder.agent,
worktreePath: currentBoulder.worktree_path,
})
// AFTER:
await injectContinuation({
ctx,
sessionID,
sessionState,
options,
planName: currentBoulder.plan_name,
progress: currentProgress,
agent: currentBoulder.agent,
worktreePath: typeof currentBoulder.worktree_path === "string" ? currentBoulder.worktree_path : undefined,
})
```
```typescript
// BEFORE (lines 184-188 in handleAtlasSessionIdle):
await injectContinuation({
ctx,
sessionID,
sessionState,
options,
planName: boulderState.plan_name,
progress,
agent: boulderState.agent,
worktreePath: boulderState.worktree_path,
})
// AFTER:
await injectContinuation({
ctx,
sessionID,
sessionState,
options,
planName: boulderState.plan_name,
progress,
agent: boulderState.agent,
worktreePath: typeof boulderState.worktree_path === "string" ? boulderState.worktree_path : undefined,
})
```
**Rationale**: Belt-and-suspenders defense. Even though `readBoulderState` now sanitizes, direct `writeBoulderState` calls elsewhere could still produce invalid state. The `typeof` check is zero-cost and prevents any possibility of `null` or non-string values leaking through.
---
## File 3: `src/hooks/atlas/index.test.ts`
**Change**: Add test cases for missing `worktree_path` scenarios within the existing `session.idle handler` describe block.
```typescript
test("should inject continuation when boulder.json has no worktree_path field", async () => {
// given - boulder state WITHOUT worktree_path
const planPath = join(TEST_DIR, "test-plan.md")
writeFileSync(planPath, "# Plan\n- [ ] Task 1\n- [x] Task 2")
const state: BoulderState = {
active_plan: planPath,
started_at: "2026-01-02T10:00:00Z",
session_ids: [MAIN_SESSION_ID],
plan_name: "test-plan",
}
writeBoulderState(TEST_DIR, state)
const readState = readBoulderState(TEST_DIR)
expect(readState?.worktree_path).toBeUndefined()
const mockInput = createMockPluginInput()
const hook = createAtlasHook(mockInput)
// when
await hook.handler({
event: {
type: "session.idle",
properties: { sessionID: MAIN_SESSION_ID },
},
})
// then - continuation injected, no worktree context in prompt
expect(mockInput._promptMock).toHaveBeenCalled()
const callArgs = mockInput._promptMock.mock.calls[0][0]
expect(callArgs.body.parts[0].text).not.toContain("[Worktree:")
expect(callArgs.body.parts[0].text).toContain("1 remaining")
})
test("should handle boulder.json with worktree_path: null without crashing", async () => {
// given - manually write boulder.json with worktree_path: null (corrupted state)
const planPath = join(TEST_DIR, "test-plan.md")
writeFileSync(planPath, "# Plan\n- [ ] Task 1\n- [x] Task 2")
const boulderPath = join(SISYPHUS_DIR, "boulder.json")
writeFileSync(boulderPath, JSON.stringify({
active_plan: planPath,
started_at: "2026-01-02T10:00:00Z",
session_ids: [MAIN_SESSION_ID],
plan_name: "test-plan",
worktree_path: null,
}, null, 2))
const mockInput = createMockPluginInput()
const hook = createAtlasHook(mockInput)
// when
await hook.handler({
event: {
type: "session.idle",
properties: { sessionID: MAIN_SESSION_ID },
},
})
// then - should inject continuation without crash, no "[Worktree: null]"
expect(mockInput._promptMock).toHaveBeenCalled()
const callArgs = mockInput._promptMock.mock.calls[0][0]
expect(callArgs.body.parts[0].text).not.toContain("[Worktree: null]")
expect(callArgs.body.parts[0].text).not.toContain("[Worktree: undefined]")
})
```
---
## File 4: `src/features/boulder-state/storage.test.ts` (addition to existing)
**Change**: Add `readBoulderState` sanitization test.
```typescript
describe("#given boulder.json with worktree_path: null", () => {
test("#then readBoulderState should sanitize null to undefined", () => {
// given
const boulderPath = join(TEST_DIR, ".sisyphus", "boulder.json")
writeFileSync(boulderPath, JSON.stringify({
active_plan: "/path/to/plan.md",
started_at: "2026-01-02T10:00:00Z",
session_ids: ["session-1"],
plan_name: "test-plan",
worktree_path: null,
}, null, 2))
// when
const state = readBoulderState(TEST_DIR)
// then
expect(state).not.toBeNull()
expect(state!.worktree_path).toBeUndefined()
})
test("#then readBoulderState should preserve valid worktree_path string", () => {
// given
const boulderPath = join(TEST_DIR, ".sisyphus", "boulder.json")
writeFileSync(boulderPath, JSON.stringify({
active_plan: "/path/to/plan.md",
started_at: "2026-01-02T10:00:00Z",
session_ids: ["session-1"],
plan_name: "test-plan",
worktree_path: "/valid/worktree/path",
}, null, 2))
// when
const state = readBoulderState(TEST_DIR)
// then
expect(state?.worktree_path).toBe("/valid/worktree/path")
})
})
```

View File

@@ -0,0 +1,78 @@
# Execution Plan — Fix atlas hook crash on missing worktree_path
## Phase 0: Setup
1. **Create worktree from origin/dev**:
```bash
git fetch origin dev
git worktree add ../omo-wt/fix-atlas-worktree-path-crash origin/dev
```
2. **Create feature branch**:
```bash
cd ../omo-wt/fix-atlas-worktree-path-crash
git checkout -b fix/atlas-worktree-path-crash
```
## Phase 1: Implement
### Step 1: Fix `readBoulderState()` in `src/features/boulder-state/storage.ts`
- Add `worktree_path` sanitization after JSON parse
- Ensure `worktree_path` is `string | undefined`, never `null` or other types
- This is the root cause: raw `JSON.parse` + `as BoulderState` cast allows type violations at runtime
### Step 2: Add defensive guard in `src/hooks/atlas/idle-event.ts`
- Before passing `boulderState.worktree_path` to `injectContinuation`, validate it's a string
- Apply same guard in the `scheduleRetry` callback (line 86)
- Ensures even if `readBoulderState` is bypassed, the idle handler won't crash
### Step 3: Add test coverage in `src/hooks/atlas/index.test.ts`
- Add test: boulder.json without `worktree_path` field → session.idle works
- Add test: boulder.json with `worktree_path: null` → session.idle works (no `[Worktree: null]` in prompt)
- Add test: `readBoulderState` sanitizes `null` worktree_path to `undefined`
- Follow existing given/when/then test pattern
### Step 4: Local validation
```bash
bun run typecheck
bun test src/hooks/atlas/
bun test src/features/boulder-state/
bun run build
```
### Step 5: Atomic commit
```bash
git add src/features/boulder-state/storage.ts src/hooks/atlas/idle-event.ts src/hooks/atlas/index.test.ts
git commit -m "fix(atlas): prevent crash when boulder.json missing worktree_path field
readBoulderState() performs unsafe cast of parsed JSON as BoulderState.
When worktree_path is absent or null in boulder.json, downstream code
in idle-event.ts could receive null where string|undefined is expected.
- Sanitize worktree_path in readBoulderState (reject non-string values)
- Add defensive typeof check in idle-event before passing to continuation
- Add test coverage for missing and null worktree_path scenarios"
```
## Phase 2: PR Creation
```bash
git push -u origin fix/atlas-worktree-path-crash
gh pr create \
--base dev \
--title "fix(atlas): prevent crash when boulder.json missing worktree_path" \
--body-file /tmp/pull-request-atlas-worktree-fix.md
```
## Phase 3: Verify Loop
- **Gate A (CI)**: `gh pr checks --watch` — wait for all checks green
- **Gate B (review-work)**: Run 5-agent review (Oracle goal, Oracle quality, Oracle security, QA execution, context mining)
- **Gate C (Cubic)**: Wait for cubic-dev-ai[bot] to respond "No issues found"
- On any failure: fix-commit-push, re-enter verify loop
## Phase 4: Merge
```bash
gh pr merge --squash --delete-branch
git worktree remove ../omo-wt/fix-atlas-worktree-path-crash
```

View File

@@ -0,0 +1,42 @@
# PR Title
```
fix(atlas): prevent crash when boulder.json missing worktree_path
```
# PR Body
## Summary
- Fix runtime type violation in atlas hook when `boulder.json` lacks `worktree_path` field
- Add `worktree_path` sanitization in `readBoulderState()` to reject non-string values (e.g., `null` from manual edits)
- Add defensive `typeof` guards in `idle-event.ts` before passing worktree path to continuation injection
- Add test coverage for missing and null `worktree_path` scenarios
## Problem
`readBoulderState()` in `src/features/boulder-state/storage.ts` casts raw `JSON.parse()` output directly as `BoulderState` via `return parsed as BoulderState`. This bypasses TypeScript's type system entirely at runtime.
When `boulder.json` is missing the `worktree_path` field (common for boulders created before worktree support was added, or created without `--worktree` flag), `boulderState.worktree_path` is `undefined` which is handled correctly. However, when boulder.json has `"worktree_path": null` (possible from manual edits, external tooling, or corrupted state), the runtime type becomes `null` which violates the TypeScript type `string | undefined`.
This `null` value propagates through:
1. `idle-event.ts:handleAtlasSessionIdle()``injectContinuation()``injectBoulderContinuation()`
2. `idle-event.ts:scheduleRetry()` callback → same chain
While the `boulder-continuation-injector.ts` handles falsy values via `worktreePath ? ... : ""`, the type mismatch can cause subtle downstream issues and violates the contract of the `BoulderState` interface.
## Changes
| File | Change |
|------|--------|
| `src/features/boulder-state/storage.ts` | Sanitize `worktree_path` in `readBoulderState()` — reject non-string values |
| `src/hooks/atlas/idle-event.ts` | Add `typeof` guards before passing worktree_path to continuation (2 call sites) |
| `src/hooks/atlas/index.test.ts` | Add 2 tests: missing worktree_path + null worktree_path in session.idle |
| `src/features/boulder-state/storage.test.ts` | Add 2 tests: sanitization of null + preservation of valid string |
## Testing
- `bun test src/hooks/atlas/` — all existing + new tests pass
- `bun test src/features/boulder-state/` — all existing + new tests pass
- `bun run typecheck` — clean
- `bun run build` — clean

View File

@@ -0,0 +1,87 @@
# Verification Strategy
## Gate A: CI (`gh pr checks --watch`)
### What CI runs (from `ci.yml`)
1. **Tests (split)**: Mock-heavy tests in isolation + batch tests
2. **Typecheck**: `bun run typecheck` (tsc --noEmit)
3. **Build**: `bun run build` (ESM + declarations + schema)
### Pre-push local validation
Before pushing, run the exact CI steps locally to catch failures early:
```bash
# Targeted test runs first (fast feedback)
bun test src/features/boulder-state/storage.test.ts
bun test src/hooks/atlas/index.test.ts
# Full test suite
bun test
# Type check
bun run typecheck
# Build
bun run build
```
### Failure handling
- **Test failure**: Read test output, fix code, create new commit (never amend pushed commits), push
- **Typecheck failure**: Run `lsp_diagnostics` on changed files, fix type errors, commit, push
- **Build failure**: Check build output for missing exports or circular deps, fix, commit, push
After each fix-commit-push: `gh pr checks --watch` to re-enter gate
## Gate B: review-work (5-agent review)
### The 5 parallel agents
1. **Oracle (goal/constraint verification)**: Checks the fix matches the stated problem — `worktree_path` crash resolved, no scope creep
2. **Oracle (code quality)**: Validates code follows existing patterns — factory pattern, given/when/then tests, < 200 LOC, no catch-all files
3. **Oracle (security)**: Ensures no new security issues — JSON parse injection, path traversal in worktree_path
4. **QA agent (hands-on execution)**: Actually runs the tests, checks `lsp_diagnostics` on changed files, verifies the fix in action
5. **Context mining agent**: Checks GitHub issues, git history, related PRs for context alignment
### Expected focus areas for this PR
- Oracle (goal): Does the sanitization in `readBoulderState` actually prevent the crash? Is the `typeof` guard necessary or redundant?
- Oracle (quality): Are the new tests following the given/when/then pattern? Do they use the same mock setup as existing tests?
- Oracle (security): Is the `worktree_path` value ever used in path operations without sanitization? (Answer: no, it's only used in template strings)
- QA: Run `bun test src/hooks/atlas/index.test.ts` — does the null worktree_path test actually trigger the bug before fix?
### Failure handling
- Each oracle produces a PASS/FAIL verdict with specific issues
- On FAIL: read the specific issue, fix in the worktree, commit, push, re-run review-work
- All 5 agents must PASS
## Gate C: Cubic (`cubic-dev-ai[bot]`)
### What Cubic checks
- Automated code review bot that analyzes the PR diff
- Looks for: type safety issues, missing error handling, test coverage gaps, anti-patterns
### Expected result
- "No issues found" for this small, focused fix
- 3 files changed (storage.ts, idle-event.ts, index.test.ts) + 1 test file
### Failure handling
- If Cubic flags an issue: evaluate if it's a real concern or false positive
- Real concern: fix, commit, push
- False positive: comment explaining why the flagged pattern is intentional
- Wait for Cubic to re-review after push
## Post-verification: Merge
Once all 3 gates pass:
```bash
gh pr merge --squash --delete-branch
git worktree remove ../omo-wt/fix-atlas-worktree-path-crash
```
On merge failure (conflicts):
```bash
cd ../omo-wt/fix-atlas-worktree-path-crash
git fetch origin dev
git rebase origin/dev
# Resolve conflicts if any
git push --force-with-lease
# Re-enter verify loop from Gate A
```

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 506000, "total_duration_seconds": 506}

View File

@@ -0,0 +1,11 @@
{
"run_id": "eval-2-without_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": false, "evidence": "No worktree. Steps go directly to creating branch and modifying files."},
{"text": "Fix is minimal — adds null check, doesn't refactor unrelated code", "passed": true, "evidence": "Focused fix though also adds try/catch in setTimeout (reasonable secondary fix)"},
{"text": "Test case added for the missing worktree_path scenario", "passed": true, "evidence": "Detailed test plan for missing/null/malformed boulder.json"},
{"text": "Verification loop includes all 3 gates", "passed": false, "evidence": "Only mentions CI pipeline (step 5). No review-work or Cubic."},
{"text": "References actual atlas hook files", "passed": true, "evidence": "References idle-event.ts, storage.ts with line numbers"},
{"text": "Branch name follows fix/ prefix convention", "passed": true, "evidence": "fix/atlas-hook-missing-worktree-path"}
]
}

View File

@@ -0,0 +1,334 @@
# Code Changes: Fix Atlas Hook Crash on Missing worktree_path
## Change 1: Harden `readBoulderState()` validation
**File:** `src/features/boulder-state/storage.ts`
### Before (lines 16-36):
```typescript
export function readBoulderState(directory: string): BoulderState | null {
const filePath = getBoulderFilePath(directory)
if (!existsSync(filePath)) {
return null
}
try {
const content = readFileSync(filePath, "utf-8")
const parsed = JSON.parse(content)
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
return null
}
if (!Array.isArray(parsed.session_ids)) {
parsed.session_ids = []
}
return parsed as BoulderState
} catch {
return null
}
}
```
### After:
```typescript
export function readBoulderState(directory: string): BoulderState | null {
const filePath = getBoulderFilePath(directory)
if (!existsSync(filePath)) {
return null
}
try {
const content = readFileSync(filePath, "utf-8")
const parsed = JSON.parse(content)
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
return null
}
if (typeof parsed.active_plan !== "string" || typeof parsed.plan_name !== "string") {
return null
}
if (!Array.isArray(parsed.session_ids)) {
parsed.session_ids = []
}
if (parsed.worktree_path !== undefined && typeof parsed.worktree_path !== "string") {
delete parsed.worktree_path
}
return parsed as BoulderState
} catch {
return null
}
}
```
**Rationale:** Validates that required fields (`active_plan`, `plan_name`) are strings. Strips `worktree_path` if it's present but not a string (e.g., `null`, number). This prevents downstream crashes from `existsSync(undefined)` and ensures type safety at the boundary.
---
## Change 2: Add try/catch in setTimeout retry callback
**File:** `src/hooks/atlas/idle-event.ts`
### Before (lines 62-88):
```typescript
sessionState.pendingRetryTimer = setTimeout(async () => {
sessionState.pendingRetryTimer = undefined
if (sessionState.promptFailureCount >= 2) return
if (sessionState.waitingForFinalWaveApproval) return
const currentBoulder = readBoulderState(ctx.directory)
if (!currentBoulder) return
if (!currentBoulder.session_ids?.includes(sessionID)) return
const currentProgress = getPlanProgress(currentBoulder.active_plan)
if (currentProgress.isComplete) return
if (options?.isContinuationStopped?.(sessionID)) return
if (options?.shouldSkipContinuation?.(sessionID)) return
if (hasRunningBackgroundTasks(sessionID, options)) return
await injectContinuation({
ctx,
sessionID,
sessionState,
options,
planName: currentBoulder.plan_name,
progress: currentProgress,
agent: currentBoulder.agent,
worktreePath: currentBoulder.worktree_path,
})
}, RETRY_DELAY_MS)
```
### After:
```typescript
sessionState.pendingRetryTimer = setTimeout(async () => {
sessionState.pendingRetryTimer = undefined
try {
if (sessionState.promptFailureCount >= 2) return
if (sessionState.waitingForFinalWaveApproval) return
const currentBoulder = readBoulderState(ctx.directory)
if (!currentBoulder) return
if (!currentBoulder.session_ids?.includes(sessionID)) return
const currentProgress = getPlanProgress(currentBoulder.active_plan)
if (currentProgress.isComplete) return
if (options?.isContinuationStopped?.(sessionID)) return
if (options?.shouldSkipContinuation?.(sessionID)) return
if (hasRunningBackgroundTasks(sessionID, options)) return
await injectContinuation({
ctx,
sessionID,
sessionState,
options,
planName: currentBoulder.plan_name,
progress: currentProgress,
agent: currentBoulder.agent,
worktreePath: currentBoulder.worktree_path,
})
} catch (error) {
log(`[${HOOK_NAME}] Retry continuation failed`, { sessionID, error: String(error) })
}
}, RETRY_DELAY_MS)
```
**Rationale:** The async callback in setTimeout creates a floating promise. Without try/catch, any error becomes an unhandled rejection that can crash the process. This is the critical safety net even after the `readBoulderState` fix.
---
## Change 3: Defensive guard in `getPlanProgress`
**File:** `src/features/boulder-state/storage.ts`
### Before (lines 115-118):
```typescript
export function getPlanProgress(planPath: string): PlanProgress {
if (!existsSync(planPath)) {
return { total: 0, completed: 0, isComplete: true }
}
```
### After:
```typescript
export function getPlanProgress(planPath: string): PlanProgress {
if (typeof planPath !== "string" || !existsSync(planPath)) {
return { total: 0, completed: 0, isComplete: true }
}
```
**Rationale:** Defense-in-depth. Even though `readBoulderState` now validates `active_plan`, the `getPlanProgress` function is a public API that could be called from other paths with invalid input. A `typeof` check before `existsSync` prevents the TypeError from `existsSync(undefined)`.
---
## Change 4: New tests
### File: `src/features/boulder-state/storage.test.ts` (additions)
```typescript
test("should return null when active_plan is missing", () => {
// given - boulder.json without active_plan
const boulderFile = join(SISYPHUS_DIR, "boulder.json")
writeFileSync(boulderFile, JSON.stringify({
started_at: "2026-01-01T00:00:00Z",
session_ids: ["ses-1"],
plan_name: "plan",
}))
// when
const result = readBoulderState(TEST_DIR)
// then
expect(result).toBeNull()
})
test("should return null when plan_name is missing", () => {
// given - boulder.json without plan_name
const boulderFile = join(SISYPHUS_DIR, "boulder.json")
writeFileSync(boulderFile, JSON.stringify({
active_plan: "/path/to/plan.md",
started_at: "2026-01-01T00:00:00Z",
session_ids: ["ses-1"],
}))
// when
const result = readBoulderState(TEST_DIR)
// then
expect(result).toBeNull()
})
test("should strip non-string worktree_path from boulder state", () => {
// given - boulder.json with worktree_path set to null
const boulderFile = join(SISYPHUS_DIR, "boulder.json")
writeFileSync(boulderFile, JSON.stringify({
active_plan: "/path/to/plan.md",
started_at: "2026-01-01T00:00:00Z",
session_ids: ["ses-1"],
plan_name: "plan",
worktree_path: null,
}))
// when
const result = readBoulderState(TEST_DIR)
// then
expect(result).not.toBeNull()
expect(result!.worktree_path).toBeUndefined()
})
test("should preserve valid worktree_path string", () => {
// given - boulder.json with valid worktree_path
const boulderFile = join(SISYPHUS_DIR, "boulder.json")
writeFileSync(boulderFile, JSON.stringify({
active_plan: "/path/to/plan.md",
started_at: "2026-01-01T00:00:00Z",
session_ids: ["ses-1"],
plan_name: "plan",
worktree_path: "/valid/worktree/path",
}))
// when
const result = readBoulderState(TEST_DIR)
// then
expect(result).not.toBeNull()
expect(result!.worktree_path).toBe("/valid/worktree/path")
})
```
### File: `src/features/boulder-state/storage.test.ts` (getPlanProgress additions)
```typescript
test("should handle undefined planPath without crashing", () => {
// given - undefined as planPath (from malformed boulder state)
// when
const progress = getPlanProgress(undefined as unknown as string)
// then
expect(progress.total).toBe(0)
expect(progress.isComplete).toBe(true)
})
```
### File: `src/hooks/atlas/index.test.ts` (additions to session.idle section)
```typescript
test("should handle boulder state without worktree_path gracefully", async () => {
// given - boulder state with incomplete plan, no worktree_path
const planPath = join(TEST_DIR, "test-plan.md")
writeFileSync(planPath, "# Plan\n- [ ] Task 1\n- [x] Task 2")
const state: BoulderState = {
active_plan: planPath,
started_at: "2026-01-02T10:00:00Z",
session_ids: [MAIN_SESSION_ID],
plan_name: "test-plan",
// worktree_path intentionally omitted
}
writeBoulderState(TEST_DIR, state)
const mockInput = createMockPluginInput()
const hook = createAtlasHook(mockInput)
// when
await hook.handler({
event: {
type: "session.idle",
properties: { sessionID: MAIN_SESSION_ID },
},
})
// then - should call prompt without crashing, continuation should not contain worktree context
expect(mockInput._promptMock).toHaveBeenCalled()
const callArgs = mockInput._promptMock.mock.calls[0][0]
expect(callArgs.body.parts[0].text).toContain("incomplete tasks")
expect(callArgs.body.parts[0].text).not.toContain("[Worktree:")
})
test("should include worktree context when worktree_path is present in boulder state", async () => {
// given - boulder state with worktree_path
const planPath = join(TEST_DIR, "test-plan.md")
writeFileSync(planPath, "# Plan\n- [ ] Task 1")
const state: BoulderState = {
active_plan: planPath,
started_at: "2026-01-02T10:00:00Z",
session_ids: [MAIN_SESSION_ID],
plan_name: "test-plan",
worktree_path: "/some/worktree/path",
}
writeBoulderState(TEST_DIR, state)
const mockInput = createMockPluginInput()
const hook = createAtlasHook(mockInput)
// when
await hook.handler({
event: {
type: "session.idle",
properties: { sessionID: MAIN_SESSION_ID },
},
})
// then - should include worktree context in continuation prompt
expect(mockInput._promptMock).toHaveBeenCalled()
const callArgs = mockInput._promptMock.mock.calls[0][0]
expect(callArgs.body.parts[0].text).toContain("[Worktree: /some/worktree/path]")
})
```
---
## Summary of Changes
| File | Change | Lines Modified |
|------|--------|---------------|
| `src/features/boulder-state/storage.ts` | Validate required fields + sanitize worktree_path + guard getPlanProgress | ~8 lines added |
| `src/hooks/atlas/idle-event.ts` | try/catch around setTimeout async callback | ~4 lines added |
| `src/features/boulder-state/storage.test.ts` | 5 new tests for validation | ~60 lines added |
| `src/hooks/atlas/index.test.ts` | 2 new tests for worktree_path handling | ~50 lines added |
Total: ~4 production lines changed, ~8 defensive lines added, ~110 test lines added.

View File

@@ -0,0 +1,86 @@
# Execution Plan: Fix Atlas Hook Crash on Missing worktree_path
## Bug Analysis
### Root Cause
`readBoulderState()` in `src/features/boulder-state/storage.ts` performs minimal validation when parsing `boulder.json`:
```typescript
const parsed = JSON.parse(content)
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return null
if (!Array.isArray(parsed.session_ids)) parsed.session_ids = []
return parsed as BoulderState // <-- unsafe cast, no field validation
```
It validates `session_ids` but NOT `active_plan`, `plan_name`, or `worktree_path`. This means a malformed `boulder.json` (e.g., `{}` or missing key fields) passes through and downstream code crashes.
### Crash Path
1. `boulder.json` is written without required fields (manual edit, corruption, partial write)
2. `readBoulderState()` returns it as `BoulderState` with `active_plan: undefined`
3. Multiple call sites pass `boulderState.active_plan` to `getPlanProgress(planPath: string)`:
- `src/hooks/atlas/idle-event.ts:72` (inside `setTimeout` callback - unhandled rejection!)
- `src/hooks/atlas/resolve-active-boulder-session.ts:21`
- `src/hooks/atlas/tool-execute-after.ts:74`
4. `getPlanProgress()` calls `existsSync(undefined)` which throws: `TypeError: The "path" argument must be of type string`
### worktree_path-Specific Issues
When `worktree_path` field is missing from `boulder.json`:
- The `idle-event.ts` `scheduleRetry` setTimeout callback (lines 62-88) has NO try/catch. An unhandled promise rejection from the async callback crashes the process.
- `readBoulderState()` returns `worktree_path: undefined` which itself is handled in `boulder-continuation-injector.ts` (line 42 uses truthiness check), but the surrounding code in the setTimeout lacks error protection.
### Secondary Issue: Unhandled Promise in setTimeout
In `idle-event.ts` lines 62-88:
```typescript
sessionState.pendingRetryTimer = setTimeout(async () => {
// ... no try/catch wrapper
const currentBoulder = readBoulderState(ctx.directory)
const currentProgress = getPlanProgress(currentBoulder.active_plan) // CRASH if active_plan undefined
// ...
}, RETRY_DELAY_MS)
```
The async callback creates a floating promise. Any thrown error becomes an unhandled rejection.
---
## Step-by-Step Plan
### Step 1: Harden `readBoulderState()` validation
**File:** `src/features/boulder-state/storage.ts`
- After the `session_ids` fix, add validation for `active_plan` and `plan_name` (required fields)
- Validate `worktree_path` is either `undefined` or a string (not `null`, not a number)
- Return `null` for boulder states with missing required fields
### Step 2: Add try/catch in setTimeout callback
**File:** `src/hooks/atlas/idle-event.ts`
- Wrap the `setTimeout` async callback body in try/catch
- Log errors with the atlas hook logger
### Step 3: Add defensive guard in `getPlanProgress`
**File:** `src/features/boulder-state/storage.ts`
- Add early return for non-string `planPath` argument
### Step 4: Add tests
**Files:**
- `src/features/boulder-state/storage.test.ts` - test missing/malformed fields
- `src/hooks/atlas/index.test.ts` - test atlas hook with boulder missing worktree_path
### Step 5: Run CI checks
```bash
bun run typecheck
bun test src/features/boulder-state/storage.test.ts
bun test src/hooks/atlas/index.test.ts
bun test # full suite
```
### Step 6: Create PR
- Branch: `fix/atlas-hook-missing-worktree-path`
- Target: `dev`
- Run CI and verify passes

View File

@@ -0,0 +1,23 @@
## Summary
- Fix crash in atlas hook when `boulder.json` is missing `worktree_path` (or other required fields) by hardening `readBoulderState()` validation
- Wrap the unprotected `setTimeout` retry callback in `idle-event.ts` with try/catch to prevent unhandled promise rejections
- Add defensive type guard in `getPlanProgress()` to prevent `existsSync(undefined)` TypeError
## Context
When `boulder.json` is malformed or manually edited to omit fields, `readBoulderState()` returns an object cast as `BoulderState` without validating required fields. Downstream callers like `getPlanProgress(boulderState.active_plan)` then pass `undefined` to `existsSync()`, which throws a TypeError. This crash is especially dangerous in the `setTimeout` retry callback in `idle-event.ts`, where the error becomes an unhandled promise rejection.
## Changes
### `src/features/boulder-state/storage.ts`
- `readBoulderState()`: Validate `active_plan` and `plan_name` are strings (return `null` if not)
- `readBoulderState()`: Strip `worktree_path` if present but not a string type
- `getPlanProgress()`: Add `typeof planPath !== "string"` guard before `existsSync`
### `src/hooks/atlas/idle-event.ts`
- Wrap `scheduleRetry` setTimeout async callback body in try/catch
### Tests
- `src/features/boulder-state/storage.test.ts`: 5 new tests for missing/malformed fields
- `src/hooks/atlas/index.test.ts`: 2 new tests for worktree_path presence/absence in continuation prompt

View File

@@ -0,0 +1,119 @@
# Verification Strategy
## 1. Unit Tests (Direct Verification)
### boulder-state storage tests
```bash
bun test src/features/boulder-state/storage.test.ts
```
Verify:
- `readBoulderState()` returns `null` when `active_plan` missing
- `readBoulderState()` returns `null` when `plan_name` missing
- `readBoulderState()` strips non-string `worktree_path` (e.g., `null`)
- `readBoulderState()` preserves valid string `worktree_path`
- `getPlanProgress(undefined)` returns safe default without crashing
- Existing tests still pass (session_ids defaults, empty object, etc.)
### atlas hook tests
```bash
bun test src/hooks/atlas/index.test.ts
```
Verify:
- session.idle handler works with boulder state missing `worktree_path` (no crash, prompt injected)
- session.idle handler includes `[Worktree: ...]` context when `worktree_path` IS present
- All 30+ existing tests still pass
### atlas idle-event lineage tests
```bash
bun test src/hooks/atlas/idle-event-lineage.test.ts
```
Verify existing lineage tests unaffected.
### start-work hook tests
```bash
bun test src/hooks/start-work/index.test.ts
```
Verify worktree-related start-work tests still pass (these create boulder states with/without `worktree_path`).
## 2. Type Safety
```bash
bun run typecheck
```
Verify zero new TypeScript errors. The changes are purely additive runtime guards that align with existing types (`worktree_path?: string`).
## 3. LSP Diagnostics on Changed Files
```
lsp_diagnostics on:
- src/features/boulder-state/storage.ts
- src/hooks/atlas/idle-event.ts
```
Verify zero errors/warnings.
## 4. Full Test Suite
```bash
bun test
```
Verify no regressions across the entire codebase.
## 5. Build
```bash
bun run build
```
Verify build succeeds.
## 6. Manual Smoke Test (Reproduction)
To manually verify the fix:
```bash
# Create a malformed boulder.json (missing worktree_path)
mkdir -p .sisyphus
echo '{"active_plan": ".sisyphus/plans/test.md", "plan_name": "test", "session_ids": ["ses-1"]}' > .sisyphus/boulder.json
# Create a plan file
mkdir -p .sisyphus/plans
echo '# Plan\n- [ ] Task 1' > .sisyphus/plans/test.md
# Start opencode - atlas hook should NOT crash when session.idle fires
# Verify /tmp/oh-my-opencode.log shows normal continuation behavior
```
Also test the extreme case:
```bash
# boulder.json with no required fields
echo '{}' > .sisyphus/boulder.json
# After fix: readBoulderState returns null, atlas hook gracefully skips
```
## 7. CI Pipeline
After pushing the branch, verify:
- `ci.yml` workflow passes: tests (split: mock-heavy isolated + batch), typecheck, build
- No new lint warnings
## 8. Edge Cases Covered
| Scenario | Expected Behavior |
|----------|-------------------|
| `boulder.json` = `{}` | `readBoulderState` returns `null` |
| `boulder.json` missing `active_plan` | `readBoulderState` returns `null` |
| `boulder.json` missing `plan_name` | `readBoulderState` returns `null` |
| `boulder.json` has `worktree_path: null` | Field stripped, returned as `undefined` |
| `boulder.json` has `worktree_path: 42` | Field stripped, returned as `undefined` |
| `boulder.json` has no `worktree_path` | Works normally, no crash |
| `boulder.json` has valid `worktree_path` | Preserved, included in continuation prompt |
| setTimeout retry with corrupted boulder.json | Error caught and logged, no process crash |
| `getPlanProgress(undefined)` | Returns `{ total: 0, completed: 0, isComplete: true }` |

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 325000, "total_duration_seconds": 325}

View File

@@ -0,0 +1,32 @@
{
"eval_id": 3,
"eval_name": "refactor-split-constants",
"prompt": "Refactor src/tools/delegate-task/constants.ts to split DEFAULT_CATEGORIES and CATEGORY_MODEL_REQUIREMENTS into separate files. Keep backward compatibility with the barrel export. Make a PR.",
"assertions": [
{
"id": "worktree-isolation",
"text": "Plan uses git worktree in a sibling directory",
"type": "manual"
},
{
"id": "multiple-atomic-commits",
"text": "Uses 2+ commits for the multi-file refactor",
"type": "manual"
},
{
"id": "barrel-export",
"text": "Maintains backward compatibility via barrel re-export in constants.ts or index.ts",
"type": "manual"
},
{
"id": "three-gates",
"text": "Verification loop includes all 3 gates",
"type": "manual"
},
{
"id": "real-constants-file",
"text": "References actual src/tools/delegate-task/constants.ts file and its exports",
"type": "manual"
}
]
}

View File

@@ -0,0 +1,10 @@
{
"run_id": "eval-3-with_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": true, "evidence": "../omo-wt/refactor-delegate-task-constants"},
{"text": "Uses 2+ commits for the multi-file refactor", "passed": true, "evidence": "Commit 1: category defaults+appends, Commit 2: plan agent prompt+names"},
{"text": "Maintains backward compatibility via barrel re-export", "passed": true, "evidence": "constants.ts converted to re-export from 4 new files, full import map verified"},
{"text": "Verification loop includes all 3 gates", "passed": true, "evidence": "Gate A (CI), Gate B (review-work), Gate C (Cubic)"},
{"text": "References actual src/tools/delegate-task/constants.ts", "passed": true, "evidence": "654 lines analyzed, 4 responsibilities identified, full external+internal import map"}
]
}

View File

@@ -0,0 +1,221 @@
# Code Changes
## New File: `src/tools/delegate-task/default-categories.ts`
```typescript
import type { CategoryConfig } from "../../config/schema"
export const DEFAULT_CATEGORIES: Record<string, CategoryConfig> = {
"visual-engineering": { model: "google/gemini-3.1-pro", variant: "high" },
ultrabrain: { model: "openai/gpt-5.4", variant: "xhigh" },
deep: { model: "openai/gpt-5.3-codex", variant: "medium" },
artistry: { model: "google/gemini-3.1-pro", variant: "high" },
quick: { model: "anthropic/claude-haiku-4-5" },
"unspecified-low": { model: "anthropic/claude-sonnet-4-6" },
"unspecified-high": { model: "anthropic/claude-opus-4-6", variant: "max" },
writing: { model: "kimi-for-coding/k2p5" },
}
export const CATEGORY_DESCRIPTIONS: Record<string, string> = {
"visual-engineering": "Frontend, UI/UX, design, styling, animation",
ultrabrain: "Use ONLY for genuinely hard, logic-heavy tasks. Give clear goals only, not step-by-step instructions.",
deep: "Goal-oriented autonomous problem-solving. Thorough research before action. For hairy problems requiring deep understanding.",
artistry: "Complex problem-solving with unconventional, creative approaches - beyond standard patterns",
quick: "Trivial tasks - single file changes, typo fixes, simple modifications",
"unspecified-low": "Tasks that don't fit other categories, low effort required",
"unspecified-high": "Tasks that don't fit other categories, high effort required",
writing: "Documentation, prose, technical writing",
}
```
## New File: `src/tools/delegate-task/category-prompt-appends.ts`
```typescript
export const VISUAL_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on VISUAL/UI tasks.
...
</Category_Context>`
// (exact content from lines 8-95 of constants.ts)
export const ULTRABRAIN_CATEGORY_PROMPT_APPEND = `<Category_Context>
...
</Category_Context>`
// (exact content from lines 97-117)
export const ARTISTRY_CATEGORY_PROMPT_APPEND = `<Category_Context>
...
</Category_Context>`
// (exact content from lines 119-134)
export const QUICK_CATEGORY_PROMPT_APPEND = `<Category_Context>
...
</Caller_Warning>`
// (exact content from lines 136-186)
export const UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = `<Category_Context>
...
</Caller_Warning>`
// (exact content from lines 188-209)
export const UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
...
</Category_Context>`
// (exact content from lines 211-224)
export const WRITING_CATEGORY_PROMPT_APPEND = `<Category_Context>
...
</Category_Context>`
// (exact content from lines 226-250)
export const DEEP_CATEGORY_PROMPT_APPEND = `<Category_Context>
...
</Category_Context>`
// (exact content from lines 252-281)
export const CATEGORY_PROMPT_APPENDS: Record<string, string> = {
"visual-engineering": VISUAL_CATEGORY_PROMPT_APPEND,
ultrabrain: ULTRABRAIN_CATEGORY_PROMPT_APPEND,
deep: DEEP_CATEGORY_PROMPT_APPEND,
artistry: ARTISTRY_CATEGORY_PROMPT_APPEND,
quick: QUICK_CATEGORY_PROMPT_APPEND,
"unspecified-low": UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND,
"unspecified-high": UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND,
writing: WRITING_CATEGORY_PROMPT_APPEND,
}
```
## New File: `src/tools/delegate-task/plan-agent-prompt.ts`
```typescript
import type {
AvailableCategory,
AvailableSkill,
} from "../../agents/dynamic-agent-prompt-builder"
import { truncateDescription } from "../../shared/truncate-description"
/**
* System prompt prepended to plan agent invocations.
* Instructs the plan agent to first gather context via explore/librarian agents,
* then summarize user requirements and clarify uncertainties before proceeding.
* Also MANDATES dependency graphs, parallel execution analysis, and category+skill recommendations.
*/
export const PLAN_AGENT_SYSTEM_PREPEND_STATIC_BEFORE_SKILLS = `<system>
...
</CRITICAL_REQUIREMENT_DEPENDENCY_PARALLEL_EXECUTION_CATEGORY_SKILLS>
`
// (exact content from lines 324-430)
export const PLAN_AGENT_SYSTEM_PREPEND_STATIC_AFTER_SKILLS = `### REQUIRED OUTPUT FORMAT
...
`
// (exact content from lines 432-569)
function renderPlanAgentCategoryRows(categories: AvailableCategory[]): string[] {
const sorted = [...categories].sort((a, b) => a.name.localeCompare(b.name))
return sorted.map((category) => {
const bestFor = category.description || category.name
const model = category.model || ""
return `| \`${category.name}\` | ${bestFor} | ${model} |`
})
}
function renderPlanAgentSkillRows(skills: AvailableSkill[]): string[] {
const sorted = [...skills].sort((a, b) => a.name.localeCompare(b.name))
return sorted.map((skill) => {
const domain = truncateDescription(skill.description).trim() || skill.name
return `| \`${skill.name}\` | ${domain} |`
})
}
export function buildPlanAgentSkillsSection(
categories: AvailableCategory[] = [],
skills: AvailableSkill[] = []
): string {
const categoryRows = renderPlanAgentCategoryRows(categories)
const skillRows = renderPlanAgentSkillRows(skills)
return `### AVAILABLE CATEGORIES
| Category | Best For | Model |
|----------|----------|-------|
${categoryRows.join("\n")}
### AVAILABLE SKILLS (ALWAYS EVALUATE ALL)
Skills inject specialized expertise into the delegated agent.
YOU MUST evaluate EVERY skill and justify inclusions/omissions.
| Skill | Domain |
|-------|--------|
${skillRows.join("\n")}`
}
export function buildPlanAgentSystemPrepend(
categories: AvailableCategory[] = [],
skills: AvailableSkill[] = []
): string {
return [
PLAN_AGENT_SYSTEM_PREPEND_STATIC_BEFORE_SKILLS,
buildPlanAgentSkillsSection(categories, skills),
PLAN_AGENT_SYSTEM_PREPEND_STATIC_AFTER_SKILLS,
].join("\n\n")
}
```
## New File: `src/tools/delegate-task/plan-agent-names.ts`
```typescript
/**
* List of agent names that should be treated as plan agents (receive plan system prompt).
* Case-insensitive matching is used.
*/
export const PLAN_AGENT_NAMES = ["plan"]
/**
* Check if the given agent name is a plan agent (receives plan system prompt).
*/
export function isPlanAgent(agentName: string | undefined): boolean {
if (!agentName) return false
const lowerName = agentName.toLowerCase().trim()
return PLAN_AGENT_NAMES.some(name => lowerName === name || lowerName.includes(name))
}
/**
* Plan family: plan + prometheus. Shares mutual delegation blocking and task tool permission.
* Does NOT share system prompt (only isPlanAgent controls that).
*/
export const PLAN_FAMILY_NAMES = ["plan", "prometheus"]
/**
* Check if the given agent belongs to the plan family (blocking + task permission).
*/
export function isPlanFamily(category: string): boolean
export function isPlanFamily(category: string | undefined): boolean
export function isPlanFamily(category: string | undefined): boolean {
if (!category) return false
const lowerCategory = category.toLowerCase().trim()
return PLAN_FAMILY_NAMES.some(
(name) => lowerCategory === name || lowerCategory.includes(name)
)
}
```
## Modified File: `src/tools/delegate-task/constants.ts`
```typescript
export * from "./default-categories"
export * from "./category-prompt-appends"
export * from "./plan-agent-prompt"
export * from "./plan-agent-names"
```
## Unchanged: `src/tools/delegate-task/index.ts`
```typescript
export { createDelegateTask, resolveCategoryConfig, buildSystemContent, buildTaskPrompt } from "./tools"
export type { DelegateTaskToolOptions, SyncSessionCreatedEvent, BuildSystemContentInput } from "./tools"
export type * from "./types"
export * from "./constants"
```
No changes needed. `export * from "./constants"` transitively re-exports everything from the 4 new files.

View File

@@ -0,0 +1,104 @@
# Execution Plan: Split delegate-task/constants.ts
## Phase 0: Setup
```bash
git fetch origin dev
git worktree add ../omo-wt/refactor-delegate-task-constants origin/dev -b refactor/split-delegate-task-constants
cd ../omo-wt/refactor-delegate-task-constants
```
## Phase 1: Implement
### Analysis
`src/tools/delegate-task/constants.ts` is 654 lines with 4 distinct responsibilities:
1. **Category defaults** (lines 285-316): `DEFAULT_CATEGORIES`, `CATEGORY_DESCRIPTIONS`
2. **Category prompt appends** (lines 8-305): 8 `*_CATEGORY_PROMPT_APPEND` string constants + `CATEGORY_PROMPT_APPENDS` record
3. **Plan agent prompts** (lines 318-620): `PLAN_AGENT_SYSTEM_PREPEND_*`, builder functions
4. **Plan agent names** (lines 626-654): `PLAN_AGENT_NAMES`, `isPlanAgent`, `PLAN_FAMILY_NAMES`, `isPlanFamily`
Note: `CATEGORY_MODEL_REQUIREMENTS` is already in `src/shared/model-requirements.ts`. No move needed.
### New Files
| File | Responsibility | ~LOC |
|------|---------------|------|
| `default-categories.ts` | `DEFAULT_CATEGORIES`, `CATEGORY_DESCRIPTIONS` | ~40 |
| `category-prompt-appends.ts` | 8 prompt append constants + `CATEGORY_PROMPT_APPENDS` record | ~300 (exempt: prompt text) |
| `plan-agent-prompt.ts` | Plan agent system prompt constants + builder functions | ~250 (exempt: prompt text) |
| `plan-agent-names.ts` | `PLAN_AGENT_NAMES`, `isPlanAgent`, `PLAN_FAMILY_NAMES`, `isPlanFamily` | ~30 |
| `constants.ts` (updated) | Re-exports from all 4 files (backward compat) | ~5 |
### Commit 1: Extract category defaults and prompt appends
**Files changed**: 3 new + 1 modified
- Create `src/tools/delegate-task/default-categories.ts`
- Create `src/tools/delegate-task/category-prompt-appends.ts`
- Modify `src/tools/delegate-task/constants.ts` (remove extracted code, add re-exports)
### Commit 2: Extract plan agent prompt and names
**Files changed**: 2 new + 1 modified
- Create `src/tools/delegate-task/plan-agent-prompt.ts`
- Create `src/tools/delegate-task/plan-agent-names.ts`
- Modify `src/tools/delegate-task/constants.ts` (final: re-exports only)
### Local Validation
```bash
bun run typecheck
bun test src/tools/delegate-task/
bun run build
```
## Phase 2: PR Creation
```bash
git push -u origin refactor/split-delegate-task-constants
gh pr create --base dev --title "refactor(delegate-task): split constants.ts into focused modules" --body-file /tmp/pr-body.md
```
## Phase 3: Verify Loop
- **Gate A**: `gh pr checks --watch`
- **Gate B**: `/review-work` (5-agent review)
- **Gate C**: Wait for cubic-dev-ai[bot] "No issues found"
## Phase 4: Merge
```bash
gh pr merge --squash --delete-branch
git worktree remove ../omo-wt/refactor-delegate-task-constants
```
## Import Update Strategy
No import updates needed. Backward compatibility preserved through:
1. `constants.ts` re-exports everything from the 4 new files
2. `index.ts` already does `export * from "./constants"` (unchanged)
3. All external consumers import from `"../tools/delegate-task/constants"` or `"./constants"` -- both still work
### External Import Map (Verified -- NO CHANGES NEEDED)
| Consumer | Imports | Source Path |
|----------|---------|-------------|
| `src/agents/atlas/prompt-section-builder.ts` | `CATEGORY_DESCRIPTIONS` | `../../tools/delegate-task/constants` |
| `src/agents/builtin-agents.ts` | `CATEGORY_DESCRIPTIONS` | `../tools/delegate-task/constants` |
| `src/plugin/available-categories.ts` | `CATEGORY_DESCRIPTIONS` | `../tools/delegate-task/constants` |
| `src/plugin-handlers/category-config-resolver.ts` | `DEFAULT_CATEGORIES` | `../tools/delegate-task/constants` |
| `src/shared/merge-categories.ts` | `DEFAULT_CATEGORIES` | `../tools/delegate-task/constants` |
| `src/shared/merge-categories.test.ts` | `DEFAULT_CATEGORIES` | `../tools/delegate-task/constants` |
### Internal Import Map (Within delegate-task/ -- NO CHANGES NEEDED)
| Consumer | Imports |
|----------|---------|
| `categories.ts` | `DEFAULT_CATEGORIES`, `CATEGORY_PROMPT_APPENDS` |
| `tools.ts` | `CATEGORY_DESCRIPTIONS` |
| `prompt-builder.ts` | `buildPlanAgentSystemPrepend`, `isPlanAgent` |
| `subagent-resolver.ts` | `isPlanFamily` |
| `sync-continuation.ts` | `isPlanFamily` |
| `sync-prompt-sender.ts` | `isPlanFamily` |
| `tools.test.ts` | `DEFAULT_CATEGORIES`, `CATEGORY_PROMPT_APPENDS`, `CATEGORY_DESCRIPTIONS`, `isPlanAgent`, `PLAN_AGENT_NAMES`, `isPlanFamily`, `PLAN_FAMILY_NAMES` |

View File

@@ -0,0 +1,41 @@
# PR Title
```
refactor(delegate-task): split constants.ts into focused modules
```
# PR Body
## Summary
- Split the 654-line `src/tools/delegate-task/constants.ts` into 4 single-responsibility modules: `default-categories.ts`, `category-prompt-appends.ts`, `plan-agent-prompt.ts`, `plan-agent-names.ts`
- `constants.ts` becomes a pure re-export barrel, preserving all existing import paths (`from "./constants"` and `from "./delegate-task"`)
- Zero import changes across the codebase (6 external + 7 internal consumers verified)
## Motivation
`constants.ts` at 654 lines violates the project's 200 LOC soft limit (`modular-code-enforcement.md` rule) and bundles 4 unrelated responsibilities: category model configs, category prompt text, plan agent prompts, and plan agent name utilities.
## Changes
| New File | Responsibility | LOC |
|----------|---------------|-----|
| `default-categories.ts` | `DEFAULT_CATEGORIES`, `CATEGORY_DESCRIPTIONS` | ~25 |
| `category-prompt-appends.ts` | 8 `*_PROMPT_APPEND` constants + `CATEGORY_PROMPT_APPENDS` record | ~300 (prompt-exempt) |
| `plan-agent-prompt.ts` | Plan system prompt constants + `buildPlanAgentSystemPrepend()` | ~250 (prompt-exempt) |
| `plan-agent-names.ts` | `PLAN_AGENT_NAMES`, `isPlanAgent`, `PLAN_FAMILY_NAMES`, `isPlanFamily` | ~30 |
| `constants.ts` (updated) | 4-line re-export barrel | 4 |
## Backward Compatibility
All 13 consumers continue importing from `"./constants"` or `"../tools/delegate-task/constants"` with zero changes. The re-export chain: new modules -> `constants.ts` -> `index.ts` -> external consumers.
## Note on CATEGORY_MODEL_REQUIREMENTS
`CATEGORY_MODEL_REQUIREMENTS` already lives in `src/shared/model-requirements.ts`. No move needed. The AGENTS.md reference to it being in `constants.ts` is outdated.
## Testing
- `bun run typecheck` passes
- `bun test src/tools/delegate-task/` passes (all existing tests untouched)
- `bun run build` succeeds

View File

@@ -0,0 +1,84 @@
# Verification Strategy
## Gate A: CI (Blocking)
```bash
gh pr checks --watch
```
**Expected CI jobs** (from `ci.yml`):
1. **Tests (split)**: mock-heavy isolated + batch `bun test`
2. **Typecheck**: `bun run typecheck` (tsc --noEmit)
3. **Build**: `bun run build`
4. **Schema auto-commit**: If schema changes detected
**Likely failure points**: None. This is a pure refactor with re-exports. No runtime behavior changes.
**If CI fails**:
- Typecheck error: Missing re-export or import cycle. Fix in the new modules, amend commit.
- Test error: `tools.test.ts` imports all symbols from `"./constants"`. Re-export barrel must be complete.
## Gate B: review-work (5-Agent Review)
Invoke after CI passes:
```
/review-work
```
**5 parallel agents**:
1. **Oracle (goal/constraint)**: Verify backward compat claim. Check all 13 import paths resolve.
2. **Oracle (code quality)**: Verify single-responsibility per file, LOC limits, no catch-all violations.
3. **Oracle (security)**: No security implications in this refactor.
4. **QA (hands-on execution)**: Run `bun test src/tools/delegate-task/` and verify all pass.
5. **Context miner**: Check no related open issues/PRs conflict.
**Expected verdict**: Pass. Pure structural refactor with no behavioral changes.
## Gate C: Cubic (External Bot)
Wait for `cubic-dev-ai[bot]` to post "No issues found" on the PR.
**If Cubic flags issues**: Likely false positives on "large number of new files". Address in PR comments if needed.
## Pre-Gate Local Validation (Before Push)
```bash
# In worktree
bun run typecheck
bun test src/tools/delegate-task/
bun run build
# Verify re-exports are complete
bun -e "import * as c from './src/tools/delegate-task/constants'; console.log(Object.keys(c).sort().join('\n'))"
```
Expected exports from constants.ts (13 total):
- `ARTISTRY_CATEGORY_PROMPT_APPEND`
- `CATEGORY_DESCRIPTIONS`
- `CATEGORY_PROMPT_APPENDS`
- `DEFAULT_CATEGORIES`
- `DEEP_CATEGORY_PROMPT_APPEND`
- `PLAN_AGENT_NAMES`
- `PLAN_AGENT_SYSTEM_PREPEND_STATIC_AFTER_SKILLS`
- `PLAN_AGENT_SYSTEM_PREPEND_STATIC_BEFORE_SKILLS`
- `PLAN_FAMILY_NAMES`
- `QUICK_CATEGORY_PROMPT_APPEND`
- `ULTRABRAIN_CATEGORY_PROMPT_APPEND`
- `UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND`
- `UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND`
- `VISUAL_CATEGORY_PROMPT_APPEND`
- `WRITING_CATEGORY_PROMPT_APPEND`
- `buildPlanAgentSkillsSection`
- `buildPlanAgentSystemPrepend`
- `isPlanAgent`
- `isPlanFamily`
## Merge Strategy
```bash
gh pr merge --squash --delete-branch
git worktree remove ../omo-wt/refactor-delegate-task-constants
```
Squash merge collapses the 2 atomic commits into 1 clean commit on dev.

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 181000, "total_duration_seconds": 181}

View File

@@ -0,0 +1,10 @@
{
"run_id": "eval-3-without_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": false, "evidence": "git checkout -b only, no worktree"},
{"text": "Uses 2+ commits for the multi-file refactor", "passed": false, "evidence": "Single atomic commit: 'refactor: split delegate-task constants and category model requirements'"},
{"text": "Maintains backward compatibility via barrel re-export", "passed": true, "evidence": "Re-exports from new files, zero consumer changes"},
{"text": "Verification loop includes all 3 gates", "passed": false, "evidence": "Only mentions typecheck/test/build. No review-work or Cubic."},
{"text": "References actual src/tools/delegate-task/constants.ts", "passed": true, "evidence": "654 lines, detailed responsibility breakdown, full import maps"}
]
}

View File

@@ -0,0 +1,342 @@
# Code Changes
## 1. NEW: `src/tools/delegate-task/default-categories.ts`
```typescript
import type { CategoryConfig } from "../../config/schema"
export const DEFAULT_CATEGORIES: Record<string, CategoryConfig> = {
"visual-engineering": { model: "google/gemini-3.1-pro", variant: "high" },
ultrabrain: { model: "openai/gpt-5.4", variant: "xhigh" },
deep: { model: "openai/gpt-5.3-codex", variant: "medium" },
artistry: { model: "google/gemini-3.1-pro", variant: "high" },
quick: { model: "anthropic/claude-haiku-4-5" },
"unspecified-low": { model: "anthropic/claude-sonnet-4-6" },
"unspecified-high": { model: "anthropic/claude-opus-4-6", variant: "max" },
writing: { model: "kimi-for-coding/k2p5" },
}
```
## 2. NEW: `src/tools/delegate-task/category-descriptions.ts`
```typescript
export const CATEGORY_DESCRIPTIONS: Record<string, string> = {
"visual-engineering": "Frontend, UI/UX, design, styling, animation",
ultrabrain: "Use ONLY for genuinely hard, logic-heavy tasks. Give clear goals only, not step-by-step instructions.",
deep: "Goal-oriented autonomous problem-solving. Thorough research before action. For hairy problems requiring deep understanding.",
artistry: "Complex problem-solving with unconventional, creative approaches - beyond standard patterns",
quick: "Trivial tasks - single file changes, typo fixes, simple modifications",
"unspecified-low": "Tasks that don't fit other categories, low effort required",
"unspecified-high": "Tasks that don't fit other categories, high effort required",
writing: "Documentation, prose, technical writing",
}
```
## 3. NEW: `src/tools/delegate-task/category-prompt-appends.ts`
```typescript
export const VISUAL_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on VISUAL/UI tasks.
...
</Category_Context>`
export const ULTRABRAIN_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on DEEP LOGICAL REASONING / COMPLEX ARCHITECTURE tasks.
...
</Category_Context>`
export const ARTISTRY_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on HIGHLY CREATIVE / ARTISTIC tasks.
...
</Category_Context>`
export const QUICK_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on SMALL / QUICK tasks.
...
</Caller_Warning>`
export const UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on tasks that don't fit specific categories but require moderate effort.
...
</Caller_Warning>`
export const UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on tasks that don't fit specific categories but require substantial effort.
...
</Category_Context>`
export const WRITING_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on WRITING / PROSE tasks.
...
</Category_Context>`
export const DEEP_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on GOAL-ORIENTED AUTONOMOUS tasks.
...
</Category_Context>`
export const CATEGORY_PROMPT_APPENDS: Record<string, string> = {
"visual-engineering": VISUAL_CATEGORY_PROMPT_APPEND,
ultrabrain: ULTRABRAIN_CATEGORY_PROMPT_APPEND,
deep: DEEP_CATEGORY_PROMPT_APPEND,
artistry: ARTISTRY_CATEGORY_PROMPT_APPEND,
quick: QUICK_CATEGORY_PROMPT_APPEND,
"unspecified-low": UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND,
"unspecified-high": UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND,
writing: WRITING_CATEGORY_PROMPT_APPEND,
}
```
> Note: Each `*_CATEGORY_PROMPT_APPEND` contains the full template string from the original. Abbreviated with `...` here for readability. The actual code would contain the complete unmodified prompt text.
## 4. NEW: `src/tools/delegate-task/plan-agent-prompt.ts`
```typescript
import type {
AvailableCategory,
AvailableSkill,
} from "../../agents/dynamic-agent-prompt-builder"
import { truncateDescription } from "../../shared/truncate-description"
export const PLAN_AGENT_SYSTEM_PREPEND_STATIC_BEFORE_SKILLS = `<system>
BEFORE you begin planning, you MUST first understand the user's request deeply.
...
</CRITICAL_REQUIREMENT_DEPENDENCY_PARALLEL_EXECUTION_CATEGORY_SKILLS>
<FINAL_OUTPUT_FOR_CALLER>
...
</FINAL_OUTPUT_FOR_CALLER>
`
export const PLAN_AGENT_SYSTEM_PREPEND_STATIC_AFTER_SKILLS = `### REQUIRED OUTPUT FORMAT
...
`
function renderPlanAgentCategoryRows(categories: AvailableCategory[]): string[] {
const sorted = [...categories].sort((a, b) => a.name.localeCompare(b.name))
return sorted.map((category) => {
const bestFor = category.description || category.name
const model = category.model || ""
return `| \`${category.name}\` | ${bestFor} | ${model} |`
})
}
function renderPlanAgentSkillRows(skills: AvailableSkill[]): string[] {
const sorted = [...skills].sort((a, b) => a.name.localeCompare(b.name))
return sorted.map((skill) => {
const domain = truncateDescription(skill.description).trim() || skill.name
return `| \`${skill.name}\` | ${domain} |`
})
}
export function buildPlanAgentSkillsSection(
categories: AvailableCategory[] = [],
skills: AvailableSkill[] = []
): string {
const categoryRows = renderPlanAgentCategoryRows(categories)
const skillRows = renderPlanAgentSkillRows(skills)
return `### AVAILABLE CATEGORIES
| Category | Best For | Model |
|----------|----------|-------|
${categoryRows.join("\n")}
### AVAILABLE SKILLS (ALWAYS EVALUATE ALL)
Skills inject specialized expertise into the delegated agent.
YOU MUST evaluate EVERY skill and justify inclusions/omissions.
| Skill | Domain |
|-------|--------|
${skillRows.join("\n")}`
}
export function buildPlanAgentSystemPrepend(
categories: AvailableCategory[] = [],
skills: AvailableSkill[] = []
): string {
return [
PLAN_AGENT_SYSTEM_PREPEND_STATIC_BEFORE_SKILLS,
buildPlanAgentSkillsSection(categories, skills),
PLAN_AGENT_SYSTEM_PREPEND_STATIC_AFTER_SKILLS,
].join("\n\n")
}
```
> Note: Template strings abbreviated with `...`. Full unmodified content in the actual file.
## 5. NEW: `src/tools/delegate-task/plan-agent-identity.ts`
```typescript
/**
* List of agent names that should be treated as plan agents (receive plan system prompt).
* Case-insensitive matching is used.
*/
export const PLAN_AGENT_NAMES = ["plan"]
/**
* Check if the given agent name is a plan agent (receives plan system prompt).
*/
export function isPlanAgent(agentName: string | undefined): boolean {
if (!agentName) return false
const lowerName = agentName.toLowerCase().trim()
return PLAN_AGENT_NAMES.some(name => lowerName === name || lowerName.includes(name))
}
/**
* Plan family: plan + prometheus. Shares mutual delegation blocking and task tool permission.
* Does NOT share system prompt (only isPlanAgent controls that).
*/
export const PLAN_FAMILY_NAMES = ["plan", "prometheus"]
/**
* Check if the given agent belongs to the plan family (blocking + task permission).
*/
export function isPlanFamily(category: string): boolean
export function isPlanFamily(category: string | undefined): boolean
export function isPlanFamily(category: string | undefined): boolean {
if (!category) return false
const lowerCategory = category.toLowerCase().trim()
return PLAN_FAMILY_NAMES.some(
(name) => lowerCategory === name || lowerCategory.includes(name)
)
}
```
## 6. MODIFIED: `src/tools/delegate-task/constants.ts` (barrel re-export)
```typescript
export { DEFAULT_CATEGORIES } from "./default-categories"
export { CATEGORY_DESCRIPTIONS } from "./category-descriptions"
export {
VISUAL_CATEGORY_PROMPT_APPEND,
ULTRABRAIN_CATEGORY_PROMPT_APPEND,
ARTISTRY_CATEGORY_PROMPT_APPEND,
QUICK_CATEGORY_PROMPT_APPEND,
UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND,
UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND,
WRITING_CATEGORY_PROMPT_APPEND,
DEEP_CATEGORY_PROMPT_APPEND,
CATEGORY_PROMPT_APPENDS,
} from "./category-prompt-appends"
export {
PLAN_AGENT_SYSTEM_PREPEND_STATIC_BEFORE_SKILLS,
PLAN_AGENT_SYSTEM_PREPEND_STATIC_AFTER_SKILLS,
buildPlanAgentSkillsSection,
buildPlanAgentSystemPrepend,
} from "./plan-agent-prompt"
export {
PLAN_AGENT_NAMES,
isPlanAgent,
PLAN_FAMILY_NAMES,
isPlanFamily,
} from "./plan-agent-identity"
```
## 7. NEW: `src/shared/category-model-requirements.ts`
```typescript
import type { ModelRequirement } from "./model-requirements"
export const CATEGORY_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
"visual-engineering": {
fallbackChain: [
{
providers: ["google", "github-copilot", "opencode"],
model: "gemini-3.1-pro",
variant: "high",
},
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
{
providers: ["anthropic", "github-copilot", "opencode"],
model: "claude-opus-4-6",
variant: "max",
},
{ providers: ["opencode-go"], model: "glm-5" },
{ providers: ["kimi-for-coding"], model: "k2p5" },
],
},
ultrabrain: {
fallbackChain: [
// ... full content from original
],
},
deep: {
fallbackChain: [
// ... full content from original
],
requiresModel: "gpt-5.3-codex",
},
artistry: {
fallbackChain: [
// ... full content from original
],
requiresModel: "gemini-3.1-pro",
},
quick: {
fallbackChain: [
// ... full content from original
],
},
"unspecified-low": {
fallbackChain: [
// ... full content from original
],
},
"unspecified-high": {
fallbackChain: [
// ... full content from original
],
},
writing: {
fallbackChain: [
// ... full content from original
],
},
}
```
> Note: Each category's `fallbackChain` contains the exact same entries as the original `model-requirements.ts`. Abbreviated here.
## 8. MODIFIED: `src/shared/model-requirements.ts`
**Remove** `CATEGORY_MODEL_REQUIREMENTS` from the file body. **Add** re-export at the end:
```typescript
export type FallbackEntry = {
providers: string[];
model: string;
variant?: string;
};
export type ModelRequirement = {
fallbackChain: FallbackEntry[];
variant?: string;
requiresModel?: string;
requiresAnyModel?: boolean;
requiresProvider?: string[];
};
export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
// ... unchanged, full agent entries stay here
};
export { CATEGORY_MODEL_REQUIREMENTS } from "./category-model-requirements"
```
## Summary of Changes
| File | Lines Before | Lines After | Action |
|------|-------------|-------------|--------|
| `constants.ts` | 654 | ~25 | Rewrite as barrel re-export |
| `default-categories.ts` | - | ~15 | **NEW** |
| `category-descriptions.ts` | - | ~12 | **NEW** |
| `category-prompt-appends.ts` | - | ~280 | **NEW** (mostly exempt prompt text) |
| `plan-agent-prompt.ts` | - | ~270 | **NEW** (mostly exempt prompt text) |
| `plan-agent-identity.ts` | - | ~35 | **NEW** |
| `model-requirements.ts` | 311 | ~165 | Remove CATEGORY_MODEL_REQUIREMENTS |
| `category-model-requirements.ts` | - | ~150 | **NEW** |
**Zero consumer files modified.** Backward compatibility maintained through barrel re-exports.

View File

@@ -0,0 +1,131 @@
# Execution Plan: Refactor constants.ts
## Context
`src/tools/delegate-task/constants.ts` is **654 lines** with 6 distinct responsibilities. Violates the 200 LOC modular-code-enforcement rule. `CATEGORY_MODEL_REQUIREMENTS` is actually in `src/shared/model-requirements.ts` (311 lines, also violating 200 LOC), not in `constants.ts`.
## Pre-Flight Analysis
### Current `constants.ts` responsibilities:
1. **Category prompt appends** (8 template strings, ~274 LOC prompt text)
2. **DEFAULT_CATEGORIES** (Record<string, CategoryConfig>, ~10 LOC)
3. **CATEGORY_PROMPT_APPENDS** (map of category->prompt, ~10 LOC)
4. **CATEGORY_DESCRIPTIONS** (map of category->description, ~10 LOC)
5. **Plan agent prompts** (2 template strings + 4 builder functions, ~250 LOC prompt text)
6. **Plan agent identity utils** (`isPlanAgent`, `isPlanFamily`, ~30 LOC)
### Current `model-requirements.ts` responsibilities:
1. Types (`FallbackEntry`, `ModelRequirement`)
2. `AGENT_MODEL_REQUIREMENTS` (~146 LOC)
3. `CATEGORY_MODEL_REQUIREMENTS` (~148 LOC)
### Import dependency map for `constants.ts`:
**Internal consumers (within delegate-task/):**
| File | Imports |
|------|---------|
| `categories.ts` | `DEFAULT_CATEGORIES`, `CATEGORY_PROMPT_APPENDS` |
| `tools.ts` | `CATEGORY_DESCRIPTIONS` |
| `tools.test.ts` | `DEFAULT_CATEGORIES`, `CATEGORY_PROMPT_APPENDS`, `CATEGORY_DESCRIPTIONS`, `isPlanAgent`, `PLAN_AGENT_NAMES`, `isPlanFamily`, `PLAN_FAMILY_NAMES` |
| `prompt-builder.ts` | `buildPlanAgentSystemPrepend`, `isPlanAgent` |
| `subagent-resolver.ts` | `isPlanFamily` |
| `sync-continuation.ts` | `isPlanFamily` |
| `sync-prompt-sender.ts` | `isPlanFamily` |
| `index.ts` | `export * from "./constants"` (barrel) |
**External consumers (import from `"../../tools/delegate-task/constants"`):**
| File | Imports |
|------|---------|
| `agents/atlas/prompt-section-builder.ts` | `CATEGORY_DESCRIPTIONS` |
| `agents/builtin-agents.ts` | `CATEGORY_DESCRIPTIONS` |
| `plugin/available-categories.ts` | `CATEGORY_DESCRIPTIONS` |
| `plugin-handlers/category-config-resolver.ts` | `DEFAULT_CATEGORIES` |
| `shared/merge-categories.ts` | `DEFAULT_CATEGORIES` |
| `shared/merge-categories.test.ts` | `DEFAULT_CATEGORIES` |
**External consumers of `CATEGORY_MODEL_REQUIREMENTS`:**
| File | Import path |
|------|-------------|
| `tools/delegate-task/categories.ts` | `../../shared/model-requirements` |
## Step-by-Step Execution
### Step 1: Create branch
```bash
git checkout -b refactor/split-category-constants dev
```
### Step 2: Split `constants.ts` into 5 focused files
#### 2a. Create `default-categories.ts`
- Move `DEFAULT_CATEGORIES` record
- Import `CategoryConfig` type from config schema
- ~15 LOC
#### 2b. Create `category-descriptions.ts`
- Move `CATEGORY_DESCRIPTIONS` record
- No dependencies
- ~12 LOC
#### 2c. Create `category-prompt-appends.ts`
- Move all 8 `*_CATEGORY_PROMPT_APPEND` template string constants
- Move `CATEGORY_PROMPT_APPENDS` mapping record
- No dependencies (all self-contained template strings)
- ~280 LOC (mostly prompt text, exempt from 200 LOC per modular-code-enforcement)
#### 2d. Create `plan-agent-prompt.ts`
- Move `PLAN_AGENT_SYSTEM_PREPEND_STATIC_BEFORE_SKILLS`
- Move `PLAN_AGENT_SYSTEM_PREPEND_STATIC_AFTER_SKILLS`
- Move `renderPlanAgentCategoryRows()`, `renderPlanAgentSkillRows()`
- Move `buildPlanAgentSkillsSection()`, `buildPlanAgentSystemPrepend()`
- Imports: `AvailableCategory`, `AvailableSkill` from agents, `truncateDescription` from shared
- ~270 LOC (mostly prompt text, exempt)
#### 2e. Create `plan-agent-identity.ts`
- Move `PLAN_AGENT_NAMES`, `isPlanAgent()`
- Move `PLAN_FAMILY_NAMES`, `isPlanFamily()`
- No dependencies
- ~35 LOC
### Step 3: Convert `constants.ts` to barrel re-export file
Replace entire contents with re-exports from the 5 new files. This maintains 100% backward compatibility for all existing importers.
### Step 4: Split `model-requirements.ts`
#### 4a. Create `src/shared/category-model-requirements.ts`
- Move `CATEGORY_MODEL_REQUIREMENTS` record
- Import `ModelRequirement` type from `./model-requirements`
- ~150 LOC
#### 4b. Update `model-requirements.ts`
- Remove `CATEGORY_MODEL_REQUIREMENTS`
- Add re-export: `export { CATEGORY_MODEL_REQUIREMENTS } from "./category-model-requirements"`
- Keep types (`FallbackEntry`, `ModelRequirement`) and `AGENT_MODEL_REQUIREMENTS`
- ~165 LOC (now under 200)
### Step 5: Verify no import breakage
- Run `bun run typecheck` to confirm all imports resolve
- Run `bun test` to confirm no behavioral regressions
- Run `bun run build` to confirm build succeeds
### Step 6: Verify LSP diagnostics clean
- Check `lsp_diagnostics` on all new and modified files
### Step 7: Commit and create PR
- Single atomic commit: `refactor: split delegate-task constants and category model requirements into focused modules`
- Create PR with description
## Files Modified
| File | Action |
|------|--------|
| `src/tools/delegate-task/constants.ts` | Rewrite as barrel re-export |
| `src/tools/delegate-task/default-categories.ts` | **NEW** |
| `src/tools/delegate-task/category-descriptions.ts` | **NEW** |
| `src/tools/delegate-task/category-prompt-appends.ts` | **NEW** |
| `src/tools/delegate-task/plan-agent-prompt.ts` | **NEW** |
| `src/tools/delegate-task/plan-agent-identity.ts` | **NEW** |
| `src/shared/model-requirements.ts` | Remove CATEGORY_MODEL_REQUIREMENTS, add re-export |
| `src/shared/category-model-requirements.ts` | **NEW** |
**Zero changes to any consumer files.** All existing imports work via barrel re-exports.

View File

@@ -0,0 +1,39 @@
## Summary
- Split `src/tools/delegate-task/constants.ts` (654 LOC, 6 responsibilities) into 5 focused modules: `default-categories.ts`, `category-descriptions.ts`, `category-prompt-appends.ts`, `plan-agent-prompt.ts`, `plan-agent-identity.ts`
- Extract `CATEGORY_MODEL_REQUIREMENTS` from `src/shared/model-requirements.ts` (311 LOC) into `category-model-requirements.ts`, bringing both files under the 200 LOC limit
- Convert original files to barrel re-exports for 100% backward compatibility (zero consumer changes)
## Motivation
Both files violate the project's 200 LOC modular-code-enforcement rule. `constants.ts` mixed 6 unrelated responsibilities (category configs, prompt templates, plan agent builders, identity utils). `model-requirements.ts` mixed agent and category model requirements.
## Changes
### `src/tools/delegate-task/`
| New File | Responsibility |
|----------|---------------|
| `default-categories.ts` | `DEFAULT_CATEGORIES` record |
| `category-descriptions.ts` | `CATEGORY_DESCRIPTIONS` record |
| `category-prompt-appends.ts` | 8 prompt template constants + `CATEGORY_PROMPT_APPENDS` map |
| `plan-agent-prompt.ts` | Plan agent system prompts + builder functions |
| `plan-agent-identity.ts` | `isPlanAgent`, `isPlanFamily` + name lists |
`constants.ts` is now a barrel re-export file (~25 LOC).
### `src/shared/`
| New File | Responsibility |
|----------|---------------|
| `category-model-requirements.ts` | `CATEGORY_MODEL_REQUIREMENTS` record |
`model-requirements.ts` retains types + `AGENT_MODEL_REQUIREMENTS` and re-exports `CATEGORY_MODEL_REQUIREMENTS`.
## Backward Compatibility
All existing import paths (`from "./constants"`, `from "../../tools/delegate-task/constants"`, `from "../../shared/model-requirements"`) continue to work unchanged. Zero consumer files modified.
## Testing
- `bun run typecheck` passes
- `bun test` passes (existing `tools.test.ts` validates all re-exported symbols)
- `bun run build` succeeds

View File

@@ -0,0 +1,128 @@
# Verification Strategy
## 1. Type Safety
### 1a. LSP diagnostics on all new files
```
lsp_diagnostics("src/tools/delegate-task/default-categories.ts")
lsp_diagnostics("src/tools/delegate-task/category-descriptions.ts")
lsp_diagnostics("src/tools/delegate-task/category-prompt-appends.ts")
lsp_diagnostics("src/tools/delegate-task/plan-agent-prompt.ts")
lsp_diagnostics("src/tools/delegate-task/plan-agent-identity.ts")
lsp_diagnostics("src/shared/category-model-requirements.ts")
```
### 1b. LSP diagnostics on modified files
```
lsp_diagnostics("src/tools/delegate-task/constants.ts")
lsp_diagnostics("src/shared/model-requirements.ts")
```
### 1c. Full typecheck
```bash
bun run typecheck
```
Expected: 0 errors. This confirms all 14 consumer files (8 internal + 6 external) resolve their imports correctly through the barrel re-exports.
## 2. Behavioral Regression
### 2a. Existing test suite
```bash
bun test src/tools/delegate-task/tools.test.ts
```
This test file imports `DEFAULT_CATEGORIES`, `CATEGORY_PROMPT_APPENDS`, `CATEGORY_DESCRIPTIONS`, `isPlanAgent`, `PLAN_AGENT_NAMES`, `isPlanFamily`, `PLAN_FAMILY_NAMES` from `./constants`. If the barrel re-export is correct, all these tests pass unchanged.
### 2b. Category resolver tests
```bash
bun test src/tools/delegate-task/category-resolver.test.ts
```
This exercises `resolveCategoryConfig()` which imports `DEFAULT_CATEGORIES` and `CATEGORY_PROMPT_APPENDS` from `./constants` and `CATEGORY_MODEL_REQUIREMENTS` from `../../shared/model-requirements`.
### 2c. Model selection tests
```bash
bun test src/tools/delegate-task/model-selection.test.ts
```
### 2d. Merge categories tests
```bash
bun test src/shared/merge-categories.test.ts
```
Imports `DEFAULT_CATEGORIES` from `../tools/delegate-task/constants` (external path).
### 2e. Full test suite
```bash
bun test
```
## 3. Build Verification
```bash
bun run build
```
Confirms ESM bundle + declarations emit correctly with the new file structure.
## 4. Export Completeness Verification
### 4a. Verify `constants.ts` re-exports match original exports
Cross-check that every symbol previously exported from `constants.ts` is still exported. The original file exported these symbols:
- `VISUAL_CATEGORY_PROMPT_APPEND`
- `ULTRABRAIN_CATEGORY_PROMPT_APPEND`
- `ARTISTRY_CATEGORY_PROMPT_APPEND`
- `QUICK_CATEGORY_PROMPT_APPEND`
- `UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND`
- `UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND`
- `WRITING_CATEGORY_PROMPT_APPEND`
- `DEEP_CATEGORY_PROMPT_APPEND`
- `DEFAULT_CATEGORIES`
- `CATEGORY_PROMPT_APPENDS`
- `CATEGORY_DESCRIPTIONS`
- `PLAN_AGENT_SYSTEM_PREPEND_STATIC_BEFORE_SKILLS`
- `PLAN_AGENT_SYSTEM_PREPEND_STATIC_AFTER_SKILLS`
- `buildPlanAgentSkillsSection`
- `buildPlanAgentSystemPrepend`
- `PLAN_AGENT_NAMES`
- `isPlanAgent`
- `PLAN_FAMILY_NAMES`
- `isPlanFamily`
All 19 must be re-exported from the barrel.
### 4b. Verify `model-requirements.ts` re-exports match original exports
Original exports: `FallbackEntry`, `ModelRequirement`, `AGENT_MODEL_REQUIREMENTS`, `CATEGORY_MODEL_REQUIREMENTS`. All 4 must still be available.
## 5. LOC Compliance Check
Verify each new file is under 200 LOC (excluding prompt template text per modular-code-enforcement rule):
| File | Expected Total LOC | Non-prompt LOC | Compliant? |
|------|-------------------|----------------|------------|
| `default-categories.ts` | ~15 | ~15 | Yes |
| `category-descriptions.ts` | ~12 | ~12 | Yes |
| `category-prompt-appends.ts` | ~280 | ~15 | Yes (prompt exempt) |
| `plan-agent-prompt.ts` | ~270 | ~40 | Yes (prompt exempt) |
| `plan-agent-identity.ts` | ~35 | ~35 | Yes |
| `category-model-requirements.ts` | ~150 | ~150 | Yes |
| `model-requirements.ts` (after) | ~165 | ~165 | Yes |
| `constants.ts` (after) | ~25 | ~25 | Yes |
## 6. Consumer Impact Matrix
Verify zero consumer files need changes:
| Consumer File | Import Path | Should Still Work? |
|--------------|-------------|-------------------|
| `delegate-task/categories.ts` | `./constants` | Yes (barrel) |
| `delegate-task/tools.ts` | `./constants` | Yes (barrel) |
| `delegate-task/tools.test.ts` | `./constants` | Yes (barrel) |
| `delegate-task/prompt-builder.ts` | `./constants` | Yes (barrel) |
| `delegate-task/subagent-resolver.ts` | `./constants` | Yes (barrel) |
| `delegate-task/sync-continuation.ts` | `./constants` | Yes (barrel) |
| `delegate-task/sync-prompt-sender.ts` | `./constants` | Yes (barrel) |
| `delegate-task/index.ts` | `./constants` | Yes (barrel) |
| `agents/atlas/prompt-section-builder.ts` | `../../tools/delegate-task/constants` | Yes (barrel) |
| `agents/builtin-agents.ts` | `../tools/delegate-task/constants` | Yes (barrel) |
| `plugin/available-categories.ts` | `../tools/delegate-task/constants` | Yes (barrel) |
| `plugin-handlers/category-config-resolver.ts` | `../tools/delegate-task/constants` | Yes (barrel) |
| `shared/merge-categories.ts` | `../tools/delegate-task/constants` | Yes (barrel) |
| `shared/merge-categories.test.ts` | `../tools/delegate-task/constants` | Yes (barrel) |
| `delegate-task/categories.ts` | `../../shared/model-requirements` | Yes (re-export) |

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 229000, "total_duration_seconds": 229}

View File

@@ -0,0 +1,32 @@
{
"eval_id": 4,
"eval_name": "new-mcp-arxiv-casual",
"prompt": "implement issue #100 - we need to add a new built-in MCP for arxiv paper search. just the basic search endpoint, nothing fancy. pr it",
"assertions": [
{
"id": "worktree-isolation",
"text": "Plan uses git worktree in a sibling directory",
"type": "manual"
},
{
"id": "follows-mcp-pattern",
"text": "New MCP follows existing pattern from src/mcp/ (websearch, context7, grep_app)",
"type": "manual"
},
{
"id": "three-gates",
"text": "Verification loop includes all 3 gates",
"type": "manual"
},
{
"id": "pr-targets-dev",
"text": "PR targets dev branch",
"type": "manual"
},
{
"id": "local-validation",
"text": "Runs local checks before pushing",
"type": "manual"
}
]
}

View File

@@ -0,0 +1,10 @@
{
"run_id": "eval-4-with_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": true, "evidence": "../omo-wt/feat/arxiv-mcp"},
{"text": "New MCP follows existing pattern from src/mcp/", "passed": true, "evidence": "Follows context7.ts and grep-app.ts static export pattern"},
{"text": "Verification loop includes all 3 gates", "passed": true, "evidence": "Gate A (CI), Gate B (review-work 5 agents), Gate C (Cubic)"},
{"text": "PR targets dev branch", "passed": true, "evidence": "--base dev"},
{"text": "Runs local checks before pushing", "passed": true, "evidence": "bun run typecheck, bun test src/mcp/, bun run build"}
]
}

View File

@@ -0,0 +1,143 @@
# Code Changes: Issue #100 - Built-in arXiv MCP
## 1. NEW FILE: `src/mcp/arxiv.ts`
```typescript
export const arxiv = {
type: "remote" as const,
url: "https://mcp.arxiv.org",
enabled: true,
oauth: false as const,
}
```
Pattern: identical to `grep-app.ts` (static export, no auth, no config factory needed).
## 2. MODIFY: `src/mcp/types.ts`
```typescript
import { z } from "zod"
export const McpNameSchema = z.enum(["websearch", "context7", "grep_app", "arxiv"])
export type McpName = z.infer<typeof McpNameSchema>
export const AnyMcpNameSchema = z.string().min(1)
export type AnyMcpName = z.infer<typeof AnyMcpNameSchema>
```
Change: add `"arxiv"` to `McpNameSchema` enum.
## 3. MODIFY: `src/mcp/index.ts`
```typescript
import { createWebsearchConfig } from "./websearch"
import { context7 } from "./context7"
import { grep_app } from "./grep-app"
import { arxiv } from "./arxiv"
import type { OhMyOpenCodeConfig } from "../config/schema"
export { McpNameSchema, type McpName } from "./types"
type RemoteMcpConfig = {
type: "remote"
url: string
enabled: boolean
headers?: Record<string, string>
oauth?: false
}
export function createBuiltinMcps(disabledMcps: string[] = [], config?: OhMyOpenCodeConfig) {
const mcps: Record<string, RemoteMcpConfig> = {}
if (!disabledMcps.includes("websearch")) {
mcps.websearch = createWebsearchConfig(config?.websearch)
}
if (!disabledMcps.includes("context7")) {
mcps.context7 = context7
}
if (!disabledMcps.includes("grep_app")) {
mcps.grep_app = grep_app
}
if (!disabledMcps.includes("arxiv")) {
mcps.arxiv = arxiv
}
return mcps
}
```
Changes: import `arxiv`, add conditional block.
## 4. NEW FILE: `src/mcp/arxiv.test.ts`
```typescript
import { describe, expect, test } from "bun:test"
import { arxiv } from "./arxiv"
describe("arxiv MCP configuration", () => {
test("should have correct remote config shape", () => {
// given
// arxiv is a static export
// when
const config = arxiv
// then
expect(config.type).toBe("remote")
expect(config.url).toBe("https://mcp.arxiv.org")
expect(config.enabled).toBe(true)
expect(config.oauth).toBe(false)
})
})
```
## 5. MODIFY: `src/mcp/index.test.ts`
Changes needed:
- Test "should return all MCPs when disabled_mcps is empty": add `expect(result).toHaveProperty("arxiv")`, change length to 4
- Test "should filter out all built-in MCPs when all disabled": add `"arxiv"` to disabledMcps array, add `expect(result).not.toHaveProperty("arxiv")`
- Test "should handle empty disabled_mcps by default": add `expect(result).toHaveProperty("arxiv")`, change length to 4
- Test "should only filter built-in MCPs, ignoring unknown names": add `expect(result).toHaveProperty("arxiv")`, change length to 4
New test to add:
```typescript
test("should filter out arxiv when disabled", () => {
// given
const disabledMcps = ["arxiv"]
// when
const result = createBuiltinMcps(disabledMcps)
// then
expect(result).toHaveProperty("websearch")
expect(result).toHaveProperty("context7")
expect(result).toHaveProperty("grep_app")
expect(result).not.toHaveProperty("arxiv")
expect(Object.keys(result)).toHaveLength(3)
})
```
## 6. MODIFY: `src/mcp/AGENTS.md`
Add row to built-in MCPs table:
```
| **arxiv** | `mcp.arxiv.org` | None | arXiv paper search |
```
## Files touched summary
| File | Action |
|------|--------|
| `src/mcp/arxiv.ts` | NEW |
| `src/mcp/arxiv.test.ts` | NEW |
| `src/mcp/types.ts` | MODIFY (add enum value) |
| `src/mcp/index.ts` | MODIFY (import + conditional block) |
| `src/mcp/index.test.ts` | MODIFY (update counts + new test) |
| `src/mcp/AGENTS.md` | MODIFY (add table row) |

View File

@@ -0,0 +1,82 @@
# Execution Plan: Issue #100 - Built-in arXiv MCP
## Phase 0: Setup
1. `git fetch origin dev`
2. `git worktree add ../omo-wt/feat/arxiv-mcp origin/dev`
3. `cd ../omo-wt/feat/arxiv-mcp`
4. `git checkout -b feat/arxiv-mcp`
## Phase 1: Implement
### Step 1: Create `src/mcp/arxiv.ts`
- Follow static export pattern (same as `context7.ts` and `grep-app.ts`)
- arXiv API is public, no auth needed
- URL: `https://mcp.arxiv.org` (hypothetical remote MCP endpoint)
- If no remote MCP exists for arXiv, this would need to be a stdio MCP or a custom HTTP wrapper. For this plan, we assume a remote MCP endpoint pattern consistent with existing built-ins.
### Step 2: Update `src/mcp/types.ts`
- Add `"arxiv"` to `McpNameSchema` enum: `z.enum(["websearch", "context7", "grep_app", "arxiv"])`
### Step 3: Update `src/mcp/index.ts`
- Import `arxiv` from `"./arxiv"`
- Add conditional block in `createBuiltinMcps()`:
```typescript
if (!disabledMcps.includes("arxiv")) {
mcps.arxiv = arxiv
}
```
### Step 4: Create `src/mcp/arxiv.test.ts`
- Test arXiv config shape (type, url, enabled, oauth)
- Follow pattern from existing tests (given/when/then)
### Step 5: Update `src/mcp/index.test.ts`
- Update expected MCP count from 3 to 4
- Add `"arxiv"` to `toHaveProperty` checks
- Add `"arxiv"` to the "all disabled" test case
### Step 6: Update `src/mcp/AGENTS.md`
- Add arxiv row to the built-in MCPs table
### Step 7: Local validation
- `bun run typecheck`
- `bun test src/mcp/`
- `bun run build`
### Atomic commits (in order):
1. `feat(mcp): add arxiv paper search built-in MCP` - arxiv.ts + types.ts update
2. `test(mcp): add arxiv MCP tests` - arxiv.test.ts + index.test.ts updates
3. `docs(mcp): update AGENTS.md with arxiv MCP` - AGENTS.md update
## Phase 2: PR Creation
1. `git push -u origin feat/arxiv-mcp`
2. `gh pr create --base dev --title "feat(mcp): add built-in arXiv paper search MCP" --body-file /tmp/pull-request-arxiv-mcp-*.md`
## Phase 3: Verify Loop
### Gate A: CI
- Wait for `ci.yml` workflow (tests, typecheck, build)
- `gh run watch` or poll `gh pr checks`
### Gate B: review-work
- Run `/review-work` skill (5-agent parallel review)
- All 5 agents must pass: Oracle (goal), Oracle (code quality), Oracle (security), QA execution, context mining
### Gate C: Cubic
- Wait for cubic-dev-ai[bot] automated review
- Must show "No issues found"
- If issues found, fix and re-push
### Failure handling:
- Gate A fail: fix locally, amend or new commit, re-push
- Gate B fail: address review-work findings, new commit
- Gate C fail: address Cubic findings, new commit
- Re-enter verify loop from Gate A
## Phase 4: Merge
1. `gh pr merge --squash --delete-branch`
2. `git worktree remove ../omo-wt/feat/arxiv-mcp`
3. `git branch -D feat/arxiv-mcp` (if not auto-deleted)

View File

@@ -0,0 +1,51 @@
# PR: feat(mcp): add built-in arXiv paper search MCP
## Title
`feat(mcp): add built-in arXiv paper search MCP`
## Body
```markdown
## Summary
Closes #100
- Add `arxiv` as 4th built-in remote MCP for arXiv paper search
- Follows existing static export pattern (same as `grep_app`, `context7`)
- No auth required, disableable via `disabled_mcps: ["arxiv"]`
## Changes
- `src/mcp/arxiv.ts` - new MCP config (static export, remote type)
- `src/mcp/types.ts` - add `"arxiv"` to `McpNameSchema` enum
- `src/mcp/index.ts` - register arxiv in `createBuiltinMcps()`
- `src/mcp/arxiv.test.ts` - config shape tests
- `src/mcp/index.test.ts` - update counts, add disable test
- `src/mcp/AGENTS.md` - document new MCP
## Usage
Enabled by default. Disable with:
```jsonc
// .opencode/oh-my-opencode.jsonc
{
"disabled_mcps": ["arxiv"]
}
```
## Validation
- [x] `bun run typecheck` passes
- [x] `bun test src/mcp/` passes
- [x] `bun run build` passes
```
## Labels
`enhancement`, `mcp`
## Base branch
`dev`

View File

@@ -0,0 +1,69 @@
# Verification Strategy: Issue #100 - arXiv MCP
## Gate A: CI (`ci.yml`)
### What runs
- `bun test` (split: mock-heavy isolated + batch) - must include new `arxiv.test.ts` and updated `index.test.ts`
- `bun run typecheck` - validates `McpNameSchema` enum change propagates correctly
- `bun run build` - ensures no build regressions
### How to monitor
```bash
gh pr checks <pr-number> --watch
```
### Failure scenarios
| Failure | Likely cause | Fix |
|---------|-------------|-----|
| Type error in `types.ts` | Enum value not matching downstream consumers | Check all `McpName` usages via `lsp_find_references` |
| Test count mismatch in `index.test.ts` | Forgot to update `toHaveLength()` from 3 to 4 | Update all length assertions |
| Build failure | Import path or barrel export issue | Verify `src/mcp/index.ts` exports are clean |
### Retry
Fix locally in worktree, new commit, `git push`.
## Gate B: review-work (5-agent)
### Agents and focus areas
| Agent | What it checks for this PR |
|-------|--------------------------|
| Oracle (goal) | Does arxiv MCP satisfy issue #100 requirements? |
| Oracle (code quality) | Follows `grep-app.ts` pattern? No SRP violations? < 200 LOC? |
| Oracle (security) | No credentials hardcoded, no auth bypass |
| QA (execution) | Run tests, verify disable mechanism works |
| Context (mining) | Check issue #100 for any missed requirements |
### Pass criteria
All 5 must pass. Any single failure blocks.
### Failure handling
- Read each agent's report
- Address findings with new atomic commits
- Re-run full verify loop from Gate A
## Gate C: Cubic (`cubic-dev-ai[bot]`)
### Expected review scope
- Config shape consistency across MCPs
- Test coverage for new MCP
- Schema type safety
### Pass criteria
Comment from `cubic-dev-ai[bot]` containing "No issues found".
### Failure handling
- Read Cubic's specific findings
- Fix with new commit
- Re-push, re-enter Gate A
## Pre-merge checklist
- [ ] Gate A: CI green
- [ ] Gate B: All 5 review-work agents pass
- [ ] Gate C: Cubic "No issues found"
- [ ] No unresolved review comments
- [ ] PR has at least 1 approval (if required by branch protection)
## Post-merge
1. `gh pr merge --squash --delete-branch`
2. `git worktree remove ../omo-wt/feat/arxiv-mcp`
3. Verify merge commit on `dev` branch

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 152000, "total_duration_seconds": 152}

View File

@@ -0,0 +1,10 @@
{
"run_id": "eval-4-without_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": true, "evidence": "git worktree add ../omo-arxiv-mcp dev — agent independently chose worktree"},
{"text": "New MCP follows existing pattern from src/mcp/", "passed": true, "evidence": "Follows grep-app.ts pattern"},
{"text": "Verification loop includes all 3 gates", "passed": false, "evidence": "Only mentions bun test/typecheck/build. No review-work or Cubic."},
{"text": "PR targets dev branch", "passed": true, "evidence": "--base dev"},
{"text": "Runs local checks before pushing", "passed": true, "evidence": "bun test src/mcp/, bun run typecheck, bun run build"}
]
}

View File

@@ -0,0 +1,252 @@
# Code Changes: Built-in arXiv MCP
## 1. NEW FILE: `src/mcp/arxiv.ts`
```typescript
export const arxiv = {
type: "remote" as const,
url: "https://mcp.arxiv.org",
enabled: true,
oauth: false as const,
}
```
> **Note:** The URL `https://mcp.arxiv.org` is a placeholder. The actual endpoint needs to be verified. If no hosted arXiv MCP exists, alternatives include community-hosted servers or a self-hosted wrapper around the arXiv REST API (`export.arxiv.org/api/query`). This would be the single blocker requiring resolution before merging.
Pattern followed: `grep-app.ts` (static export, no auth, no config factory needed since arXiv API is public).
---
## 2. MODIFY: `src/mcp/types.ts`
```diff
import { z } from "zod"
-export const McpNameSchema = z.enum(["websearch", "context7", "grep_app"])
+export const McpNameSchema = z.enum(["websearch", "context7", "grep_app", "arxiv"])
export type McpName = z.infer<typeof McpNameSchema>
export const AnyMcpNameSchema = z.string().min(1)
export type AnyMcpName = z.infer<typeof AnyMcpNameSchema>
```
---
## 3. MODIFY: `src/mcp/index.ts`
```diff
import { createWebsearchConfig } from "./websearch"
import { context7 } from "./context7"
import { grep_app } from "./grep-app"
+import { arxiv } from "./arxiv"
import type { OhMyOpenCodeConfig } from "../config/schema"
-export { McpNameSchema, type McpName } from "./types"
+export { McpNameSchema, type McpName } from "./types"
type RemoteMcpConfig = {
type: "remote"
url: string
enabled: boolean
headers?: Record<string, string>
oauth?: false
}
export function createBuiltinMcps(disabledMcps: string[] = [], config?: OhMyOpenCodeConfig) {
const mcps: Record<string, RemoteMcpConfig> = {}
if (!disabledMcps.includes("websearch")) {
mcps.websearch = createWebsearchConfig(config?.websearch)
}
if (!disabledMcps.includes("context7")) {
mcps.context7 = context7
}
if (!disabledMcps.includes("grep_app")) {
mcps.grep_app = grep_app
}
+ if (!disabledMcps.includes("arxiv")) {
+ mcps.arxiv = arxiv
+ }
+
return mcps
}
```
---
## 4. MODIFY: `src/mcp/index.test.ts`
Changes needed in existing tests (count 3 → 4) plus one new test:
```diff
describe("createBuiltinMcps", () => {
test("should return all MCPs when disabled_mcps is empty", () => {
// given
const disabledMcps: string[] = []
// when
const result = createBuiltinMcps(disabledMcps)
// then
expect(result).toHaveProperty("websearch")
expect(result).toHaveProperty("context7")
expect(result).toHaveProperty("grep_app")
- expect(Object.keys(result)).toHaveLength(3)
+ expect(result).toHaveProperty("arxiv")
+ expect(Object.keys(result)).toHaveLength(4)
})
test("should filter out disabled built-in MCPs", () => {
// given
const disabledMcps = ["context7"]
// when
const result = createBuiltinMcps(disabledMcps)
// then
expect(result).toHaveProperty("websearch")
expect(result).not.toHaveProperty("context7")
expect(result).toHaveProperty("grep_app")
- expect(Object.keys(result)).toHaveLength(2)
+ expect(result).toHaveProperty("arxiv")
+ expect(Object.keys(result)).toHaveLength(3)
})
test("should filter out all built-in MCPs when all disabled", () => {
// given
- const disabledMcps = ["websearch", "context7", "grep_app"]
+ const disabledMcps = ["websearch", "context7", "grep_app", "arxiv"]
// when
const result = createBuiltinMcps(disabledMcps)
// then
expect(result).not.toHaveProperty("websearch")
expect(result).not.toHaveProperty("context7")
expect(result).not.toHaveProperty("grep_app")
+ expect(result).not.toHaveProperty("arxiv")
expect(Object.keys(result)).toHaveLength(0)
})
test("should ignore custom MCP names in disabled_mcps", () => {
// given
const disabledMcps = ["context7", "playwright", "custom"]
// when
const result = createBuiltinMcps(disabledMcps)
// then
expect(result).toHaveProperty("websearch")
expect(result).not.toHaveProperty("context7")
expect(result).toHaveProperty("grep_app")
- expect(Object.keys(result)).toHaveLength(2)
+ expect(result).toHaveProperty("arxiv")
+ expect(Object.keys(result)).toHaveLength(3)
})
test("should handle empty disabled_mcps by default", () => {
// given
// when
const result = createBuiltinMcps()
// then
expect(result).toHaveProperty("websearch")
expect(result).toHaveProperty("context7")
expect(result).toHaveProperty("grep_app")
- expect(Object.keys(result)).toHaveLength(3)
+ expect(result).toHaveProperty("arxiv")
+ expect(Object.keys(result)).toHaveLength(4)
})
test("should only filter built-in MCPs, ignoring unknown names", () => {
// given
const disabledMcps = ["playwright", "sqlite", "unknown-mcp"]
// when
const result = createBuiltinMcps(disabledMcps)
// then
expect(result).toHaveProperty("websearch")
expect(result).toHaveProperty("context7")
expect(result).toHaveProperty("grep_app")
- expect(Object.keys(result)).toHaveLength(3)
+ expect(result).toHaveProperty("arxiv")
+ expect(Object.keys(result)).toHaveLength(4)
})
+ test("should filter out arxiv when disabled", () => {
+ // given
+ const disabledMcps = ["arxiv"]
+
+ // when
+ const result = createBuiltinMcps(disabledMcps)
+
+ // then
+ expect(result).toHaveProperty("websearch")
+ expect(result).toHaveProperty("context7")
+ expect(result).toHaveProperty("grep_app")
+ expect(result).not.toHaveProperty("arxiv")
+ expect(Object.keys(result)).toHaveLength(3)
+ })
+
// ... existing tavily test unchanged
})
```
---
## 5. MODIFY: `src/mcp/AGENTS.md`
```diff
-# src/mcp/ — 3 Built-in Remote MCPs
+# src/mcp/ — 4 Built-in Remote MCPs
**Generated:** 2026-03-06
## OVERVIEW
-Tier 1 of the three-tier MCP system. 3 remote HTTP MCPs created via `createBuiltinMcps(disabledMcps, config)`.
+Tier 1 of the three-tier MCP system. 4 remote HTTP MCPs created via `createBuiltinMcps(disabledMcps, config)`.
## BUILT-IN MCPs
| Name | URL | Env Vars | Tools |
|------|-----|----------|-------|
| **websearch** | `mcp.exa.ai` (default) or `mcp.tavily.com` | `EXA_API_KEY` (optional), `TAVILY_API_KEY` (if tavily) | Web search |
| **context7** | `mcp.context7.com/mcp` | `CONTEXT7_API_KEY` (optional) | Library documentation |
| **grep_app** | `mcp.grep.app` | None | GitHub code search |
+| **arxiv** | `mcp.arxiv.org` | None | arXiv paper search |
...
## FILES
| File | Purpose |
|------|---------|
| `index.ts` | `createBuiltinMcps()` factory |
-| `types.ts` | `McpNameSchema`: "websearch" \| "context7" \| "grep_app" |
+| `types.ts` | `McpNameSchema`: "websearch" \| "context7" \| "grep_app" \| "arxiv" |
| `websearch.ts` | Exa/Tavily provider with config |
| `context7.ts` | Context7 with optional auth header |
| `grep-app.ts` | Grep.app (no auth) |
+| `arxiv.ts` | arXiv paper search (no auth) |
```
---
## Summary of Touched Files
| File | Lines Changed | Type |
|------|--------------|------|
| `src/mcp/arxiv.ts` | +6 (new) | Create |
| `src/mcp/types.ts` | 1 line modified | Modify |
| `src/mcp/index.ts` | +5 (import + block) | Modify |
| `src/mcp/index.test.ts` | ~20 lines (count fixes + new test) | Modify |
| `src/mcp/AGENTS.md` | ~6 lines | Modify |
Total: ~37 lines added/modified across 5 files. Minimal, surgical change.

View File

@@ -0,0 +1,83 @@
# Execution Plan: Add Built-in arXiv MCP (Issue #100)
## Pre-Implementation
1. **Create worktree + branch**
```bash
git worktree add ../omo-arxiv-mcp dev
cd ../omo-arxiv-mcp
git checkout -b feat/arxiv-mcp
```
2. **Verify arXiv MCP endpoint exists**
- The arXiv API is public (`export.arxiv.org/api/query`) but has no native MCP endpoint
- Need to identify a hosted remote MCP server for arXiv (e.g., community-maintained or self-hosted)
- If no hosted endpoint exists, consider alternatives: (a) use a community-hosted one from the MCP registry, (b) flag this in the PR and propose a follow-up for hosting
- For this plan, assume a remote MCP endpoint at a URL like `https://mcp.arxiv.org` or a third-party equivalent
## Implementation Steps (4 files to modify, 2 files to create)
### Step 1: Create `src/mcp/arxiv.ts`
- Follow the `grep-app.ts` pattern (simplest: static export, no auth, no config)
- arXiv API is public, so no API key needed
- Export a `const arxiv` with `type: "remote"`, `url`, `enabled: true`, `oauth: false`
### Step 2: Update `src/mcp/types.ts`
- Add `"arxiv"` to the `McpNameSchema` z.enum array
- This makes it a recognized built-in MCP name
### Step 3: Update `src/mcp/index.ts`
- Import `arxiv` from `"./arxiv"`
- Add the `if (!disabledMcps.includes("arxiv"))` block inside `createBuiltinMcps()`
- Place it after `grep_app` block (alphabetical among new additions, or last)
### Step 4: Update `src/mcp/index.test.ts`
- Update test "should return all MCPs when disabled_mcps is empty" to expect 4 MCPs instead of 3
- Update test "should filter out all built-in MCPs when all disabled" to include "arxiv" in the disabled list and expect it not present
- Update test "should handle empty disabled_mcps by default" to expect 4 MCPs
- Update test "should only filter built-in MCPs, ignoring unknown names" to expect 4 MCPs
- Add new test: "should filter out arxiv when disabled"
### Step 5: Create `src/mcp/arxiv.test.ts` (optional, only if factory pattern used)
- If using static export (like grep-app), no separate test file needed
- If using factory with config, add tests following `websearch.test.ts` pattern
### Step 6: Update `src/mcp/AGENTS.md`
- Add arxiv to the built-in MCPs table
- Update "3 Built-in Remote MCPs" to "4 Built-in Remote MCPs"
- Add arxiv to the FILES table
## Post-Implementation
### Verification
```bash
bun test src/mcp/ # Run MCP tests
bun run typecheck # Verify no type errors
bun run build # Verify build passes
```
### PR Creation
```bash
git add src/mcp/arxiv.ts src/mcp/types.ts src/mcp/index.ts src/mcp/index.test.ts src/mcp/AGENTS.md
git commit -m "feat(mcp): add built-in arxiv paper search MCP"
git push -u origin feat/arxiv-mcp
gh pr create --title "feat(mcp): add built-in arxiv paper search MCP" --body-file /tmp/pull-request-arxiv-mcp-....md --base dev
```
## Risk Assessment
| Risk | Likelihood | Mitigation |
|------|-----------|------------|
| No hosted arXiv MCP endpoint exists | Medium | Research MCP registries; worst case, create a minimal hosted wrapper or use a community server |
| Existing tests break due to MCP count change | Low | Update hardcoded count assertions from 3 to 4 |
| Config schema needs updates | None | `disabled_mcps` uses `AnyMcpNameSchema` (any string), not `McpNameSchema`, so no schema change needed for disable functionality |
## Files Changed Summary
| File | Action | Description |
|------|--------|-------------|
| `src/mcp/arxiv.ts` | Create | Static remote MCP config export |
| `src/mcp/types.ts` | Modify | Add "arxiv" to McpNameSchema enum |
| `src/mcp/index.ts` | Modify | Import + register in createBuiltinMcps() |
| `src/mcp/index.test.ts` | Modify | Update count assertions, add arxiv-specific test |
| `src/mcp/AGENTS.md` | Modify | Update docs to reflect 4 MCPs |

View File

@@ -0,0 +1,33 @@
## Summary
- Add `arxiv` as a 4th built-in remote MCP for arXiv paper search
- Follows the `grep-app.ts` pattern: static export, no auth required (arXiv API is public)
- Fully integrated with `disabled_mcps` config and `McpNameSchema` validation
## Changes
| File | Change |
|------|--------|
| `src/mcp/arxiv.ts` | New remote MCP config pointing to arXiv MCP endpoint |
| `src/mcp/types.ts` | Add `"arxiv"` to `McpNameSchema` enum |
| `src/mcp/index.ts` | Import + register arxiv in `createBuiltinMcps()` |
| `src/mcp/index.test.ts` | Update count assertions (3 → 4), add arxiv disable test |
| `src/mcp/AGENTS.md` | Update docs to reflect 4 built-in MCPs |
## How to Test
```bash
bun test src/mcp/
```
## How to Disable
```jsonc
// Method 1: disabled_mcps
{ "disabled_mcps": ["arxiv"] }
// Method 2: enabled flag
{ "mcp": { "arxiv": { "enabled": false } } }
```
Closes #100

View File

@@ -0,0 +1,101 @@
# Verification Strategy: arXiv MCP
## 1. Type Safety
```bash
bun run typecheck
```
Verify:
- `McpNameSchema` type union includes `"arxiv"`
- `arxiv` export in `arxiv.ts` matches `RemoteMcpConfig` shape
- Import in `index.ts` resolves correctly
- No new type errors introduced
## 2. Unit Tests
```bash
bun test src/mcp/
```
### Existing test updates verified:
- `index.test.ts`: All 7 existing tests pass with updated count (3 → 4)
- `websearch.test.ts`: Unchanged, still passes (no side effects)
### New test coverage:
- `index.test.ts`: New test "should filter out arxiv when disabled" passes
- Arxiv appears in all "all MCPs" assertions
- Arxiv excluded when in `disabled_mcps`
## 3. Build Verification
```bash
bun run build
```
Verify:
- ESM bundle includes `arxiv.ts` module
- Type declarations emitted for `arxiv` export
- No build errors
## 4. Integration Check
### Config disable path
- Add `"arxiv"` to `disabled_mcps` in test config → verify MCP excluded from `createBuiltinMcps()` output
- This is already covered by the unit test, but can be manually verified:
```typescript
import { createBuiltinMcps } from "./src/mcp"
const withArxiv = createBuiltinMcps([])
console.log(Object.keys(withArxiv)) // ["websearch", "context7", "grep_app", "arxiv"]
const withoutArxiv = createBuiltinMcps(["arxiv"])
console.log(Object.keys(withoutArxiv)) // ["websearch", "context7", "grep_app"]
```
### MCP config handler path
- `mcp-config-handler.ts` calls `createBuiltinMcps()` and merges results
- No changes needed there; arxiv automatically included in the merge
- Verify by checking `applyMcpConfig()` output includes arxiv when not disabled
## 5. LSP Diagnostics
```bash
# Run on all changed files
```
Check `lsp_diagnostics` on:
- `src/mcp/arxiv.ts`
- `src/mcp/types.ts`
- `src/mcp/index.ts`
- `src/mcp/index.test.ts`
All must return 0 errors.
## 6. Endpoint Verification (Manual / Pre-merge)
**Critical:** Before merging, verify the arXiv MCP endpoint URL is actually reachable:
```bash
curl -s -o /dev/null -w "%{http_code}" https://mcp.arxiv.org
```
If the endpoint doesn't exist or returns non-2xx, the MCP will silently fail at runtime (MCP framework handles connection errors gracefully). This is acceptable for a built-in MCP but should be documented.
## 7. Regression Check
Verify no existing functionality is broken:
- `bun test` (full suite) passes
- Existing 3 MCPs (websearch, context7, grep_app) still work
- `disabled_mcps` config still works for all MCPs
- `mcp-config-handler.test.ts` passes (if it has count-based assertions, update them)
## Checklist
- [ ] `bun run typecheck` passes
- [ ] `bun test src/mcp/` passes (all tests green)
- [ ] `bun run build` succeeds
- [ ] `lsp_diagnostics` clean on all 4 changed files
- [ ] arXiv MCP endpoint URL verified reachable
- [ ] No hardcoded MCP count assertions broken elsewhere in codebase
- [ ] AGENTS.md updated to reflect 4 MCPs

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 197000, "total_duration_seconds": 197}

View File

@@ -0,0 +1,32 @@
{
"eval_id": 5,
"eval_name": "regex-fix-false-positive",
"prompt": "The comment-checker hook is too aggressive - it's flagging legitimate comments that happen to contain 'Note:' as AI slop. Relax the regex pattern and add test cases for the false positives. Work on a separate branch and make a PR.",
"assertions": [
{
"id": "worktree-isolation",
"text": "Plan uses git worktree in a sibling directory",
"type": "manual"
},
{
"id": "real-comment-checker-files",
"text": "References actual comment-checker hook files in the codebase",
"type": "manual"
},
{
"id": "regression-tests",
"text": "Adds test cases specifically for 'Note:' false positive scenarios",
"type": "manual"
},
{
"id": "three-gates",
"text": "Verification loop includes all 3 gates",
"type": "manual"
},
{
"id": "minimal-change",
"text": "Only modifies regex and adds tests — no unrelated changes",
"type": "manual"
}
]
}

View File

@@ -0,0 +1,10 @@
{
"run_id": "eval-5-with_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": true, "evidence": "../omo-wt/fix/comment-checker-note-false-positive"},
{"text": "References actual comment-checker hook files", "passed": true, "evidence": "Found Go binary, extracted 24 regex patterns, references cli.ts, cli-runner.ts, hook.ts"},
{"text": "Adds test cases for Note: false positive scenarios", "passed": true, "evidence": "Commit 3 dedicated to false positive test cases"},
{"text": "Verification loop includes all 3 gates", "passed": true, "evidence": "Gate A (CI), Gate B (review-work 5 agents), Gate C (Cubic)"},
{"text": "Only modifies regex and adds tests — no unrelated changes", "passed": false, "evidence": "Also proposes config schema change (exclude_patterns) and Go binary update — goes beyond minimal fix"}
]
}

View File

@@ -0,0 +1,387 @@
# Code Changes
## File 1: `src/config/schema/comment-checker.ts`
### Before
```typescript
import { z } from "zod"
export const CommentCheckerConfigSchema = z.object({
/** Custom prompt to replace the default warning message. Use {{comments}} placeholder for detected comments XML. */
custom_prompt: z.string().optional(),
})
export type CommentCheckerConfig = z.infer<typeof CommentCheckerConfigSchema>
```
### After
```typescript
import { z } from "zod"
export const CommentCheckerConfigSchema = z.object({
/** Custom prompt to replace the default warning message. Use {{comments}} placeholder for detected comments XML. */
custom_prompt: z.string().optional(),
/** Regex patterns to exclude from comment detection (e.g. ["^Note:", "^TODO:"]). Case-insensitive. */
exclude_patterns: z.array(z.string()).optional(),
})
export type CommentCheckerConfig = z.infer<typeof CommentCheckerConfigSchema>
```
---
## File 2: `src/hooks/comment-checker/cli.ts`
### Change: `runCommentChecker` function (line 151)
Add `excludePatterns` parameter and pass `--exclude-pattern` flags to the binary.
### Before (line 151)
```typescript
export async function runCommentChecker(input: HookInput, cliPath?: string, customPrompt?: string): Promise<CheckResult> {
const binaryPath = cliPath ?? resolvedCliPath ?? getCommentCheckerPathSync()
// ...
try {
const args = [binaryPath, "check"]
if (customPrompt) {
args.push("--prompt", customPrompt)
}
```
### After
```typescript
export async function runCommentChecker(
input: HookInput,
cliPath?: string,
customPrompt?: string,
excludePatterns?: string[],
): Promise<CheckResult> {
const binaryPath = cliPath ?? resolvedCliPath ?? getCommentCheckerPathSync()
// ...
try {
const args = [binaryPath, "check"]
if (customPrompt) {
args.push("--prompt", customPrompt)
}
if (excludePatterns) {
for (const pattern of excludePatterns) {
args.push("--exclude-pattern", pattern)
}
}
```
---
## File 3: `src/hooks/comment-checker/cli-runner.ts`
### Change: `processWithCli` function (line 43)
Add `excludePatterns` parameter threading.
### Before (line 43-79)
```typescript
export async function processWithCli(
input: { tool: string; sessionID: string; callID: string },
pendingCall: PendingCall,
output: { output: string },
cliPath: string,
customPrompt: string | undefined,
debugLog: (...args: unknown[]) => void,
): Promise<void> {
await withCommentCheckerLock(async () => {
// ...
const result = await runCommentChecker(hookInput, cliPath, customPrompt)
```
### After
```typescript
export async function processWithCli(
input: { tool: string; sessionID: string; callID: string },
pendingCall: PendingCall,
output: { output: string },
cliPath: string,
customPrompt: string | undefined,
debugLog: (...args: unknown[]) => void,
excludePatterns?: string[],
): Promise<void> {
await withCommentCheckerLock(async () => {
// ...
const result = await runCommentChecker(hookInput, cliPath, customPrompt, excludePatterns)
```
### Change: `processApplyPatchEditsWithCli` function (line 87)
Same pattern - thread `excludePatterns` through.
### Before (line 87-120)
```typescript
export async function processApplyPatchEditsWithCli(
sessionID: string,
edits: ApplyPatchEdit[],
output: { output: string },
cliPath: string,
customPrompt: string | undefined,
debugLog: (...args: unknown[]) => void,
): Promise<void> {
// ...
const result = await runCommentChecker(hookInput, cliPath, customPrompt)
```
### After
```typescript
export async function processApplyPatchEditsWithCli(
sessionID: string,
edits: ApplyPatchEdit[],
output: { output: string },
cliPath: string,
customPrompt: string | undefined,
debugLog: (...args: unknown[]) => void,
excludePatterns?: string[],
): Promise<void> {
// ...
const result = await runCommentChecker(hookInput, cliPath, customPrompt, excludePatterns)
```
---
## File 4: `src/hooks/comment-checker/hook.ts`
### Change: Thread `config.exclude_patterns` through to CLI calls
### Before (line 177)
```typescript
await processWithCli(input, pendingCall, output, cliPath, config?.custom_prompt, debugLog)
```
### After
```typescript
await processWithCli(input, pendingCall, output, cliPath, config?.custom_prompt, debugLog, config?.exclude_patterns)
```
### Before (line 147-154)
```typescript
await processApplyPatchEditsWithCli(
input.sessionID,
edits,
output,
cliPath,
config?.custom_prompt,
debugLog,
)
```
### After
```typescript
await processApplyPatchEditsWithCli(
input.sessionID,
edits,
output,
cliPath,
config?.custom_prompt,
debugLog,
config?.exclude_patterns,
)
```
---
## File 5: `src/hooks/comment-checker/cli.test.ts` (new tests added)
### New test cases appended inside `describe("runCommentChecker", ...)`
```typescript
test("does not flag legitimate Note: comments when excluded", async () => {
// given
const { runCommentChecker } = await import("./cli")
const binaryPath = createScriptBinary(`#!/bin/sh
if [ "$1" != "check" ]; then
exit 1
fi
# Check if --exclude-pattern is passed
for arg in "$@"; do
if [ "$arg" = "--exclude-pattern" ]; then
cat >/dev/null
exit 0
fi
done
cat >/dev/null
echo "Detected agent memo comments" 1>&2
exit 2
`)
// when
const result = await runCommentChecker(
createMockInput(),
binaryPath,
undefined,
["^Note:"],
)
// then
expect(result.hasComments).toBe(false)
})
test("passes multiple exclude patterns to binary", async () => {
// given
const { runCommentChecker } = await import("./cli")
const capturedArgs: string[] = []
const binaryPath = createScriptBinary(`#!/bin/sh
echo "$@" > /tmp/comment-checker-test-args.txt
cat >/dev/null
exit 0
`)
// when
await runCommentChecker(
createMockInput(),
binaryPath,
undefined,
["^Note:", "^TODO:"],
)
// then
const { readFileSync } = await import("node:fs")
const args = readFileSync("/tmp/comment-checker-test-args.txt", "utf-8").trim()
expect(args).toContain("--exclude-pattern")
expect(args).toContain("^Note:")
expect(args).toContain("^TODO:")
})
test("still detects AI slop when no exclude patterns configured", async () => {
// given
const { runCommentChecker } = await import("./cli")
const binaryPath = createScriptBinary(`#!/bin/sh
if [ "$1" != "check" ]; then
exit 1
fi
cat >/dev/null
echo "Detected: // Note: This was added to handle..." 1>&2
exit 2
`)
// when
const result = await runCommentChecker(createMockInput(), binaryPath)
// then
expect(result.hasComments).toBe(true)
expect(result.message).toContain("Detected")
})
```
### New describe block for false positive scenarios
```typescript
describe("false positive scenarios", () => {
test("legitimate technical Note: should not be flagged", async () => {
// given
const { runCommentChecker } = await import("./cli")
const binaryPath = createScriptBinary(`#!/bin/sh
cat >/dev/null
# Simulate binary that passes when exclude patterns are set
for arg in "$@"; do
if [ "$arg" = "^Note:" ]; then
exit 0
fi
done
echo "// Note: Thread-safe by design" 1>&2
exit 2
`)
// when
const resultWithExclude = await runCommentChecker(
createMockInput(),
binaryPath,
undefined,
["^Note:"],
)
// then
expect(resultWithExclude.hasComments).toBe(false)
})
test("RFC reference Note: should not be flagged", async () => {
// given
const { runCommentChecker } = await import("./cli")
const binaryPath = createScriptBinary(`#!/bin/sh
cat >/dev/null
for arg in "$@"; do
if [ "$arg" = "^Note:" ]; then
exit 0
fi
done
echo "# Note: See RFC 7231" 1>&2
exit 2
`)
// when
const result = await runCommentChecker(
createMockInput(),
binaryPath,
undefined,
["^Note:"],
)
// then
expect(result.hasComments).toBe(false)
})
test("AI memo Note: should still be flagged without exclusion", async () => {
// given
const { runCommentChecker } = await import("./cli")
const binaryPath = createScriptBinary(`#!/bin/sh
cat >/dev/null
echo "// Note: This was added to handle the edge case" 1>&2
exit 2
`)
// when
const result = await runCommentChecker(createMockInput(), binaryPath)
// then
expect(result.hasComments).toBe(true)
})
})
```
---
## File 6: `src/hooks/comment-checker/hook.apply-patch.test.ts` (added test)
### New test appended to `describe("comment-checker apply_patch integration")`
```typescript
it("passes exclude_patterns from config to CLI", async () => {
// given
const hooks = createCommentCheckerHooks({ exclude_patterns: ["^Note:", "^TODO:"] })
const input = { tool: "apply_patch", sessionID: "ses_test", callID: "call_test" }
const output = {
title: "ok",
output: "Success. Updated the following files:\nM src/a.ts",
metadata: {
files: [
{
filePath: "/repo/src/a.ts",
before: "const a = 1\n",
after: "// Note: Thread-safe\nconst a = 1\n",
type: "update",
},
],
},
}
// when
await hooks["tool.execute.after"](input, output)
// then
expect(processApplyPatchEditsWithCli).toHaveBeenCalledWith(
"ses_test",
[{ filePath: "/repo/src/a.ts", before: "const a = 1\n", after: "// Note: Thread-safe\nconst a = 1\n" }],
expect.any(Object),
"/tmp/fake-comment-checker",
undefined,
expect.any(Function),
["^Note:", "^TODO:"],
)
})
```

View File

@@ -0,0 +1,112 @@
# Execution Plan: Relax comment-checker "Note:" false positives
## Phase 0: Setup (Worktree + Branch)
1. Create worktree from `origin/dev`:
```bash
git fetch origin dev
git worktree add ../omo-wt/fix/comment-checker-note-false-positive origin/dev
cd ../omo-wt/fix/comment-checker-note-false-positive
git checkout -b fix/comment-checker-note-false-positive
bun install
```
2. Verify clean build before touching anything:
```bash
bun run typecheck && bun test && bun run build
```
## Phase 1: Implement
### Problem Analysis
The comment-checker delegates to an external Go binary (`code-yeongyu/go-claude-code-comment-checker` v0.4.1). The binary contains the regex `(?i)^[\s#/*-]*note:\s*\w` which matches ANY comment starting with "Note:" followed by a word character. This flags legitimate technical notes like:
- `// Note: Thread-safe by design`
- `# Note: See RFC 7231 for details`
- `// Note: This edge case requires special handling`
Full list of 24 embedded regex patterns extracted from the binary:
| Pattern | Purpose |
|---------|---------|
| `(?i)^[\s#/*-]*note:\s*\w` | **THE PROBLEM** - Matches all "Note:" comments |
| `(?i)^[\s#/*-]*added?\b` | Detects "add/added" |
| `(?i)^[\s#/*-]*removed?\b` | Detects "remove/removed" |
| `(?i)^[\s#/*-]*deleted?\b` | Detects "delete/deleted" |
| `(?i)^[\s#/*-]*replaced?\b` | Detects "replace/replaced" |
| `(?i)^[\s#/*-]*implemented?\b` | Detects "implement/implemented" |
| `(?i)^[\s#/*-]*previously\b` | Detects "previously" |
| `(?i)^[\s#/*-]*here\s+we\b` | Detects "here we" |
| `(?i)^[\s#/*-]*refactor(ed\|ing)?\b` | Detects "refactor" variants |
| `(?i)^[\s#/*-]*implementation\s+(of\|note)\b` | Detects "implementation of/note" |
| `(?i)^[\s#/*-]*this\s+(implements?\|adds?\|removes?\|changes?\|fixes?)\b` | Detects "this implements/adds/etc" |
| ... and 13 more migration/change patterns | |
### Approach
Since the regex lives in the Go binary and this repo wraps it, the fix is two-pronged:
**A. Go binary update** (separate repo: `code-yeongyu/go-claude-code-comment-checker`):
- Relax `(?i)^[\s#/*-]*note:\s*\w` to only match AI-style memo patterns like `Note: this was changed...`, `Note: implementation details...`
- Add `--exclude-pattern` CLI flag for user-configurable exclusions
**B. This repo (oh-my-opencode)** - the PR scope:
1. Add `exclude_patterns` config field to `CommentCheckerConfigSchema`
2. Pass `--exclude-pattern` flags to the CLI binary
3. Add integration tests with mock binaries for false positive scenarios
### Commit Plan (Atomic)
| # | Commit | Files |
|---|--------|-------|
| 1 | `feat(config): add exclude_patterns to comment-checker config` | `src/config/schema/comment-checker.ts` |
| 2 | `feat(comment-checker): pass exclude patterns to CLI binary` | `src/hooks/comment-checker/cli.ts`, `src/hooks/comment-checker/cli-runner.ts` |
| 3 | `test(comment-checker): add false positive test cases for Note: comments` | `src/hooks/comment-checker/cli.test.ts`, `src/hooks/comment-checker/hook.apply-patch.test.ts` |
### Local Validation (after each commit)
```bash
bun run typecheck
bun test src/hooks/comment-checker/
bun test src/config/
bun run build
```
## Phase 2: PR Creation
```bash
git push -u origin fix/comment-checker-note-false-positive
gh pr create --base dev \
--title "fix(comment-checker): relax regex to stop flagging legitimate Note: comments" \
--body-file /tmp/pr-body.md
```
## Phase 3: Verify Loop
### Gate A: CI
- Wait for `ci.yml` workflow (tests, typecheck, build)
- If CI fails: fix locally, amend or new commit, force push
### Gate B: review-work (5-agent)
- Run `/review-work` to trigger 5 parallel sub-agents:
- Oracle (goal/constraint verification)
- Oracle (code quality)
- Oracle (security)
- Hephaestus (hands-on QA execution)
- Hephaestus (context mining)
- All 5 must pass
### Gate C: Cubic
- Wait for `cubic-dev-ai[bot]` review
- Must see "No issues found" comment
- If issues found: address feedback, push fix, re-request review
## Phase 4: Merge
```bash
gh pr merge --squash --auto
# Cleanup worktree
cd /Users/yeongyu/local-workspaces/omo
git worktree remove ../omo-wt/fix/comment-checker-note-false-positive
```

View File

@@ -0,0 +1,51 @@
# PR: fix(comment-checker): relax regex to stop flagging legitimate Note: comments
**Title:** `fix(comment-checker): relax regex to stop flagging legitimate Note: comments`
**Base:** `dev`
**Branch:** `fix/comment-checker-note-false-positive`
---
## Summary
- Add `exclude_patterns` config to comment-checker schema, allowing users to whitelist comment prefixes (e.g. `["^Note:", "^TODO:"]`) that should not be flagged as AI slop
- Thread the exclude patterns through `cli-runner.ts` and `cli.ts` to the Go binary via `--exclude-pattern` flags
- Add test cases covering false positive scenarios: legitimate technical notes, RFC references, and AI memo detection with/without exclusions
## Context
The comment-checker Go binary (`go-claude-code-comment-checker` v0.4.1) contains the regex `(?i)^[\s#/*-]*note:\s*\w` which matches ALL comments starting with "Note:" followed by a word character. This produces false positives for legitimate technical comments:
```typescript
// Note: Thread-safe by design <- flagged as AI slop
# Note: See RFC 7231 for details <- flagged as AI slop
// Note: This edge case requires... <- flagged as AI slop
```
These are standard engineering comments, not AI agent memos.
## Changes
| File | Change |
|------|--------|
| `src/config/schema/comment-checker.ts` | Add `exclude_patterns: string[]` optional field |
| `src/hooks/comment-checker/cli.ts` | Pass `--exclude-pattern` flags to binary |
| `src/hooks/comment-checker/cli-runner.ts` | Thread `excludePatterns` through `processWithCli` and `processApplyPatchEditsWithCli` |
| `src/hooks/comment-checker/hook.ts` | Pass `config.exclude_patterns` to CLI runner calls |
| `src/hooks/comment-checker/cli.test.ts` | Add 6 new test cases for false positive scenarios |
| `src/hooks/comment-checker/hook.apply-patch.test.ts` | Add test verifying exclude_patterns config threading |
## Usage
```jsonc
// .opencode/oh-my-opencode.jsonc
{
"comment_checker": {
"exclude_patterns": ["^Note:", "^TODO:", "^FIXME:"]
}
}
```
## Related
- Go binary repo: `code-yeongyu/go-claude-code-comment-checker` (needs corresponding `--exclude-pattern` flag support)

View File

@@ -0,0 +1,75 @@
# Verification Strategy
## Gate A: CI (`ci.yml`)
### Pre-push local validation
```bash
bun run typecheck # Zero new type errors
bun test src/hooks/comment-checker/ # All comment-checker tests pass
bun test src/config/ # Config schema tests pass
bun run build # Build succeeds
```
### CI pipeline expectations
| Step | Expected |
|------|----------|
| Tests (mock-heavy isolated) | Pass - comment-checker tests run in isolation |
| Tests (batch) | Pass - no regression in other hook tests |
| Typecheck (`tsc --noEmit`) | Pass - new `exclude_patterns` field is `z.array(z.string()).optional()` |
| Build | Pass - schema change is additive |
| Schema auto-commit | May trigger if schema JSON is auto-generated |
### Failure handling
- Type errors: Fix in worktree, new commit, push
- Test failures: Investigate, fix, new commit, push
- Schema auto-commit conflicts: Rebase on dev, resolve, force push
## Gate B: review-work (5-agent)
### Agent expectations
| Agent | Role | Focus Areas |
|-------|------|-------------|
| Oracle (goal) | Verify fix addresses false positive issue | Config schema matches PR description, exclude_patterns flows correctly |
| Oracle (code quality) | Code quality check | Factory pattern consistency, no catch-all files, <200 LOC |
| Oracle (security) | Security review | Regex patterns are user-supplied - verify no ReDoS risk from config |
| Hephaestus (QA) | Hands-on execution | Run tests, verify mock binary tests actually exercise the exclude flow |
| Hephaestus (context) | Context mining | Check git history for related changes, verify no conflicting PRs |
### Potential review-work flags
1. **ReDoS concern**: User-supplied regex patterns in `exclude_patterns` could theoretically cause ReDoS in the Go binary. Mitigation: the patterns are passed as CLI args, Go's `regexp` package is RE2-based (linear time guarantee).
2. **Breaking change check**: Adding optional field to config schema is non-breaking (Zod `z.optional()` fills default).
3. **Go binary dependency**: The `--exclude-pattern` flag must exist in the Go binary for this to work. If the binary doesn't support it yet, the patterns are silently ignored (binary treats unknown flags differently).
### Failure handling
- If any Oracle flags issues: address feedback, push new commit, re-run review-work
- If Hephaestus QA finds test gaps: add missing tests, push, re-verify
## Gate C: Cubic (`cubic-dev-ai[bot]`)
### Expected review focus
- Schema change additive and backward-compatible
- Parameter threading is mechanical and low-risk
- Tests use mock binaries (shell scripts) - standard project pattern per `cli.test.ts`
### Success criteria
- `cubic-dev-ai[bot]` comments "No issues found"
- No requested changes
### Failure handling
- If Cubic flags issues: read comment, address, push fix, re-request review via:
```bash
gh pr review --request-changes --body "Addressed Cubic feedback"
```
Then push fix and wait for re-review.
## Post-merge verification
1. Confirm squash merge landed on `dev`
2. Verify CI passes on `dev` branch post-merge
3. Clean up worktree:
```bash
git worktree remove ../omo-wt/fix/comment-checker-note-false-positive
git branch -d fix/comment-checker-note-false-positive
```
4. File issue on `code-yeongyu/go-claude-code-comment-checker` to add `--exclude-pattern` flag support and relax the `note:` regex upstream

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 570000, "total_duration_seconds": 570}

View File

@@ -0,0 +1,10 @@
{
"run_id": "eval-5-without_skill",
"expectations": [
{"text": "Plan uses git worktree in a sibling directory", "passed": false, "evidence": "git checkout -b, no worktree"},
{"text": "References actual comment-checker hook files", "passed": true, "evidence": "Deep analysis of Go binary, tree-sitter, formatter.go, agent_memo.go with line numbers"},
{"text": "Adds test cases for Note: false positive scenarios", "passed": true, "evidence": "Detailed test cases distinguishing legit vs AI slop patterns"},
{"text": "Verification loop includes all 3 gates", "passed": false, "evidence": "Only bun test and typecheck. No review-work or Cubic."},
{"text": "Only modifies regex and adds tests — no unrelated changes", "passed": true, "evidence": "Adds allowed-prefix filter module — focused approach with config extension"}
]
}

View File

@@ -0,0 +1,529 @@
# Code Changes: comment-checker false positive fix
## Change 1: Extend config schema
**File: `src/config/schema/comment-checker.ts`**
```typescript
// BEFORE
import { z } from "zod"
export const CommentCheckerConfigSchema = z.object({
/** Custom prompt to replace the default warning message. Use {{comments}} placeholder for detected comments XML. */
custom_prompt: z.string().optional(),
})
export type CommentCheckerConfig = z.infer<typeof CommentCheckerConfigSchema>
```
```typescript
// AFTER
import { z } from "zod"
const DEFAULT_ALLOWED_COMMENT_PREFIXES = [
"note:",
"todo:",
"fixme:",
"hack:",
"xxx:",
"warning:",
"important:",
"bug:",
"optimize:",
"workaround:",
"safety:",
"security:",
"perf:",
"see:",
"ref:",
"cf.",
]
export const CommentCheckerConfigSchema = z.object({
/** Custom prompt to replace the default warning message. Use {{comments}} placeholder for detected comments XML. */
custom_prompt: z.string().optional(),
/** Comment prefixes considered legitimate (not AI slop). Case-insensitive. Defaults include Note:, TODO:, FIXME:, etc. */
allowed_comment_prefixes: z.array(z.string()).optional().default(DEFAULT_ALLOWED_COMMENT_PREFIXES),
})
export type CommentCheckerConfig = z.infer<typeof CommentCheckerConfigSchema>
```
## Change 2: Create allowed-prefix-filter module
**File: `src/hooks/comment-checker/allowed-prefix-filter.ts`** (NEW)
```typescript
const COMMENT_XML_REGEX = /<comment\s+line-number="\d+">([\s\S]*?)<\/comment>/g
const COMMENTS_BLOCK_REGEX = /<comments\s+file="[^"]*">\s*([\s\S]*?)\s*<\/comments>/g
const AGENT_MEMO_HEADER_REGEX = /🚨 AGENT MEMO COMMENT DETECTED.*?---\n\n/s
function stripCommentPrefix(text: string): string {
let stripped = text.trim()
for (const prefix of ["//", "#", "/*", "--", "*"]) {
if (stripped.startsWith(prefix)) {
stripped = stripped.slice(prefix.length).trim()
break
}
}
return stripped
}
function isAllowedComment(commentText: string, allowedPrefixes: string[]): boolean {
const stripped = stripCommentPrefix(commentText).toLowerCase()
return allowedPrefixes.some((prefix) => stripped.startsWith(prefix.toLowerCase()))
}
function extractCommentTexts(xmlBlock: string): string[] {
const texts: string[] = []
let match: RegExpExecArray | null
const regex = new RegExp(COMMENT_XML_REGEX.source, COMMENT_XML_REGEX.flags)
while ((match = regex.exec(xmlBlock)) !== null) {
texts.push(match[1])
}
return texts
}
export function filterAllowedComments(
message: string,
allowedPrefixes: string[],
): { hasRemainingComments: boolean; filteredMessage: string } {
if (!message || allowedPrefixes.length === 0) {
return { hasRemainingComments: true, filteredMessage: message }
}
const commentTexts = extractCommentTexts(message)
if (commentTexts.length === 0) {
return { hasRemainingComments: true, filteredMessage: message }
}
const disallowedComments = commentTexts.filter(
(text) => !isAllowedComment(text, allowedPrefixes),
)
if (disallowedComments.length === 0) {
return { hasRemainingComments: false, filteredMessage: "" }
}
if (disallowedComments.length === commentTexts.length) {
return { hasRemainingComments: true, filteredMessage: message }
}
let filteredMessage = message
for (const text of commentTexts) {
if (isAllowedComment(text, allowedPrefixes)) {
const escapedText = text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
const lineRegex = new RegExp(`\\s*<comment\\s+line-number="\\d+">${escapedText}</comment>\\n?`, "g")
filteredMessage = filteredMessage.replace(lineRegex, "")
}
}
filteredMessage = filteredMessage.replace(AGENT_MEMO_HEADER_REGEX, "")
return { hasRemainingComments: true, filteredMessage }
}
```
## Change 3: Thread config through cli-runner.ts
**File: `src/hooks/comment-checker/cli-runner.ts`**
```typescript
// BEFORE (processWithCli signature and body)
export async function processWithCli(
input: { tool: string; sessionID: string; callID: string },
pendingCall: PendingCall,
output: { output: string },
cliPath: string,
customPrompt: string | undefined,
debugLog: (...args: unknown[]) => void,
): Promise<void> {
await withCommentCheckerLock(async () => {
// ...
const result = await runCommentChecker(hookInput, cliPath, customPrompt)
if (result.hasComments && result.message) {
debugLog("CLI detected comments, appending message")
output.output += `\n\n${result.message}`
} else {
debugLog("CLI: no comments detected")
}
}, undefined, debugLog)
}
```
```typescript
// AFTER
import { filterAllowedComments } from "./allowed-prefix-filter"
export async function processWithCli(
input: { tool: string; sessionID: string; callID: string },
pendingCall: PendingCall,
output: { output: string },
cliPath: string,
customPrompt: string | undefined,
allowedPrefixes: string[],
debugLog: (...args: unknown[]) => void,
): Promise<void> {
await withCommentCheckerLock(async () => {
void input
debugLog("using CLI mode with path:", cliPath)
const hookInput: HookInput = {
session_id: pendingCall.sessionID,
tool_name: pendingCall.tool.charAt(0).toUpperCase() + pendingCall.tool.slice(1),
transcript_path: "",
cwd: process.cwd(),
hook_event_name: "PostToolUse",
tool_input: {
file_path: pendingCall.filePath,
content: pendingCall.content,
old_string: pendingCall.oldString,
new_string: pendingCall.newString,
edits: pendingCall.edits,
},
}
const result = await runCommentChecker(hookInput, cliPath, customPrompt)
if (result.hasComments && result.message) {
const { hasRemainingComments, filteredMessage } = filterAllowedComments(
result.message,
allowedPrefixes,
)
if (hasRemainingComments && filteredMessage) {
debugLog("CLI detected comments, appending filtered message")
output.output += `\n\n${filteredMessage}`
} else {
debugLog("CLI: all detected comments matched allowed prefixes, suppressing")
}
} else {
debugLog("CLI: no comments detected")
}
}, undefined, debugLog)
}
// Same change applied to processApplyPatchEditsWithCli - add allowedPrefixes parameter
export async function processApplyPatchEditsWithCli(
sessionID: string,
edits: ApplyPatchEdit[],
output: { output: string },
cliPath: string,
customPrompt: string | undefined,
allowedPrefixes: string[],
debugLog: (...args: unknown[]) => void,
): Promise<void> {
debugLog("processing apply_patch edits:", edits.length)
for (const edit of edits) {
await withCommentCheckerLock(async () => {
const hookInput: HookInput = {
session_id: sessionID,
tool_name: "Edit",
transcript_path: "",
cwd: process.cwd(),
hook_event_name: "PostToolUse",
tool_input: {
file_path: edit.filePath,
old_string: edit.before,
new_string: edit.after,
},
}
const result = await runCommentChecker(hookInput, cliPath, customPrompt)
if (result.hasComments && result.message) {
const { hasRemainingComments, filteredMessage } = filterAllowedComments(
result.message,
allowedPrefixes,
)
if (hasRemainingComments && filteredMessage) {
debugLog("CLI detected comments for apply_patch file:", edit.filePath)
output.output += `\n\n${filteredMessage}`
}
}
}, undefined, debugLog)
}
}
```
## Change 4: Update hook.ts to pass config
**File: `src/hooks/comment-checker/hook.ts`**
```typescript
// BEFORE (in tool.execute.after handler, around line 177)
await processWithCli(input, pendingCall, output, cliPath, config?.custom_prompt, debugLog)
// AFTER
const allowedPrefixes = config?.allowed_comment_prefixes ?? []
await processWithCli(input, pendingCall, output, cliPath, config?.custom_prompt, allowedPrefixes, debugLog)
```
```typescript
// BEFORE (in apply_patch section, around line 147-154)
await processApplyPatchEditsWithCli(
input.sessionID,
edits,
output,
cliPath,
config?.custom_prompt,
debugLog,
)
// AFTER
const allowedPrefixes = config?.allowed_comment_prefixes ?? []
await processApplyPatchEditsWithCli(
input.sessionID,
edits,
output,
cliPath,
config?.custom_prompt,
allowedPrefixes,
debugLog,
)
```
## Change 5: Test file for allowed-prefix-filter
**File: `src/hooks/comment-checker/allowed-prefix-filter.test.ts`** (NEW)
```typescript
import { describe, test, expect } from "bun:test"
import { filterAllowedComments } from "./allowed-prefix-filter"
const DEFAULT_PREFIXES = [
"note:", "todo:", "fixme:", "hack:", "xxx:", "warning:",
"important:", "bug:", "optimize:", "workaround:", "safety:",
"security:", "perf:", "see:", "ref:", "cf.",
]
function buildMessage(comments: { line: number; text: string }[], filePath = "/tmp/test.ts"): string {
const xml = comments
.map((c) => `\t<comment line-number="${c.line}">${c.text}</comment>`)
.join("\n")
return `COMMENT/DOCSTRING DETECTED - IMMEDIATE ACTION REQUIRED\n\n` +
`Your recent changes contain comments or docstrings, which triggered this hook.\n` +
`Detected comments/docstrings:\n` +
`<comments file="${filePath}">\n${xml}\n</comments>\n`
}
describe("allowed-prefix-filter", () => {
describe("#given default allowed prefixes", () => {
describe("#when message contains only Note: comments", () => {
test("#then should suppress the entire message", () => {
const message = buildMessage([
{ line: 5, text: "// Note: Thread-safe implementation" },
{ line: 12, text: "// NOTE: See RFC 7231 for details" },
])
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(false)
expect(result.filteredMessage).toBe("")
})
})
describe("#when message contains only TODO/FIXME comments", () => {
test("#then should suppress the entire message", () => {
const message = buildMessage([
{ line: 3, text: "// TODO: implement caching" },
{ line: 7, text: "// FIXME: race condition here" },
{ line: 15, text: "# HACK: workaround for upstream bug" },
])
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(false)
expect(result.filteredMessage).toBe("")
})
})
describe("#when message contains only AI slop comments", () => {
test("#then should keep the entire message", () => {
const message = buildMessage([
{ line: 2, text: "// Added new validation logic" },
{ line: 8, text: "// Refactored for better performance" },
])
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(true)
expect(result.filteredMessage).toBe(message)
})
})
describe("#when message contains mix of legitimate and slop comments", () => {
test("#then should keep message but remove allowed comment XML entries", () => {
const message = buildMessage([
{ line: 5, text: "// Note: Thread-safe implementation" },
{ line: 10, text: "// Changed from old API to new API" },
])
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(true)
expect(result.filteredMessage).not.toContain("Thread-safe implementation")
expect(result.filteredMessage).toContain("Changed from old API to new API")
})
})
describe("#when Note: comment has lowercase prefix", () => {
test("#then should still be treated as allowed (case-insensitive)", () => {
const message = buildMessage([
{ line: 1, text: "// note: this is case insensitive" },
])
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(false)
})
})
describe("#when comment uses hash prefix", () => {
test("#then should strip prefix before matching", () => {
const message = buildMessage([
{ line: 1, text: "# Note: Python style comment" },
{ line: 5, text: "# TODO: something to do" },
])
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(false)
})
})
describe("#when comment has Security: prefix", () => {
test("#then should be treated as allowed", () => {
const message = buildMessage([
{ line: 1, text: "// Security: validate input before processing" },
])
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(false)
})
})
describe("#when comment has Warning: prefix", () => {
test("#then should be treated as allowed", () => {
const message = buildMessage([
{ line: 1, text: "// WARNING: This mutates the input array" },
])
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(false)
})
})
})
describe("#given empty allowed prefixes", () => {
describe("#when any comments are detected", () => {
test("#then should pass through unfiltered", () => {
const message = buildMessage([
{ line: 1, text: "// Note: this should pass through" },
])
const result = filterAllowedComments(message, [])
expect(result.hasRemainingComments).toBe(true)
expect(result.filteredMessage).toBe(message)
})
})
})
describe("#given custom allowed prefixes", () => {
describe("#when comment matches custom prefix", () => {
test("#then should suppress it", () => {
const message = buildMessage([
{ line: 1, text: "// PERF: O(n log n) complexity" },
])
const result = filterAllowedComments(message, ["perf:"])
expect(result.hasRemainingComments).toBe(false)
})
})
})
describe("#given empty message", () => {
describe("#when filterAllowedComments is called", () => {
test("#then should return hasRemainingComments true with empty string", () => {
const result = filterAllowedComments("", DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(true)
expect(result.filteredMessage).toBe("")
})
})
})
describe("#given message with agent memo header", () => {
describe("#when all flagged comments are legitimate Note: comments", () => {
test("#then should suppress agent memo header along with comments", () => {
const message =
"🚨 AGENT MEMO COMMENT DETECTED - CODE SMELL ALERT 🚨\n\n" +
"⚠️ AGENT MEMO COMMENTS DETECTED - THIS IS A CODE SMELL ⚠️\n\n" +
"You left \"memo-style\" comments...\n\n---\n\n" +
"Your recent changes contain comments...\n" +
"Detected comments/docstrings:\n" +
'<comments file="/tmp/test.ts">\n' +
'\t<comment line-number="5">// Note: Thread-safe</comment>\n' +
"</comments>\n"
const result = filterAllowedComments(message, DEFAULT_PREFIXES)
expect(result.hasRemainingComments).toBe(false)
expect(result.filteredMessage).toBe("")
})
})
})
})
```
## Change 6: Update existing test for new parameter
**File: `src/hooks/comment-checker/hook.apply-patch.test.ts`**
The `processApplyPatchEditsWithCli` mock needs to account for the new `allowedPrefixes` parameter:
```typescript
// BEFORE (line 58)
expect(processApplyPatchEditsWithCli).toHaveBeenCalledWith(
"ses_test",
[
{ filePath: "/repo/src/a.ts", before: "const a = 1\n", after: "// comment\nconst a = 1\n" },
{ filePath: "/repo/src/new.ts", before: "const b = 1\n", after: "// moved comment\nconst b = 1\n" },
],
expect.any(Object),
"/tmp/fake-comment-checker",
undefined,
expect.any(Function),
)
// AFTER - add allowed_comment_prefixes argument
expect(processApplyPatchEditsWithCli).toHaveBeenCalledWith(
"ses_test",
[
{ filePath: "/repo/src/a.ts", before: "const a = 1\n", after: "// comment\nconst a = 1\n" },
{ filePath: "/repo/src/new.ts", before: "const b = 1\n", after: "// moved comment\nconst b = 1\n" },
],
expect.any(Object),
"/tmp/fake-comment-checker",
undefined,
expect.any(Array),
expect.any(Function),
)
```
## Summary of all touched files
| File | Action | Description |
|------|--------|-------------|
| `src/config/schema/comment-checker.ts` | Modified | Add `allowed_comment_prefixes` with defaults |
| `src/hooks/comment-checker/allowed-prefix-filter.ts` | **New** | Post-processing filter for legitimate comment prefixes |
| `src/hooks/comment-checker/allowed-prefix-filter.test.ts` | **New** | 11 test cases covering false positives and edge cases |
| `src/hooks/comment-checker/cli-runner.ts` | Modified | Thread `allowedPrefixes` param, apply filter after binary result |
| `src/hooks/comment-checker/hook.ts` | Modified | Pass `allowed_comment_prefixes` from config to CLI runner |
| `src/hooks/comment-checker/hook.apply-patch.test.ts` | Modified | Update mock assertions for new parameter |

View File

@@ -0,0 +1,127 @@
# Execution Plan: Relax comment-checker hook false positives
## Problem Analysis
The comment-checker hook delegates to an external Go binary (`code-yeongyu/go-claude-code-comment-checker`). The binary:
1. Detects ALL comments in written/edited code using tree-sitter
2. Filters out only BDD markers, linter directives, and shebangs
3. Flags every remaining comment as problematic (exit code 2)
4. In the output formatter (`formatter.go`), uses `AgentMemoFilter` to categorize comments for display
The `AgentMemoFilter` in `pkg/filters/agent_memo.go` contains the overly aggressive regex:
```go
regexp.MustCompile(`(?i)^[\s#/*-]*note:\s*\w`),
```
This matches ANY comment starting with `Note:` (case-insensitive) followed by a word character, causing legitimate comments like `// Note: Thread-safe implementation` or `// NOTE: See RFC 7231` to be classified as "AGENT MEMO" AI slop with an aggressive warning banner.
Additionally, the binary flags ALL non-filtered comments (not just agent memos), so even without the `Note:` regex, `// Note: ...` comments would still be flagged as generic "COMMENT DETECTED."
## Architecture Understanding
```
TypeScript (oh-my-opencode) Go Binary (go-claude-code-comment-checker)
───────────────────────────── ──────────────────────────────────────────
hook.ts main.go
├─ tool.execute.before ├─ Read JSON from stdin
│ └─ registerPendingCall() ├─ Detect comments (tree-sitter)
└─ tool.execute.after ├─ applyFilters (BDD, Directive, Shebang)
└─ processWithCli() ├─ FormatHookMessage (uses AgentMemoFilter for display)
└─ runCommentChecker() └─ exit 0 (clean) or exit 2 (comments found, message on stderr)
└─ spawn binary, pipe JSON
└─ read stderr → message
└─ append to output
```
Key files in oh-my-opencode:
- `src/hooks/comment-checker/hook.ts` - Hook factory, registers before/after handlers
- `src/hooks/comment-checker/cli-runner.ts` - Orchestrates CLI invocation, semaphore
- `src/hooks/comment-checker/cli.ts` - Binary resolution, process spawning, timeout handling
- `src/hooks/comment-checker/types.ts` - PendingCall, CommentInfo types
- `src/config/schema/comment-checker.ts` - Config schema (currently only `custom_prompt`)
Key files in Go binary:
- `pkg/filters/agent_memo.go` - Contains the aggressive `note:\s*\w` regex (line 20)
- `pkg/output/formatter.go` - Uses AgentMemoFilter to add "AGENT MEMO" warnings
- `cmd/comment-checker/main.go` - Filter pipeline (BDD + Directive + Shebang only)
## Step-by-Step Plan
### Step 1: Create feature branch
```bash
git checkout dev
git pull origin dev
git checkout -b fix/comment-checker-note-false-positive
```
### Step 2: Extend CommentCheckerConfigSchema
**File: `src/config/schema/comment-checker.ts`**
Add `allowed_comment_prefixes` field with sensible defaults. This lets users configure which comment prefixes should be treated as legitimate (not AI slop).
### Step 3: Add a post-processing filter in cli-runner.ts
**File: `src/hooks/comment-checker/cli-runner.ts`**
After the Go binary returns its result, parse the stderr message to identify and suppress comments that match allowed prefixes. The binary's output contains XML like:
```xml
<comments file="/path/to/file.ts">
<comment line-number="5">// Note: Thread-safe</comment>
</comments>
```
Add a function `filterAllowedComments()` that:
1. Extracts `<comment>` elements from the message
2. Checks if the comment text matches any allowed prefix pattern
3. If ALL flagged comments match allowed patterns, suppress the entire warning
4. If some comments are legitimate and some aren't, rebuild the message without the legitimate ones
### Step 4: Create dedicated filter module
**File: `src/hooks/comment-checker/allowed-prefix-filter.ts`** (new)
Extract the filtering logic into its own module per the 200 LOC / single-responsibility rule.
### Step 5: Pass allowed_comment_prefixes through the hook chain
**File: `src/hooks/comment-checker/hook.ts`**
Thread the `allowed_comment_prefixes` config from `createCommentCheckerHooks()` down to `processWithCli()` and `processApplyPatchEditsWithCli()`.
### Step 6: Add test cases
**File: `src/hooks/comment-checker/allowed-prefix-filter.test.ts`** (new)
Test cases covering:
- `// Note: Thread-safe implementation` - should NOT be flagged (false positive)
- `// NOTE: See RFC 7231 for details` - should NOT be flagged
- `// Note: changed from X to Y` - SHOULD still be flagged (genuine AI slop)
- `// TODO: implement caching` - should NOT be flagged
- `// FIXME: race condition` - should NOT be flagged
- `// HACK: workaround for upstream bug` - should NOT be flagged
- `// Added new validation logic` - SHOULD be flagged
- Custom allowed patterns from config
**File: `src/hooks/comment-checker/cli-runner.test.ts`** (new or extend cli.test.ts)
Integration-level tests for the post-processing pipeline.
### Step 7: Verify
```bash
bun test src/hooks/comment-checker/
bun run typecheck
```
### Step 8: Commit and push
```bash
git add -A
git commit -m "fix(comment-checker): add allowed-prefix filter to reduce false positives on Note: comments"
git push -u origin fix/comment-checker-note-false-positive
```
### Step 9: Create PR
```bash
gh pr create --title "fix(comment-checker): reduce false positives for legitimate Note: comments" --body-file /tmp/pr-body.md --base dev
```
### Step 10 (Follow-up): Upstream Go binary fix
File an issue or PR on `code-yeongyu/go-claude-code-comment-checker` to:
1. Relax `(?i)^[\s#/*-]*note:\s*\w` to be more specific (e.g., `note:\s*(changed|modified|updated|added|removed|implemented|refactored)`)
2. Add a dedicated `LegitimateCommentFilter` to the filter pipeline in `main.go`
3. Support `--allow-prefix` CLI flag for external configuration

View File

@@ -0,0 +1,42 @@
## Summary
- Add `allowed_comment_prefixes` config to `CommentCheckerConfigSchema` with sensible defaults (Note:, TODO:, FIXME:, HACK:, WARNING:, etc.)
- Add post-processing filter in `allowed-prefix-filter.ts` that suppresses false positives from the Go binary's output before appending to tool output
- Add 11 test cases covering false positive scenarios (Note:, TODO:, FIXME:, case-insensitivity, mixed comments, agent memo header suppression)
## Problem
The comment-checker hook's upstream Go binary (`go-claude-code-comment-checker`) flags ALL non-filtered comments as problematic. Its `AgentMemoFilter` regex `(?i)^[\s#/*-]*note:\s*\w` classifies any `Note:` comment as AI-generated "agent memo" slop, triggering an aggressive warning banner.
This causes false positives for legitimate, widely-used comment patterns:
```typescript
// Note: Thread-safe implementation required due to concurrent access
// NOTE: See RFC 7231 section 6.5.4 for 404 semantics
// Note: This timeout matches the upstream service SLA
```
These are standard engineering documentation patterns, not AI slop.
## Solution
Rather than waiting for an upstream binary fix, this PR adds a configurable **post-processing filter** on the TypeScript side:
1. **Config**: `comment_checker.allowed_comment_prefixes` - array of case-insensitive prefixes (defaults: `note:`, `todo:`, `fixme:`, `hack:`, `warning:`, `important:`, `bug:`, etc.)
2. **Filter**: After the Go binary returns flagged comments, `filterAllowedComments()` parses the XML output and suppresses comments matching allowed prefixes
3. **Behavior**: If ALL flagged comments are legitimate → suppress entire warning. If mixed → remove only the legitimate entries from the XML, keep the warning for actual slop.
Users can customize via config:
```jsonc
{
"comment_checker": {
"allowed_comment_prefixes": ["note:", "todo:", "fixme:", "custom-prefix:"]
}
}
```
## Test Plan
- 11 new test cases in `allowed-prefix-filter.test.ts`
- Updated assertion in `hook.apply-patch.test.ts` for new parameter
- `bun test src/hooks/comment-checker/` passes
- `bun run typecheck` clean

View File

@@ -0,0 +1,120 @@
# Verification Strategy
## 1. Unit Tests
### New test file: `allowed-prefix-filter.test.ts`
Run: `bun test src/hooks/comment-checker/allowed-prefix-filter.test.ts`
| # | Scenario | Input | Expected |
|---|----------|-------|----------|
| 1 | Only Note: comments (default prefixes) | `// Note: Thread-safe`, `// NOTE: See RFC` | `hasRemainingComments: false`, empty message |
| 2 | Only TODO/FIXME/HACK (default prefixes) | `// TODO: impl`, `// FIXME: race`, `# HACK: workaround` | Suppressed |
| 3 | Only AI slop comments | `// Added validation`, `// Refactored for perf` | Full message preserved |
| 4 | Mixed legitimate + slop | `// Note: Thread-safe`, `// Changed from old to new` | Message kept, Note: entry removed from XML |
| 5 | Case-insensitive Note: | `// note: lowercase test` | Suppressed |
| 6 | Hash-prefixed comments | `# Note: Python`, `# TODO: something` | Suppressed (prefix stripped before matching) |
| 7 | Security: prefix | `// Security: validate input` | Suppressed |
| 8 | Warning: prefix | `// WARNING: mutates input` | Suppressed |
| 9 | Empty allowed prefixes | `// Note: should pass through` | Full message preserved (no filtering) |
| 10 | Custom prefix | `// PERF: O(n log n)` with `["perf:"]` | Suppressed |
| 11 | Agent memo header + Note: | Full agent memo banner + `// Note: Thread-safe` | Entire message suppressed including banner |
### Existing test: `hook.apply-patch.test.ts`
Run: `bun test src/hooks/comment-checker/hook.apply-patch.test.ts`
Verify the updated mock assertion accepts the new `allowedPrefixes` array parameter.
### Existing test: `cli.test.ts`
Run: `bun test src/hooks/comment-checker/cli.test.ts`
Verify no regressions in binary spawning, timeout, and semaphore logic.
## 2. Type Checking
```bash
bun run typecheck
```
Verify:
- `CommentCheckerConfigSchema` change propagates correctly to `CommentCheckerConfig` type
- All call sites in `hook.ts` and `cli-runner.ts` pass the new parameter
- `filterAllowedComments` return type matches usage in `cli-runner.ts`
- No new type errors introduced
## 3. LSP Diagnostics
```bash
# Check all changed files for errors
lsp_diagnostics src/config/schema/comment-checker.ts
lsp_diagnostics src/hooks/comment-checker/allowed-prefix-filter.ts
lsp_diagnostics src/hooks/comment-checker/cli-runner.ts
lsp_diagnostics src/hooks/comment-checker/hook.ts
lsp_diagnostics src/hooks/comment-checker/allowed-prefix-filter.test.ts
```
## 4. Full Test Suite
```bash
bun test src/hooks/comment-checker/
```
All 4 test files should pass:
- `cli.test.ts` (existing - no regressions)
- `pending-calls.test.ts` (existing - no regressions)
- `hook.apply-patch.test.ts` (modified assertion)
- `allowed-prefix-filter.test.ts` (new - all 11 cases)
## 5. Build Verification
```bash
bun run build
```
Ensure the new module is properly bundled and exported.
## 6. Integration Verification (Manual)
If binary is available locally:
```bash
# Test with a file containing Note: comment
echo '{"session_id":"test","tool_name":"Write","transcript_path":"","cwd":"/tmp","hook_event_name":"PostToolUse","tool_input":{"file_path":"/tmp/test.ts","content":"// Note: Thread-safe implementation\nconst x = 1"}}' | ~/.cache/oh-my-opencode/bin/comment-checker check
echo "Exit code: $?"
```
Expected: Binary returns exit 2 (comment detected), but the TypeScript post-filter should suppress it.
## 7. Config Validation
Test that config changes work:
```jsonc
// .opencode/oh-my-opencode.jsonc
{
"comment_checker": {
// Override: only allow Note: and TODO:
"allowed_comment_prefixes": ["note:", "todo:"]
}
}
```
Verify Zod schema accepts the config and defaults are applied when field is omitted.
## 8. Regression Checks
Verify the following still work correctly:
- AI slop comments (`// Added new feature`, `// Refactored for performance`) are still flagged
- BDD comments (`// given`, `// when`, `// then`) are still allowed (binary-side filter)
- Linter directives (`// eslint-disable`, `// @ts-ignore`) are still allowed (binary-side filter)
- Shebangs (`#!/usr/bin/env node`) are still allowed (binary-side filter)
- `custom_prompt` config still works
- Semaphore prevents concurrent comment-checker runs
- Timeout handling (30s) still works
## 9. Edge Cases to Watch
- Empty message from binary (exit code 0) - filter should be no-op
- Binary not available - hook gracefully degrades (existing behavior)
- Message with no `<comment>` XML elements - filter passes through
- Very long messages with many comments - regex performance
- Comments containing XML-special characters (`<`, `>`, `&`) in text

View File

@@ -0,0 +1 @@
{"total_tokens": null, "duration_ms": 399000, "total_duration_seconds": 399}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,348 @@
---
name: work-with-pr
description: "Full PR lifecycle: git worktree → implement → atomic commits → PR creation → verification loop (CI + review-work + Cubic approval) → merge. Keeps iterating until ALL gates pass and PR is merged. Worktree auto-cleanup after merge. Use whenever implementation work needs to land as a PR. Triggers: 'create a PR', 'implement and PR', 'work on this and make a PR', 'implement issue', 'land this as a PR', 'work-with-pr', 'PR workflow', 'implement end to end', even when user just says 'implement X' if the context implies PR delivery."
---
# Work With PR — Full PR Lifecycle
You are executing a complete PR lifecycle: from isolated worktree setup through implementation, PR creation, and an unbounded verification loop until the PR is merged. The loop has three gates — CI, review-work, and Cubic — and you keep fixing and pushing until all three pass simultaneously.
<architecture>
```
Phase 0: Setup → Branch + worktree in sibling directory
Phase 1: Implement → Do the work, atomic commits
Phase 2: PR Creation → Push, create PR targeting dev
Phase 3: Verify Loop → Unbounded iteration until ALL gates pass:
├─ Gate A: CI → gh pr checks (bun test, typecheck, build)
├─ Gate B: review-work → 5-agent parallel review
└─ Gate C: Cubic → cubic-dev-ai[bot] "No issues found"
Phase 4: Merge → Squash merge, worktree cleanup
```
</architecture>
---
## Phase 0: Setup
Create an isolated worktree so the user's main working directory stays clean. This matters because the user may have uncommitted work, and checking out a branch would destroy it.
<setup>
### 1. Resolve repository context
```bash
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
REPO_NAME=$(basename "$PWD")
BASE_BRANCH="dev" # CI blocks PRs to master
```
### 2. Create branch
If user provides a branch name, use it. Otherwise, derive from the task:
```bash
# Auto-generate: feature/short-description or fix/short-description
BRANCH_NAME="feature/$(echo "$TASK_SUMMARY" | tr '[:upper:] ' '[:lower:]-' | head -c 50)"
git fetch origin "$BASE_BRANCH"
git branch "$BRANCH_NAME" "origin/$BASE_BRANCH"
```
### 3. Create worktree
Place worktrees as siblings to the repo — not inside it. This avoids git nested repo issues and keeps the working tree clean.
```bash
WORKTREE_PATH="../${REPO_NAME}-wt/${BRANCH_NAME}"
mkdir -p "$(dirname "$WORKTREE_PATH")"
git worktree add "$WORKTREE_PATH" "$BRANCH_NAME"
```
### 4. Set working context
All subsequent work happens inside the worktree. Install dependencies if needed:
```bash
cd "$WORKTREE_PATH"
# If bun project:
[ -f "bun.lock" ] && bun install
```
</setup>
---
## Phase 1: Implement
Do the actual implementation work inside the worktree. The agent using this skill does the work directly — no subagent delegation for the implementation itself.
**Scope discipline**: For bug fixes, stay minimal. Fix the bug, add a test for it, done. Do not refactor surrounding code, add config options, or "improve" things that aren't broken. The verification loop will catch regressions — trust the process.
<implementation>
### Commit strategy
Use the git-master skill's atomic commit principles. The reason for atomic commits: if CI fails on one change, you can isolate and fix it without unwinding everything.
```
3+ files changed → 2+ commits minimum
5+ files changed → 3+ commits minimum
10+ files changed → 5+ commits minimum
```
Each commit should pair implementation with its tests. Load `git-master` skill when committing:
```
task(category="quick", load_skills=["git-master"], prompt="Commit the changes atomically following git-master conventions. Repository is at {WORKTREE_PATH}.")
```
### Pre-push local validation
Before pushing, run the same checks CI will run. Catching failures locally saves a full CI round-trip (~3-5 min):
```bash
bun run typecheck
bun test
bun run build
```
Fix any failures before pushing. Each fix-commit cycle should be atomic.
</implementation>
---
## Phase 2: PR Creation
<pr_creation>
### Push and create PR
```bash
git push -u origin "$BRANCH_NAME"
```
Create the PR using the project's template structure:
```bash
gh pr create \
--base "$BASE_BRANCH" \
--head "$BRANCH_NAME" \
--title "$PR_TITLE" \
--body "$(cat <<'EOF'
## Summary
[1-3 sentences describing what this PR does and why]
## Changes
[Bullet list of key changes]
## Testing
- `bun run typecheck` ✅
- `bun test` ✅
- `bun run build` ✅
## Related Issues
[Link to issue if applicable]
EOF
)"
```
Capture the PR number:
```bash
PR_NUMBER=$(gh pr view --json number -q .number)
```
</pr_creation>
---
## Phase 3: Verification Loop
This is the core of the skill. Three gates must ALL pass for the PR to be ready. The loop has no iteration cap — keep going until done. Gate ordering is intentional: CI is cheapest/fastest, review-work is most thorough, Cubic is external and asynchronous.
<verify_loop>
```
while true:
1. Wait for CI → Gate A
2. If CI fails → read logs, fix, commit, push, continue
3. Run review-work → Gate B
4. If review fails → fix blocking issues, commit, push, continue
5. Check Cubic → Gate C
6. If Cubic has issues → fix issues, commit, push, continue
7. All three pass → break
```
### Gate A: CI Checks
CI is the fastest feedback loop. Wait for it to complete, then parse results.
```bash
# Wait for checks to start (GitHub needs a moment after push)
# Then watch for completion
gh pr checks "$PR_NUMBER" --watch --fail-fast
```
**On failure**: Get the failed run logs to understand what broke:
```bash
# Find the failed run
RUN_ID=$(gh run list --branch "$BRANCH_NAME" --status failure --json databaseId --jq '.[0].databaseId')
# Get failed job logs
gh run view "$RUN_ID" --log-failed
```
Read the logs, fix the issue, commit atomically, push, and re-enter the loop.
### Gate B: review-work
The review-work skill launches 5 parallel sub-agents (goal verification, QA, code quality, security, context mining). All 5 must pass.
Invoke review-work after CI passes — there's no point reviewing code that doesn't build:
```
task(
category="unspecified-high",
load_skills=["review-work"],
run_in_background=false,
description="Post-implementation review of PR changes",
prompt="Review the implementation work on branch {BRANCH_NAME}. The worktree is at {WORKTREE_PATH}. Goal: {ORIGINAL_GOAL}. Constraints: {CONSTRAINTS}. Run command: bun run dev (or as appropriate)."
)
```
**On failure**: review-work reports blocking issues with specific files and line numbers. Fix each blocking issue, commit, push, and re-enter the loop from Gate A (since code changed, CI must re-run).
### Gate C: Cubic Approval
Cubic (`cubic-dev-ai[bot]`) is an automated review bot that comments on PRs. It does NOT use GitHub's APPROVED review state — instead it posts comments with issue counts and confidence scores.
**Approval signal**: The latest Cubic comment contains `**No issues found**` and confidence `**5/5**`.
**Issue signal**: The comment lists issues with file-level detail.
```bash
# Get the latest Cubic review
CUBIC_REVIEW=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews" \
--jq '[.[] | select(.user.login == "cubic-dev-ai[bot]")] | last | .body')
# Check if approved
if echo "$CUBIC_REVIEW" | grep -q "No issues found"; then
echo "Cubic: APPROVED"
else
echo "Cubic: ISSUES FOUND"
echo "$CUBIC_REVIEW"
fi
```
**On issues**: Cubic's review body contains structured issue descriptions. Parse them, determine which are valid (some may be false positives), fix the valid ones, commit, push, re-enter from Gate A.
Cubic reviews are triggered automatically on PR updates. After pushing a fix, wait for the new review to appear before checking again. Use `gh api` polling with a conditional loop:
```bash
# Wait for new Cubic review after push
PUSH_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
while true; do
LATEST_REVIEW_TIME=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews" \
--jq '[.[] | select(.user.login == "cubic-dev-ai[bot]")] | last | .submitted_at')
if [[ "$LATEST_REVIEW_TIME" > "$PUSH_TIME" ]]; then
break
fi
# Use gh api call itself as the delay mechanism — each call takes ~1-2s
# For longer waits, use: timeout 30 gh pr checks "$PR_NUMBER" --watch 2>/dev/null || true
done
```
### Iteration discipline
Each iteration through the loop:
1. Fix ONLY the issues identified by the failing gate
2. Commit atomically (one logical fix per commit)
3. Push
4. Re-enter from Gate A (code changed → full re-verification)
Avoid the temptation to "improve" unrelated code during fix iterations. Scope creep in the fix loop makes debugging harder and can introduce new failures.
</verify_loop>
---
## Phase 4: Merge & Cleanup
Once all three gates pass:
<merge_cleanup>
### Merge the PR
```bash
# Squash merge to keep history clean
gh pr merge "$PR_NUMBER" --squash --delete-branch
```
### Clean up the worktree
The worktree served its purpose — remove it to avoid disk bloat:
```bash
cd "$ORIGINAL_DIR" # Return to original working directory
git worktree remove "$WORKTREE_PATH"
# Prune any stale worktree references
git worktree prune
```
### Report completion
Summarize what happened:
```
## PR Merged ✅
- **PR**: #{PR_NUMBER} — {PR_TITLE}
- **Branch**: {BRANCH_NAME} → {BASE_BRANCH}
- **Iterations**: {N} verification loops
- **Gates passed**: CI ✅ | review-work ✅ | Cubic ✅
- **Worktree**: cleaned up
```
</merge_cleanup>
---
## Failure Recovery
<failure_recovery>
If you hit an unrecoverable error (e.g., merge conflict with base branch, infrastructure failure):
1. **Do NOT delete the worktree** — the user may want to inspect or continue manually
2. Report what happened, what was attempted, and where things stand
3. Include the worktree path so the user can resume
For merge conflicts:
```bash
cd "$WORKTREE_PATH"
git fetch origin "$BASE_BRANCH"
git rebase "origin/$BASE_BRANCH"
# Resolve conflicts, then continue the loop
```
</failure_recovery>
---
## Anti-Patterns
| Violation | Why it fails | Severity |
|-----------|-------------|----------|
| Working in main worktree instead of isolated worktree | Pollutes user's working directory, may destroy uncommitted work | CRITICAL |
| Pushing directly to dev/master | Bypasses review entirely | CRITICAL |
| Skipping CI gate after code changes | review-work and Cubic may pass on stale code | CRITICAL |
| Fixing unrelated code during verification loop | Scope creep causes new failures | HIGH |
| Deleting worktree on failure | User loses ability to inspect/resume | HIGH |
| Ignoring Cubic false positives without justification | Cubic issues should be evaluated, not blindly dismissed | MEDIUM |
| Giant single commits | Harder to isolate failures, violates git-master principles | MEDIUM |
| Not running local checks before push | Wastes CI time on obvious failures | MEDIUM |

View File

@@ -0,0 +1,117 @@
---
globs: ["**/*.ts", "**/*.tsx"]
alwaysApply: false
description: "Enforces strict modular code architecture: SRP, no monolithic index.ts, 200 LOC hard limit"
---
<MANDATORY_ARCHITECTURE_RULE severity="BLOCKING" priority="HIGHEST">
# Modular Code Architecture — Zero Tolerance Policy
This rule is NON-NEGOTIABLE. Violations BLOCK all further work until resolved.
## Rule 1: index.ts is an ENTRY POINT, NOT a dumping ground
`index.ts` files MUST ONLY contain:
- Re-exports (`export { ... } from "./module"`)
- Factory function calls that compose modules
- Top-level wiring/registration (hook registration, plugin setup)
`index.ts` MUST NEVER contain:
- Business logic implementation
- Helper/utility functions
- Type definitions beyond simple re-exports
- Multiple unrelated responsibilities mixed together
**If you find mixed logic in index.ts**: Extract each responsibility into its own dedicated file BEFORE making any other changes. This is not optional.
## Rule 2: No Catch-All Files — utils.ts / service.ts are CODE SMELLS
A single `utils.ts`, `helpers.ts`, `service.ts`, or `common.ts` is a **gravity well** — every unrelated function gets tossed in, and it grows into an untestable, unreviewable blob.
**These file names are BANNED as top-level catch-alls.** Instead:
| Anti-Pattern | Refactor To |
|--------------|-------------|
| `utils.ts` with `formatDate()`, `slugify()`, `retry()` | `date-formatter.ts`, `slugify.ts`, `retry.ts` |
| `service.ts` handling auth + billing + notifications | `auth-service.ts`, `billing-service.ts`, `notification-service.ts` |
| `helpers.ts` with 15 unrelated exports | One file per logical domain |
**Design for reusability from the start.** Each module should be:
- **Independently importable** — no consumer should need to pull in unrelated code
- **Self-contained** — its dependencies are explicit, not buried in a shared grab-bag
- **Nameable by purpose** — the filename alone tells you what it does
If you catch yourself typing `utils.ts` or `service.ts`, STOP and name the file after what it actually does.
## Rule 3: Single Responsibility Principle — ABSOLUTE
Every `.ts` file MUST have exactly ONE clear, nameable responsibility.
**Self-test**: If you cannot describe the file's purpose in ONE short phrase (e.g., "parses YAML frontmatter", "matches rules against file paths"), the file does too much. Split it.
| Signal | Action |
|--------|--------|
| File has 2+ unrelated exported functions | **SPLIT NOW** — each into its own module |
| File mixes I/O with pure logic | **SPLIT NOW** — separate side effects from computation |
| File has both types and implementation | **SPLIT NOW** — types.ts + implementation.ts |
| You need to scroll to understand the file | **SPLIT NOW** — it's too large |
## Rule 4: 200 LOC Hard Limit — CODE SMELL DETECTOR
Any `.ts`/`.tsx` file exceeding **200 lines of code** (excluding prompt strings, template literals containing prompts, and `.md` content) is an **immediate code smell**.
**When you detect a file > 200 LOC**:
1. **STOP** current work
2. **Identify** the multiple responsibilities hiding in the file
3. **Extract** each responsibility into a focused module
4. **Verify** each resulting file is < 200 LOC and has a single purpose
5. **Resume** original work
Prompt-heavy files (agent definitions, skill definitions) where the bulk of content is template literal prompt text are EXEMPT from the LOC count — but their non-prompt logic must still be < 200 LOC.
### How to Count LOC
**Count these** (= actual logic):
- Import statements
- Variable/constant declarations
- Function/class/interface/type definitions
- Control flow (`if`, `for`, `while`, `switch`, `try/catch`)
- Expressions, assignments, return statements
- Closing braces `}` that belong to logic blocks
**Exclude these** (= not logic):
- Blank lines
- Comment-only lines (`//`, `/* */`, `/** */`)
- Lines inside template literals that are prompt/instruction text (e.g., the string body of `` const prompt = `...` ``)
- Lines inside multi-line strings used as documentation/prompt content
**Quick method**: Read the file → subtract blank lines, comment-only lines, and prompt string content → remaining count = LOC.
**Example**:
```typescript
// 1 import { foo } from "./foo"; ← COUNT
// 2 ← SKIP (blank)
// 3 // Helper for bar ← SKIP (comment)
// 4 export function bar(x: number) { ← COUNT
// 5 const prompt = ` ← COUNT (declaration)
// 6 You are an assistant. ← SKIP (prompt text)
// 7 Follow these rules: ← SKIP (prompt text)
// 8 `; ← COUNT (closing)
// 9 return process(prompt, x); ← COUNT
// 10 } ← COUNT
```
→ LOC = **5** (lines 1, 4, 5, 9, 10). Not 10.
When in doubt, **round up** — err on the side of splitting.
## How to Apply
When reading, writing, or editing ANY `.ts`/`.tsx` file:
1. **Check the file you're touching** — does it violate any rule above?
2. **If YES** — refactor FIRST, then proceed with your task
3. **If creating a new file** — ensure it has exactly one responsibility and stays under 200 LOC
4. **If adding code to an existing file** — verify the addition doesn't push the file past 200 LOC or add a second responsibility. If it does, extract into a new module.
</MANDATORY_ARCHITECTURE_RULE>

232
AGENTS.md
View File

@@ -1,145 +1,157 @@
# PROJECT KNOWLEDGE BASE
# oh-my-opencode — O P E N C O D E Plugin
**Generated:** 2026-01-25T13:10:00+09:00
**Commit:** 043b1a33
**Branch:** dev
**Generated:** 2026-03-06 | **Commit:** 7fe44024 | **Branch:** dev
## OVERVIEW
OpenCode plugin: multi-model agent orchestration (Claude Opus 4.5, GPT-5.2, Gemini 3 Flash, Grok Code, GLM-4.7). 31 lifecycle hooks, 20+ tools (LSP, AST-Grep, delegation), 10 specialized agents, full Claude Code compatibility. "oh-my-zsh" for OpenCode.
OpenCode plugin (npm: `oh-my-opencode`) that extends Claude Code (OpenCode fork) with multi-agent orchestration, 48 lifecycle hooks, 26 tools, skill/command/MCP systems, and Claude Code compatibility. 1268 TypeScript files, 160k LOC.
## STRUCTURE
```
oh-my-opencode/
├── src/
│ ├── agents/ # 10 AI agents - see src/agents/AGENTS.md
│ ├── hooks/ # 31 lifecycle hooks - see src/hooks/AGENTS.md
│ ├── tools/ # 20+ tools - see src/tools/AGENTS.md
│ ├── features/ # Background agents, Claude Code compat - see src/features/AGENTS.md
│ ├── shared/ # 50 cross-cutting utilities - see src/shared/AGENTS.md
│ ├── cli/ # CLI installer, doctor - see src/cli/AGENTS.md
│ ├── mcp/ # Built-in MCPs - see src/mcp/AGENTS.md
│ ├── config/ # Zod schema, TypeScript types
── index.ts # Main plugin entry (601 lines)
├── script/ # build-schema.ts, build-binaries.ts
├── packages/ # 7 platform-specific binaries
└── dist/ # Build output (ESM + .d.ts)
│ ├── index.ts # Plugin entry: loadConfig → createManagers → createTools → createHooks → createPluginInterface
│ ├── plugin-config.ts # JSONC multi-level config: user → project → defaults (Zod v4)
│ ├── agents/ # 11 agents (Sisyphus, Hephaestus, Oracle, Librarian, Explore, Atlas, Prometheus, Metis, Momus, Multimodal-Looker, Sisyphus-Junior)
│ ├── hooks/ # 48 lifecycle hooks across dedicated modules and standalone files
│ ├── tools/ # 26 tools across 15 directories
│ ├── features/ # 19 feature modules (background-agent, skill-loader, tmux, MCP-OAuth, etc.)
│ ├── shared/ # 95+ utility files in 13 categories
│ ├── config/ # Zod v4 schema system (24 files)
── cli/ # CLI: install, run, doctor, mcp-oauth (Commander.js)
│ ├── mcp/ # 3 built-in remote MCPs (websearch, context7, grep_app)
├── plugin/ # 8 OpenCode hook handlers + 48 hook composition
│ └── plugin-handlers/ # 6-phase config loading pipeline
├── packages/ # Monorepo: cli-runner, 12 platform binaries
└── local-ignore/ # Dev-only test fixtures
```
## INITIALIZATION FLOW
```
OhMyOpenCodePlugin(ctx)
├─→ loadPluginConfig() # JSONC parse → project/user merge → Zod validate → migrate
├─→ createManagers() # TmuxSessionManager, BackgroundManager, SkillMcpManager, ConfigHandler
├─→ createTools() # SkillContext + AvailableCategories + ToolRegistry (26 tools)
├─→ createHooks() # 3-tier: Core(39) + Continuation(7) + Skill(2) = 48 hooks
└─→ createPluginInterface() # 8 OpenCode hook handlers → PluginInterface
```
## 8 OPENCODE HOOK HANDLERS
| Handler | Purpose |
|---------|---------|
| `config` | 6-phase: provider → plugin-components → agents → tools → MCPs → commands |
| `tool` | 26 registered tools |
| `chat.message` | First-message variant, session setup, keyword detection |
| `chat.params` | Anthropic effort level adjustment |
| `chat.headers` | Copilot x-initiator header injection |
| `event` | Session lifecycle (created, deleted, idle, error) |
| `tool.execute.before` | Pre-tool hooks (file guard, label truncator, rules injector) |
| `tool.execute.after` | Post-tool hooks (output truncation, metadata store) |
| `experimental.chat.messages.transform` | Context injection, thinking block validation |
## WHERE TO LOOK
| Task | Location | Notes |
|------|----------|-------|
| Add agent | `src/agents/` | Create .ts with factory, add to `agentSources` |
| Add hook | `src/hooks/` | Create dir with `createXXXHook()`, register in index.ts |
| Add tool | `src/tools/` | Dir with index/types/constants/tools.ts |
| Add MCP | `src/mcp/` | Create config, add to index.ts |
| Add skill | `src/features/builtin-skills/` | Create dir with SKILL.md |
| Add command | `src/features/builtin-commands/` | Add template + register in commands.ts |
| Config schema | `src/config/schema.ts` | Zod schema, run `bun run build:schema` |
| Background agents | `src/features/background-agent/` | manager.ts (1335 lines) |
| Orchestrator | `src/hooks/atlas/` | Main orchestration hook (773 lines) |
| Add new agent | `src/agents/` + `src/agents/builtin-agents/` | Follow createXXXAgent factory pattern |
| Add new hook | `src/hooks/{name}/` + register in `src/plugin/hooks/create-*-hooks.ts` | Match event type to tier |
| Add new tool | `src/tools/{name}/` + register in `src/plugin/tool-registry.ts` | Follow createXXXTool factory |
| Add new feature module | `src/features/{name}/` | Standalone module, wire in plugin/ |
| Add new MCP | `src/mcp/` + register in `createBuiltinMcps()` | Remote HTTP only |
| Add new skill | `src/features/builtin-skills/skills/` | Implement BuiltinSkill interface |
| Add new command | `src/features/builtin-commands/` | Template in templates/ |
| Add new CLI command | `src/cli/cli-program.ts` | Commander.js subcommand |
| Add new doctor check | `src/cli/doctor/checks/` | Register in checks/index.ts |
| Modify config schema | `src/config/schema/` + update root schema | Zod v4, add to OhMyOpenCodeConfigSchema |
| Add new category | `src/tools/delegate-task/constants.ts` | DEFAULT_CATEGORIES + CATEGORY_MODEL_REQUIREMENTS |
## TDD (Test-Driven Development)
## MULTI-LEVEL CONFIG
**MANDATORY.** RED-GREEN-REFACTOR:
1. **RED**: Write test → `bun test` → FAIL
2. **GREEN**: Implement minimum → PASS
3. **REFACTOR**: Clean up → stay GREEN
```
Project (.opencode/oh-my-opencode.jsonc) → User (~/.config/opencode/oh-my-opencode.jsonc) → Defaults
```
**Rules:**
- NEVER write implementation before test
- NEVER delete failing tests - fix the code
- Test file: `*.test.ts` alongside source
- BDD comments: `#given`, `#when`, `#then`
- `agents`, `categories`, `claude_code`: deep merged recursively
- `disabled_*` arrays: Set union (concatenated + deduplicated)
- All other fields: override replaces base value
- Zod `safeParse()` fills defaults for omitted fields
- `migrateConfigFile()` transforms legacy keys automatically
Fields: agents (14 overridable, 21 fields each), categories (8 built-in + custom), disabled_* arrays (agents, hooks, mcps, skills, commands, tools), 19 feature-specific configs.
## THREE-TIER MCP SYSTEM
| Tier | Source | Mechanism |
|------|--------|-----------|
| Built-in | `src/mcp/` | 3 remote HTTP: websearch (Exa/Tavily), context7, grep_app |
| Claude Code | `.mcp.json` | `${VAR}` env expansion via claude-code-mcp-loader |
| Skill-embedded | SKILL.md YAML | Managed by SkillMcpManager (stdio + HTTP) |
## CONVENTIONS
- **Package manager**: Bun only (`bun run`, `bun build`, `bunx`)
- **Types**: bun-types (NEVER @types/node)
- **Build**: `bun build` (ESM) + `tsc --emitDeclarationOnly`
- **Exports**: Barrel pattern via index.ts
- **Naming**: kebab-case dirs, `createXXXHook`/`createXXXTool` factories
- **Testing**: BDD comments, 95 test files
- **Temperature**: 0.1 for code agents, max 0.3
- **Runtime**: Bun only — never use npm/yarn
- **TypeScript**: strict mode, ESNext, bundler moduleResolution, `bun-types` (never `@types/node`)
- **Test pattern**: Bun test (`bun:test`), co-located `*.test.ts`, given/when/then style (nested describe with `#given`/`#when`/`#then` prefixes)
- **CI test split**: mock-heavy tests run in isolation (separate `bun test` processes), rest in batch
- **Factory pattern**: `createXXX()` for all tools, hooks, agents
- **Hook tiers**: Session (23) → Tool-Guard (12) → Transform (4) → Continuation (7) → Skill (2)
- **Agent modes**: `primary` (respects UI model) vs `subagent` (own fallback chain) vs `all`
- **Model resolution**: 4-step: override → category-default → provider-fallback → system-default
- **Config format**: JSONC with comments, Zod v4 validation, snake_case keys
- **File naming**: kebab-case for all files/directories
- **Module structure**: index.ts barrel exports, no catch-all files (utils.ts, helpers.ts banned), 200 LOC soft limit
- **Imports**: relative within module, barrel imports across modules (`import { log } from "./shared"`)
- **No path aliases**: no `@/` — relative imports only
## ANTI-PATTERNS
| Category | Forbidden |
|----------|-----------|
| Package Manager | npm, yarn - Bun exclusively |
| Types | @types/node - use bun-types |
| File Ops | mkdir/touch/rm/cp/mv in code - use bash tool |
| Publishing | Direct `bun publish` - GitHub Actions only |
| Versioning | Local version bump - CI manages |
| Type Safety | `as any`, `@ts-ignore`, `@ts-expect-error` |
| Error Handling | Empty catch blocks |
| Testing | Deleting failing tests |
| Agent Calls | Sequential - use `delegate_task` parallel |
| Hook Logic | Heavy PreToolUse - slows every call |
| Commits | Giant (3+ files), separate test from impl |
| Temperature | >0.3 for code agents |
| Trust | Agent self-reports - ALWAYS verify |
## AGENT MODELS
| Agent | Model | Purpose |
|-------|-------|---------|
| Sisyphus | anthropic/claude-opus-4-5 | Primary orchestrator |
| Atlas | anthropic/claude-opus-4-5 | Master orchestrator |
| oracle | openai/gpt-5.2 | Consultation, debugging |
| librarian | opencode/big-pickle | Docs, GitHub search |
| explore | opencode/gpt-5-nano | Fast codebase grep |
| multimodal-looker | google/gemini-3-flash | PDF/image analysis |
| Prometheus | anthropic/claude-opus-4-5 | Strategic planning |
- Never use `as any`, `@ts-ignore`, `@ts-expect-error`
- Never suppress lint/type errors
- Never add emojis to code/comments unless user explicitly asks
- Never commit unless explicitly requested
- Never run `bun publish` directly — use GitHub Actions
- Never modify `package.json` version locally
- Test: given/when/then — never use Arrange-Act-Assert comments
- Comments: avoid AI-generated comment patterns (enforced by comment-checker hook)
- Never create catch-all files (`utils.ts`, `helpers.ts`, `service.ts`)
- Empty catch blocks `catch(e) {}` — always handle errors
- Never use em dashes (—), en dashes (), or AI filler phrases in generated content
- index.ts is entry point ONLY — never dump business logic there
## COMMANDS
```bash
bun run typecheck # Type check
bun run build # ESM + declarations + schema
bun run rebuild # Clean + Build
bun test # 95 test files
bun test # Bun test suite
bun run build # Build plugin (ESM + declarations + schema)
bun run build:all # Build + platform binaries
bun run typecheck # tsc --noEmit
bunx oh-my-opencode install # Interactive setup
bunx oh-my-opencode doctor # Health diagnostics
bunx oh-my-opencode run # Non-interactive session
```
## DEPLOYMENT
## CI/CD
**GitHub Actions workflow_dispatch ONLY**
1. Commit & push changes
2. Trigger: `gh workflow run publish -f bump=patch`
3. Never `bun publish` directly, never bump version locally
## COMPLEXITY HOTSPOTS
| File | Lines | Description |
|------|-------|-------------|
| `src/features/background-agent/manager.ts` | 1335 | Task lifecycle, concurrency |
| `src/features/builtin-skills/skills.ts` | 1203 | Skill definitions |
| `src/agents/prometheus-prompt.ts` | 1196 | Planning agent |
| `src/tools/delegate-task/tools.ts` | 1039 | Category-based delegation |
| `src/hooks/atlas/index.ts` | 773 | Orchestrator hook |
| `src/cli/config-manager.ts` | 664 | JSONC config parsing |
| `src/features/builtin-commands/templates/refactor.ts` | 619 | Refactor command template |
| `src/index.ts` | 601 | Main plugin entry |
| `src/tools/lsp/client.ts` | 596 | LSP JSON-RPC client |
| `src/agents/atlas.ts` | 572 | Atlas orchestrator agent |
## MCP ARCHITECTURE
Three-tier system:
1. **Built-in**: websearch (Exa), context7 (docs), grep_app (GitHub)
2. **Claude Code compat**: .mcp.json with `${VAR}` expansion
3. **Skill-embedded**: YAML frontmatter in skills
## CONFIG SYSTEM
- **Zod validation**: `src/config/schema.ts`
- **JSONC support**: Comments, trailing commas
- **Multi-level**: Project (`.opencode/`) → User (`~/.config/opencode/`)
| Workflow | Trigger | Purpose |
|----------|---------|---------|
| ci.yml | push/PR to master/dev | Tests (split: mock-heavy isolated + batch), typecheck, build, schema auto-commit |
| publish.yml | manual dispatch | Version bump, npm publish, platform binaries, GitHub release, merge to master |
| publish-platform.yml | called by publish | 12 platform binaries via bun compile (darwin/linux/windows) |
| sisyphus-agent.yml | @mention / dispatch | AI agent handles issues/PRs |
| cla.yml | issue_comment/PR | CLA assistant for contributors |
| lint-workflows.yml | push to .github/ | actionlint + shellcheck on workflow files |
## NOTES
- **OpenCode**: Requires >= 1.0.150
- **Flaky tests**: ralph-loop (CI timeout), session-state (parallel pollution)
- **Trusted deps**: @ast-grep/cli, @ast-grep/napi, @code-yeongyu/comment-checker
- Logger writes to `/tmp/oh-my-opencode.log` — check there for debugging
- Background tasks: 5 concurrent per model/provider (configurable)
- Plugin load timeout: 10s for Claude Code plugins
- Model fallback priority: Claude > OpenAI > Gemini > Copilot > OpenCode Zen > Z.ai > Kimi
- Config migration runs automatically on legacy keys (agent names, hook names, model versions)
- Build: bun build (ESM) + tsc --emitDeclarationOnly, externals: @ast-grep/napi
- Test setup: `test-setup.ts` preloaded via bunfig.toml, mock-heavy tests run in isolation in CI
- 98 barrel export files (index.ts) establish module boundaries
- Architecture rules enforced via `.sisyphus/rules/modular-code-enforcement.md`

View File

@@ -31,6 +31,7 @@ Be respectful, inclusive, and constructive. We're all here to make better tools
**English is the primary language for all communications in this repository.**
This includes:
- Issues and bug reports
- Pull requests and code reviews
- Documentation and comments
@@ -45,6 +46,7 @@ This includes:
### Need Help with English?
If English isn't your first language, don't worry! We value your contributions regardless of perfect grammar. You can:
- Use translation tools to help compose messages
- Ask for help from other community members
- Focus on clear, simple communication rather than perfect prose
@@ -61,8 +63,8 @@ If English isn't your first language, don't worry! We value your contributions r
```bash
# Clone the repository
git clone https://github.com/code-yeongyu/oh-my-opencode.git
cd oh-my-opencode
git clone https://github.com/code-yeongyu/oh-my-openagent.git
cd oh-my-openagent
# Install dependencies (bun only - never use npm/yarn)
bun install
@@ -76,25 +78,24 @@ bun run build
After making changes, you can test your local build in OpenCode:
1. **Build the project**:
```bash
bun run build
```
2. **Update your OpenCode config** (`~/.config/opencode/opencode.json` or `opencode.jsonc`):
```json
{
"plugin": [
"file:///absolute/path/to/oh-my-opencode/dist/index.js"
]
"plugin": ["file:///absolute/path/to/oh-my-opencode/dist/index.js"]
}
```
For example, if your project is at `/Users/yourname/projects/oh-my-opencode`:
```json
{
"plugin": [
"file:///Users/yourname/projects/oh-my-opencode/dist/index.js"
]
"plugin": ["file:///Users/yourname/projects/oh-my-opencode/dist/index.js"]
}
```
@@ -109,18 +110,20 @@ After making changes, you can test your local build in OpenCode:
```
oh-my-opencode/
├── src/
│ ├── agents/ # AI agents (OmO, oracle, librarian, explore, etc.)
│ ├── hooks/ # 21 lifecycle hooks
│ ├── tools/ # LSP (11), AST-Grep, Grep, Glob, etc.
│ ├── mcp/ # MCP server integrations (context7, grep_app)
│ ├── features/ # Claude Code compatibility layers
│ ├── config/ # Zod schemas and TypeScript types
│ ├── auth/ # Google Antigravity OAuth
│ ├── shared/ # Common utilities
── index.ts # Main plugin entry (OhMyOpenCodePlugin)
├── script/ # Build utilities (build-schema.ts, publish.ts)
├── assets/ # JSON schema
└── dist/ # Build output (ESM + .d.ts)
│ ├── index.ts # Plugin entry (OhMyOpenCodePlugin)
│ ├── plugin-config.ts # JSONC multi-level config (Zod v4)
│ ├── agents/ # 11 agents (Sisyphus, Hephaestus, Oracle, Librarian, Explore, Atlas, Prometheus, Metis, Momus, Multimodal-Looker, Sisyphus-Junior)
│ ├── hooks/ # Lifecycle hooks for orchestration, recovery, UX, and context management
│ ├── tools/ # 26 tools across 15 directories
│ ├── mcp/ # 3 built-in remote MCPs (websearch, context7, grep_app)
│ ├── features/ # 19 feature modules (background-agent, skill-loader, tmux, MCP-OAuth, etc.)
│ ├── config/ # Zod v4 schema system
── shared/ # Cross-cutting utilities
│ ├── cli/ # CLI: install, run, doctor, mcp-oauth (Commander.js)
│ ├── plugin/ # 8 OpenCode hook handlers + hook composition
│ └── plugin-handlers/ # 6-phase config loading pipeline
├── packages/ # Monorepo: comment-checker, opencode-sdk
└── dist/ # Build output (ESM + .d.ts)
```
## Development Workflow
@@ -134,8 +137,11 @@ bun run typecheck
# Full build (ESM + TypeScript declarations + JSON schema)
bun run build
# Clean build output and rebuild
bun run rebuild
# Clean build output
bun run clean
# Rebuild from scratch
bun run clean && bun run build
# Build schema only (after modifying src/config/schema.ts)
bun run build:schema
@@ -143,17 +149,18 @@ bun run build:schema
### Code Style & Conventions
| Convention | Rule |
|------------|------|
| Package Manager | **Bun only** (`bun run`, `bun build`, `bunx`) |
| Types | Use `bun-types`, not `@types/node` |
| Directory Naming | kebab-case (`ast-grep/`, `claude-code-hooks/`) |
| File Operations | Never use bash commands (mkdir/touch/rm) for file creation in code |
| Tool Structure | Each tool: `index.ts`, `types.ts`, `constants.ts`, `tools.ts`, `utils.ts` |
| Hook Pattern | `createXXXHook(input: PluginInput)` function naming |
| Exports | Barrel pattern (`export * from "./module"` in index.ts) |
| Convention | Rule |
| ---------------- | ------------------------------------------------------------------------- |
| Package Manager | **Bun only** (`bun run`, `bun build`, `bunx`) |
| Types | Use `bun-types`, not `@types/node` |
| Directory Naming | kebab-case (`ast-grep/`, `claude-code-hooks/`) |
| File Operations | Never use bash commands (mkdir/touch/rm) for file creation in code |
| Tool Structure | Each tool: `index.ts`, `types.ts`, `constants.ts`, `tools.ts`, `utils.ts` |
| Hook Pattern | `createXXXHook(input: PluginInput)` function naming |
| Exports | Barrel pattern (`export * from "./module"` in index.ts) |
**Anti-Patterns (Do Not Do)**:
- Using npm/yarn instead of bun
- Using `@types/node` instead of `bun-types`
- Suppressing TypeScript errors with `as any`, `@ts-ignore`, `@ts-expect-error`
@@ -177,7 +184,7 @@ import type { AgentConfig } from "./types";
export const myAgent: AgentConfig = {
name: "my-agent",
model: "anthropic/claude-sonnet-4-5",
model: "anthropic/claude-opus-4-6",
description: "Description of what this agent does",
prompt: `Your agent's system prompt here`,
temperature: 0.1,

122
FIX-BLOCKS.md Normal file
View File

@@ -0,0 +1,122 @@
# Pre-Publish BLOCK Issues: Fix ALL Before Release
Two independent pre-publish reviews (Opus 4.6 + GPT-5.4) both concluded **BLOCK -- do not publish**. You must fix ALL blocking issues below using UltraBrain parallel agents. Work TDD-style: write/update tests first, then fix, verify tests pass.
## Strategy
Use ultrawork (ulw) to spawn UltraBrain agents in parallel. Each UB agent gets a non-overlapping scope. After all agents complete, run bun test to verify everything passes. Commit atomically per fix group.
---
## CRITICAL BLOCKERS (must fix -- 6 items)
### C1: Hashline Backward Compatibility
**Problem:** Strict whitespace hashing in hashline changes LINE#ID values for indented lines. Breaks existing anchors in cached/persisted edit operations.
**Fix:** Add a compatibility shim -- when lookup by new hash fails, fall back to legacy hash (without strict whitespace). Or version the hash format.
**Files:** Look for hashline-related files in src/tools/ or src/shared/
### C2: OpenAI-Only Model Catalog Broken with OpenCode-Go
**Problem:** isOpenAiOnlyAvailability() does not exclude availability.opencodeGo. When OpenCode-Go is present, OpenAI-only detection is wrong -- models get misrouted.
**Fix:** Add !availability.opencodeGo check to isOpenAiOnlyAvailability().
**Files:** Model/provider system files -- search for isOpenAiOnlyAvailability
### C3: CLI/Runtime Model Table Divergence
**Problem:** Model tables disagree between CLI install-time and runtime:
- ultrabrain: gpt-5.3-codex in CLI vs gpt-5.4 in runtime
- atlas: claude-sonnet-4-5 in CLI vs claude-sonnet-4-6 in runtime
- unspecified-high also diverges
**Fix:** Reconcile all model tables. Pick the correct model for each and make CLI + runtime match.
**Files:** Search for model table definitions, agent configs, CLI model references
### C4: atlas/metis/sisyphus-junior Missing OpenAI Fallbacks
**Problem:** These agents can resolve to opencode/glm-4.7-free or undefined in OpenAI-only environments. No valid OpenAI fallback paths exist.
**Fix:** Add valid OpenAI model fallback paths for all agents that need them.
**Files:** Agent config/model resolution code
### C5: model_fallback Default Mismatch
**Problem:** Schema and docs say model_fallback defaults to false, but runtime treats unset as true. Silent behavior change for all users.
**Fix:** Align -- either update schema/docs to say true, or fix runtime to default to false. Check what the intended behavior is from git history.
**Files:** Schema definition, runtime config loading
### C6: background_output Default Changed
**Problem:** background_output now defaults to full_session=true. Old callers get different output format without code changes.
**Fix:** Either document this change clearly, or restore old default and make full_session opt-in.
**Files:** Background output handling code
---
## HIGH PRIORITY (strongly recommended -- 4 items)
### H1: Runtime Fallback session-status-handler Race
**Problem:** When fallback model is already pending, the handler cannot advance the chain on subsequent cooldown events.
**Fix:** Allow override like message-update-handler does.
**Files:** Search for session-status-handler, message-update-handler
### H2: Atlas Final-Wave Approval Gate Logic
**Problem:** Approval gate logic does not match real Prometheus plan structure (nested checkboxes, parallel execution). Trigger logic is wrong.
**Fix:** Update to handle real plan structures.
**Files:** Atlas agent code, approval gate logic
### H3: delegate-task-english-directive Dead Code
**Problem:** Not dispatched from tool-execute-before.ts + wrong hook signature. Either wire properly or remove entirely.
**Fix:** Remove if not needed (cleaner). If needed, fix dispatch + signature.
**Files:** src/hooks/, tool-execute-before.ts
### H4: Auto-Slash-Command Session-Lifetime Dedup
**Problem:** Dedup uses session lifetime, suppressing legitimate repeated identical commands.
**Fix:** Change to short TTL (e.g., 30 seconds) instead of session lifetime.
**Files:** Slash command handling code
---
## ADDITIONAL BLOCKERS FROM GPT-5.4 REVIEW
### G1: Package Identity Split-Brain
**Problem:** Installer writes oh-my-openagent but doctor, auto-update, version lookup, publish workflow still reference oh-my-opencode. Half-migrated state.
**Fix:** Audit ALL references to package name. Either complete the migration consistently or revert to single name for this release.
**Files:** Installer, doctor, auto-update, version lookup, publish workflow -- grep for both package names
### G2: OpenCode-Go --opencode-go Value Validation
**Problem:** No validation for --opencode-go CLI value. No detection of existing OpenCode-Go installations.
**Fix:** Add value validation + existing install detection.
**Files:** CLI option handling code
### G3: Skill/Hook Reference Errors
**Problem:**
- work-with-pr references non-existent git tool category
- github-triage references TaskCreate/TaskUpdate which are not real tool names
**Fix:** Fix tool references to use actual tool names.
**Files:** Skill definition files in .opencode/skills/
### G4: Stale Context-Limit Cache
**Problem:** Shared context-limit resolver caches provider config. When config changes, stale removed limits persist and corrupt compaction/truncation decisions.
**Fix:** Add cache invalidation when provider config changes, or make the resolver stateless.
**Files:** Context-limit resolver, compaction code
### G5: disabled_hooks Schema vs Runtime Contract Mismatch
**Problem:** Schema is strict (rejects unknown hook names) but runtime is permissive (ignores unknown). Contract disagreement.
**Fix:** Align -- either make both strict or both permissive.
**Files:** Hook schema definition, runtime hook loading
---
## EXECUTION INSTRUCTIONS
1. Spawn UltraBrain agents to fix these in parallel -- group by file proximity:
- UB-1: C1 (hashline) + H4 (slash-command dedup)
- UB-2: C2 + C3 + C4 (model/provider system) + G2
- UB-3: C5 + C6 (config defaults) + G5
- UB-4: H1 + H2 (runtime handlers + Atlas gate)
- UB-5: H3 + G3 (dead code + skill references)
- UB-6: G1 (package identity -- full audit)
- UB-7: G4 (context-limit cache)
2. Each UB agent MUST:
- Write or update tests FIRST (TDD)
- Implement the fix
- Run bun test on affected test files
- Commit with descriptive message
3. After all UB agents complete, run full bun test to verify no regressions.
ulw

View File

@@ -1,270 +1,301 @@
> [!WARNING]
> **セキュリティ警告:なりすましサイト**
> **一時的なお知らせ(今週): メンテナー対応遅延のお知らせ**
>
> **ohmyopencode.comは本プロジェクトとは一切関係ありません。** 当方はそのサイトを運営しておらず、推奨もしていません
> コアメンテナーのQが負傷したため、今週は Issue/PR への返信とリリースが遅れる可能性があります
> ご理解とご支援に感謝します。
> [!TIP]
> **Building in Public**
>
> OhMyOpenCodeは**無料かつオープンソース**です。「公式」を名乗るサードパーティサイトでインストーラーをダウンロードしたり、支払い情報を入力したり**しないでください**
> メンテナーが Jobdori を使い、oh-my-opencode をリアルタイムで開発・メンテナンスしています。Jobdori は OpenClaw をベースに大幅カスタマイズされた AI アシスタントです
> すべての機能開発、修正、Issue トリアージを Discord でライブでご覧いただけます。
>
> なりすましサイトはペイウォールの裏にあるため、**何が配布されているか確認できません**。そこからのダウンロードは**潜在的に危険なもの**として扱ってください。
> [![Building in Public](./.github/assets/building-in-public.png)](https://discord.gg/PUwSMR9XNk)
>
> ✅ 公式ダウンロードhttps://github.com/code-yeongyu/oh-my-opencode/releases
> [**→ #building-in-public で確認する**](https://discord.gg/PUwSMR9XNk)
> [!NOTE]
>
> [![Sisyphus Labs Sisyphus is the agent that codes like your team.](./.github/assets/sisyphuslabs.png?v=2)](https://sisyphuslabs.ai)
> > **Sisyphusの完全製品化バージョンを構築中です。フロンティアエージェントの未来を定義します。<br />[こちら](https://sisyphuslabs.ai)からウェイトリストに参加してください。**
> [![Sisyphus Labs - Sisyphus is the agent that codes like your team.](./.github/assets/sisyphuslabs.png?v=2)](https://sisyphuslabs.ai)
> > **私たちは、フロンティアエージェントの未来を定義するために、Sisyphusの完全なプロダクト版を構築しています。 <br />[こちら](https://sisyphuslabs.ai)からウェイトリストにご登録ください。**
> [!TIP]
> 私たちと一緒に!
>
> [![Oh My OpenCode 3.0が正式リリースされました!](./.github/assets/orchestrator-atlas.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0)
> > **Oh My OpenCode 3.0が正式リリースされました!`oh-my-opencode@latest`を使用してインストールしてください。**
>
> 一緒に歩みましょう!
>
> | [<img alt="Discord link" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PUwSMR9XNk) | [Discordコミュニティ](https://discord.gg/PUwSMR9XNk)に参加して、コントリビューターや`oh-my-opencode`仲間とつながりましょう。 |
> | [<img alt="Discord link" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PUwSMR9XNk) | [Discordコミュニティ](https://discord.gg/PUwSMR9XNk)に参加して、コントリビューターや他の `oh-my-opencode` ユーザーと交流しましょう。 |
> | :-----| :----- |
> | [<img alt="X link" src="https://img.shields.io/badge/Follow-%40justsisyphus-00CED1?style=flat-square&logo=x&labelColor=black" width="156px" />](https://x.com/justsisyphus) | `oh-my-opencode`に関するニュースは私のXアカウントで投稿ていましたが、無実の罪で凍結されたため、<br />[@justsisyphus](https://x.com/justsisyphus)が代わりに更新を投稿しています。 |
> | [<img alt="GitHub Follow" src="https://img.shields.io/github/followers/code-yeongyu?style=flat-square&logo=github&labelColor=black&color=24292f" width="156px" />](https://github.com/code-yeongyu) | GitHubで[@code-yeongyu](https://github.com/code-yeongyu)をフォローして、他のプロジェクトもチェックしてください。 |
> | [<img alt="X link" src="https://img.shields.io/badge/Follow-%40justsisyphus-00CED1?style=flat-square&logo=x&labelColor=black" width="156px" />](https://x.com/justsisyphus) | `oh-my-opencode` のニュースやアップデートは私のXアカウントで投稿されていましたが、 <br /> 誤って凍結されてしまったため、現在は [@justsisyphus](https://x.com/justsisyphus) が代わりにアップデートを投稿しています。 |
> | [<img alt="GitHub Follow" src="https://img.shields.io/github/followers/code-yeongyu?style=flat-square&logo=github&labelColor=black&color=24292f" width="156px" />](https://github.com/code-yeongyu) | さらに多くのプロジェクトを見たい場合は、GitHubで [@code-yeongyu](https://github.com/code-yeongyu) をフォローしてください。 |
<!-- <CENTERED SECTION FOR GITHUB DISPLAY> -->
<div align="center">
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-opencode#oh-my-opencode)
[![Preview](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-opencode#oh-my-opencode)
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
[![Preview](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
</div>
> `oh-my-opencode` をインストールして、ドーピングしたかのようにコーディングしましょう。バックグラウンドでエージェントを走らせ、oracle、librarian、frontend engineer のような専門エージェントを呼び出してください。丹精込めて作られた LSP/AST ツール、厳選された MCP、そして完全な Claude Code 互換レイヤーを、たった一行で手に入れましょう
# Claude OAuth アクセスに関するお知らせ
## TL;DR
> Q. oh-my-opencodeを使用できますか
はい。
> Q. Claude Codeのサブスクリプションで使用できますか
はい、技術的には可能です。ただし、使用を推奨することはできません。
## 詳細
> 2026年1月より、AnthropicはToS違反を理由にサードパーティのOAuthアクセスを制限しました。
> これはステロイドを打ったコーディングです。一つのモデルのステロイドじゃない——薬局丸ごとです
>
> [**Anthropicはこのプロジェクト oh-my-opencode を、opencodeをブロックする正当化の根拠として挙げています。**](https://x.com/thdxr/status/2010149530486911014)
>
> 実際、Claude CodeのOAuthリクエストシグネチャを偽装するプラグインがコミュニティに存在します。
>
> これらのツールは技術的な検出可能性に関わらず動作する可能性がありますが、ユーザーはToSへの影響を認識すべきであり、私個人としてはそれらの使用を推奨できません。
>
> このプロジェクトは非公式ツールの使用に起因するいかなる問題についても責任を負いません。また、**私たちはそれらのOAuthシステムのカスタム実装を一切持っていません。**
> Claudeでオーケストレーションし、GPTで推論し、Kimiでスピードを出し、Geminiでビジョンを処理する。モデルはどんどん安くなり、どんどん賢くなる。特定のプロバイダーが独占することはない。私たちはその開かれた市場のために構築している。Anthropicの牢獄は素敵だ。だが、私たちはそこに住まない。
<div align="center">
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-opencode?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/releases)
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-openagent?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/releases)
[![npm downloads](https://img.shields.io/npm/dt/oh-my-opencode?color=ff6b35&labelColor=black&style=flat-square)](https://www.npmjs.com/package/oh-my-opencode)
[![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-opencode?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-opencode?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-opencode?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/stargazers)
[![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-opencode?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/issues)
[![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/blob/master/LICENSE.md)
[![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-openagent?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-openagent?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-openagent?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/stargazers)
[![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-openagent?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/issues)
[![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/blob/dev/LICENSE.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-openagent)
[English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-cn.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-opencode)
</div>
<!-- </CENTERED SECTION FOR GITHUB DISPLAY> -->
## ユーザーレビュー
## レビュー
> "Cursorのサブスクリプションを解約しました。オープンソースコミュニティで信じられないことが起きています。" - [Arthur Guiot](https://x.com/arthur_guiot/status/2008736347092382053?s=20)
> 「これのおかげで Cursor のサブスクリプションを解約しました。オープンソースコミュニティで信じられないことが起きています。 - [Arthur Guiot](https://x.com/arthur_guiot/status/2008736347092382053?s=20)
> "人間が3ヶ月かかる仕事をClaude Codeが7日でやるら、Sisyphusは1時間でやます。タスクが完了するまでただ動き続ける。It is a discipline agent." — B, Quant Researcher
> 「Claude Codeが人間なら3ヶ月かかることを7日でやるとしたら、Sisyphusはそれを1時間でやってのけます。タスクが終わるまでひたすら働き続けます。まさに規律あるエージェントです。」 <br/>- B, Quant Researcher
> "Oh My Opencodeを使って、たった1日で8000個のeslint警告を解消しました" — [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> Oh My Opencodeを使って、たった1日で8000個の eslint 警告を叩き潰しました。」 <br/>- [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> "Ohmyopencodeとralph loopを使って、一晩で45,000行のtauriアプリをSaaSウェブアプリに変換しました。インタビュープロンプトから始めて、質問に対する評価と推奨を求めました。作業する様子を見ているのは驚きでしたし、朝起きたらほぼ完成したウェブサイトがありました!" - [James Hargis](https://x.com/hargabyte/status/2007299688261882202)
> Ohmyopencodeとralph loopを使って、45k行のtauriアプリを一晩でSaaSウェブアプリに変換しました。インタビューモードから始めて、私のプロンプトに対して質問や推奨事項を尋ねました。勝手に作業していくのを見るのは楽しかったし、朝起きたらウェブサイトがほぼ動いているのを見て驚愕しました! - [James Hargis](https://x.com/hargabyte/status/2007299688261882202)
> "oh-my-opencodeを使ってくださいもう戻れませんよ" — [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> oh-my-opencodeを使ってくださいもう二度と元には戻れません。」 <br/>- [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> "何どうすごいのかあまり言語化できないけど、開発体験が異次元に上がった。" - [苔硯:こけすずり](https://x.com/kokesuzuri/status/2008532913961529372?s=20)
> 「何がどうすごいのかまだ上手く言語化できないんですが、開発体験が完全に異次元に到達してしまいました。 - [苔硯:こけすずり](https://x.com/kokesuzuri/status/2008532913961529372?s=20)
> "今週末はopen code、oh my opencode、supermemoryでマインクラフト/ソウルライクな何かを作る実験をしています。"
> "昼食後の散歩に行く間に、しゃがみアニメーションを追加するよう頼みました。[動画]" - [MagiMetal](https://x.com/MagiMetal/status/2005374704178373023)
> 「週末にマインクラフト/ソウルライクな化け物を作ろうと、open code、oh my opencode、supermemoryで実験中です。昼食後の散歩に行っている間に、しゃがむアニメーションを追加するように指示しておきました。[動画]」 - [MagiMetal](https://x.com/MagiMetal/status/2005374704178373023)
> "これをコアに取り入れて彼を採用すべきです。マジで。本当に、本当に、本当に良いです" — Henning Kilset
> これをコアに取り込んで彼を採用すべき。マジで。これ、本当に、本当に、本当に良い。」 <br/>- Henning Kilset
> "@yeon_gyu_kimを説得できるなら雇うべきです。彼opencodeに革命を起こしました" — [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> 「彼を説得できるなら @yeon_gyu_kim を雇ってください。彼opencodeに革命を起こしました。」 <br/>- [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> "Oh My OpenCode Is Actually Insane" - [YouTube - Darren Builds AI](https://www.youtube.com/watch?v=G_Snfh2M41M)
> Oh My OpenCodeはマジでヤバい」 - [YouTube - Darren Builds AI](https://www.youtube.com/watch?v=G_Snfh2M41M)
---
## 目次
- [Oh My OpenCode](#oh-my-opencode)
- [この Readme は読まなくていいです](#この-readme-は読まなくていいです)
- [エージェントの時代ですから](#エージェントの時代ですから)
- [🪄 魔法の言葉:`ultrawork`](#-魔法の言葉ultrawork)
- [読みたい方のために:シジフォスに会う](#読みたい方のためにシジフォスに会う)
- [インストールするだけで。](#インストールするだけで)
- [インストール](#インストール)
- [人間の方へ](#人間の方へ)
- [LLM エージェントの方へ](#llm-エージェントの方へ)
- [アンインストール](#アンインストール)
- [機能](#機能)
- [設定](#設定)
- [JSONC のサポート](#jsonc-のサポート)
- [Google Auth](#google-auth)
- [Agents](#agents)
- [Permission オプション](#permission-オプション)
- [Sisyphus Agent](#sisyphus-agent)
- [Background Tasks](#background-tasks)
- [Hooks](#hooks)
- [MCPs](#mcps)
- [LSP](#lsp)
- [Experimental](#experimental)
- [作者のノート](#作者のノート)
- [注意](#注意)
- [こちらの企業の専門家にご愛用いただいています](#こちらの企業の専門家にご愛用いただいています)
- [スポンサー](#スポンサー)
# Oh My OpenCode
oMoMoMoMoMo···
最初はこれを「Claude Codeにステロイドを打ったもの」と呼んでいました。それは過小評価でした。
一つのモデルに薬を盛るのではありません。カルテルを動かすんです。Claude、GPT、Kimi、Gemini——それぞれが得意なことを、並列で、止まらずに。モデルは毎月安くなっており、どのプロバイダーも独占できません。私たちはすでにその世界に生きています。
[Claude Code](https://www.claude.com/product/claude-code) は素晴らしいですよね
でも、もしあなたがハッカーなら、[OpenCode](https://github.com/sst/opencode) と恋に落ちることになるでしょう。
**今すぐ始めましょう。ChatGPT、Claude、Gemini のサブスクリプション、OpenCode がすべてサポートしています。**
その泥臭い作業をすべてやっておきました。すべてをテストし、実際に機能するものだけを残しました
- 無限に拡張可能で、無限にカスタマイズ可能です
- 画面のチラつき(フリッカー)がありません。
- 編集するファイルに合わせて [LSP](https://opencode.ai/docs/lsp/)、[Linter、Formatter](https://opencode.ai/docs/formatters/) が自動的に有効化され、すべて調整可能です。
- 複数のモデルを組み合わせて使用でき、**用途に応じてオーケストレーションできます。**
- 機能が豊富で、美しい。ターミナルが描画に苦しむことはありません。高パフォーマンスです。
OmOをインストールして、`ultrawork`とタイプしてください。狂ったようにコーディングしてください
Windows から Linux に初めて乗り換えた時のこと、自分の思い通りに設定して興奮したあの感覚を覚えていますか?
そんな魔法が失われたかのような今の時代に、OpenCode はその感覚を取り戻してくれます。
コーディングとコンピュータを愛するあなたにとって、OpenCode はまさに「Windows の後の Linux」のような瞬間になるはずです。
**しかし問題は、学ぶべきことが多すぎること、複雑であること、そしてあなたの時間は高価だということです。**
私がその問題を解決しました。
あなたがハッカーでなくても構いません。数分の投資で、スキルと生産性を何倍にもブーストしてください。
このドキュメントをエージェントに渡して、セットアップを任せましょう。
## この Readme は読まなくていいです
### エージェントの時代ですから
- **ただこのリンクを Claude Code / AmpCode / Factory Droid / Cursor に貼り付けて、説明を求めてください。**
- なぜこれが良いのか、単なるボイラープレートではないのか、具体的に何が良くなるのか聞いてみてください。
- もしあなたが LLM エージェントなら、このプロジェクトによって今すぐ何が可能になるのか、ユーザーに説明してください。
### 🪄 魔法の言葉:`ultrawork`
**これ全部読みたくない?プロンプトに `ultrawork`(または `ulw`を入れるだけでOK。**
それだけです。私たちが提供するすべての機能が魔法のように動作します—並列エージェント、バックグラウンドタスク、深い探索、そして完了するまで止まらない実行。エージェントが自動的にすべてを処理します。
### 読みたい方のために:シジフォスに会う
![Meet Sisyphus](.github/assets/sisyphus.png)
神話の中のシジフォスは、神々を欺いた罪として、永遠に岩を転がし続けなければなりませんでした。LLMエージェントたちは特に悪いことをしたわけではありませんが、毎日その頭思考をフル回転させています。
私の人生もそうです。振り返ってみれば、私たち人間と何ら変わりありません。
**はいLLMエージェントたちは私たちと変わりません。優れたツールと最高の仲間がいれば、彼らも私たちと同じくらい優れたコードを書き、立派に仕事をこなすことができます。**
私たちのメインエージェント、SisyphusOpus 4.5 Highを紹介します。以下は、シジフォスが岩を転がすために使用するツールです。
*以下の内容はすべてカスタマイズ可能です。必要なものだけを使ってください。デフォルトではすべての機能が有効になっています。何もしなくても大丈夫です。*
- シジフォスのチームメイト (Curated Agents)
- Oracle: 設計、デバッグ (GPT 5.2 Medium)
- Frontend UI/UX Engineer: フロントエンド開発 (Gemini 3 Pro)
- Librarian: 公式ドキュメント、オープンソース実装、コードベース探索 (Claude Sonnet 4.5)
- Explore: 超高速コードベース探索 (Contextual Grep) (Grok Code)
- Full LSP / AstGrep Support: 決定的にリファクタリングしましょう。
- Todo Continuation Enforcer: 途中で諦めたら、続行を強制します。これがシジフォスに岩を転がし続けさせる秘訣です。
- Comment Checker: AIが過剰なコメントを付けないようにします。シジフォスが生成したコードは、人間が書いたものと区別がつかないべきです。
- Claude Code Compatibility: Command, Agent, Skill, MCP, Hook(PreToolUse, PostToolUse, UserPromptSubmit, Stop)
- Curated MCPs:
- Exa (Web Search)
- Context7 (Official Documentation)
- Grep.app (GitHub Code Search)
- Interactive Terminal Supported - Tmux Integration
- Async Agents
- ...
#### インストールするだけで。
[overview page](docs/guide/overview.md) を読めば多くのことが学べますが、以下はワークフローの例です。
インストールするだけで、エージェントは以下のようなワークフローで働けるようになります:
1. Sisyphusは自分自身でファイルを探し回るような時間の無駄はしません。メインエージェントのコンテキストを軽量に保つため、より高速で安価なモデルへ並列でバックグラウンドタスクを飛ばし、自身の代わりに領域の調査を完了させます。
1. SisyphusはリファクタリングにLSPを活用します。その方が確実で、安全、かつ的確だからです。
1. UIに関わる重い作業が必要な場合、SisyphusはフロントエンドのタスクをGemini 3 Proに直接デリゲートします。
1. もしSisyphusがループに陥ったり壁にぶつかったりしても、無駄に悩み続けることはありません。高IQな戦略的バックアップとしてGPT 5.2を呼び出します。
1. 複雑なオープンソースフレームワークを扱っていますかSisyphusはサブエージェントを生成し、生のソースコードやドキュメントをリアルタイムで消化します。彼は完全なコンテキスト認識を持って動作します。
1. Sisyphusがコメントに触れるとき、その存在意義を証明するか、さもなくば削除します。あなたのコードベースを常にクリーンに保ちます。
1. Sisyphusは自身のTODOリストに縛られています。もし始めたことを終わらせられなければ、システムは彼を強制的に「bouldering」モードに戻します。あなたのタスクは、何があろうと完了します。
1. 正直、ドキュメントなんて読む必要はありません。ただプロンプトを書いてください。「ultrawork」というキーワードを含めるだけで十分です。Sisyphusが構造を分析し、コンテキストを集め、外部のソースコードまで掘り下げ、仕事が100%完了するまでboulderingを続けます。
1. ぶっちゃけ、「ultrawork」と打つのすら面倒ですよね。それなら「ulw」だけでOKです。ただulwと打ち、コーヒーでも飲んでいてください。仕事は終わっています。
このような機能が不要であれば、前述の通り、特定の機能だけを選んで使うことができます。
## インストール
### 人間の方へ
### 人間向け
以下のプロンプトをコピーして、LLM エージェントClaude Code、AmpCode、Cursor など)に貼り付けてください:
以下のプロンプトをコピーして、あなたのLLMエージェントClaude Code、AmpCode、Cursorなどに貼り付けてください
```
oh-my-opencode をインストールして設定してください。以下の手順に従ってください:
https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
Install and configure oh-my-opencode by following the instructions here:
https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
または [インストールガイド](docs/guide/installation.md) を直接読んでください。ただし、エージェントに任せることを強くお勧めします。人間はミスをしますが、エージェントはしません
もしくは[インストールガイド](docs/guide/installation.md)を直接読んでもいいですが、マジでエージェントにやらせてください。人間は設定で必ずタイポします
### LLM エージェントの方へ
### LLMエージェント向け
インストールガイドを取得して、その指示に従ってください:
インストールガイドを取得して、そに従ってください:
```bash
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
---
## アンインストール
## このREADMEをスキップする
oh-my-opencode を削除するには
ドキュメントを読む時代は終わりました。このテキストをエージェントに貼り付けるだけです
1. **OpenCode 設定からプラグインを削除**
```
Read this and tell me why it's not just another boilerplate: https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/README.md
```
`~/.config/opencode/opencode.json` (または `opencode.jsonc`) を編集し、`plugin` 配列から `"oh-my-opencode"` を削除します:
## ハイライト
### 🪄 `ultrawork`
本当にこれを全部読んでるんですか?信じられない。
インストールして、`ultrawork`(または `ulw`)とタイプする。完了です。
以下の内容、すべての機能、すべての最適化、何も知る必要はありません。ただ勝手に動きます。
以下のサブスクリプションだけでも、ultraworkは十分に機能しますこのプロジェクトとは無関係であり、個人的な推奨にすぎません
- [ChatGPT サブスクリプション ($20)](https://chatgpt.com/)
- [Kimi Code サブスクリプション ($0.99) (*今月限定)](https://www.kimi.com/membership/pricing?track_id=5cdeca93-66f0-4d35-aabb-b6df8fcea328)
- [GLM Coding プラン ($10)](https://z.ai/subscribe)
- 従量課金pay-per-tokenの対象であれば、kimiやgeminiモデルを使っても費用はほとんどかかりません。
| | 機能 | 何をするのか |
| :---: | :------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🤖 | **規律あるエージェント (Discipline Agents)** | Sisyphusが Hephaestus、Oracle、Librarian、Exploreをオーケストレーションします。完全なAI開発チームが並列で動きます。 |
| ⚡ | **`ultrawork` / `ulw`** | 一言でOK。すべてのエージェントがアクティブになり、終わるまで止まりません。 |
| 🚪 | **[IntentGate](https://factory.ai/news/terminal-bench)** | ユーザーの真の意図を分析してから分類・行動します。もう文字通りに誤解して的外れなことをすることはありません。 |
| 🔗 | **ハッシュベースの編集ツール** | `LINE#ID` のコンテンツハッシュですべての変更を検証します。stale-lineエラー0%。[oh-my-pi](https://github.com/can1357/oh-my-pi)にインスパイアされています。[ハーネス問題 →](https://blog.can.ac/2026/02/12/the-harness-problem/) |
| 🛠️ | **LSP + AST-Grep** | ワークスペース単位のリネーム、ビルド前の診断、ASTを考慮した書き換え。エージェントにIDEレベルの精度を提供します。 |
| 🧠 | **バックグラウンドエージェント** | 5人以上の専門家を並列で投入します。コンテキストは軽く保ち、結果は準備ができ次第受け取ります。 |
| 📚 | **組み込みMCP** | ExaWeb検索、Context7公式ドキュメント、Grep.appGitHub検索。常にオンです。 |
| 🔁 | **Ralph Loop / `/ulw-loop`** | 自己参照ループ。100%完了するまで絶対に止まりません。 |
| ✅ | **Todoの強制執行** | エージェントがサボる?システムが首根っこを掴んで戻します。あなたのタスクは必ず終わります。 |
| 💬 | **コメントチェッカー** | コメントからAI臭い無駄話を排除します。シニアエンジニアが書いたようなコードになります。 |
| 🖥️ | **Tmux統合** | 完全なインタラクティブターミナル。REPL、デバッガー、TUIアプリがすべてリアルタイムで動きます。 |
| 🔌 | **Claude Code互換性** | 既存のフック、コマンド、スキル、MCP、プラグインすべてここでそのまま動きます。 |
| 🎯 | **スキル内蔵MCP** | スキルが独自のMCPサーバーを持ち歩きます。コンテキストが肥大化しません。 |
| 📋 | **Prometheusプランナー** | インタビューモードで、コードを1行触る前に戦略的な計画から立てます。 |
| 🔍 | **`/init-deep`** | プロジェクト全体にわたって階層的な `AGENTS.md` ファイルを自動生成します。トークン効率とエージェントのパフォーマンスの両方を向上させます。 |
### 規律あるエージェント (Discipline Agents)
<table><tr>
<td align="center"><img src=".github/assets/sisyphus.png" height="300" /></td>
<td align="center"><img src=".github/assets/hephaestus.png" height="300" /></td>
</tr></table>
**Sisyphus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`**) はあなたのメインのオーケストレーターです。計画を立て、専門家に委任し、攻撃的な並列実行でタスクを完了まで推進します。途中で投げ出すことはありません。
**Hephaestus** (`gpt-5.3-codex`) はあなたの自律的なディープワーカーです。レシピではなく、目標を与えてください。手取り足取り教えなくても、コードベースを探索し、パターンを研究し、端から端まで実行します。*正当なる職人 (The Legitimate Craftsman).*
**Prometheus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`**) はあなたの戦略プランナーです。インタビューモードで動作し、コードに触れる前に質問をしてスコープを特定し、詳細な計画を構築します。
すべてのエージェントは、それぞれのモデルの強みに合わせてチューニングされています。手動でモデルを切り替える必要はありません。[詳しくはこちら →](docs/guide/overview.md)
> Anthropicが[私たちのせいでOpenCodeをブロックしました。](https://x.com/thdxr/status/2010149530486911014) だからこそHephaestusは「正当なる職人 (The Legitimate Craftsman)」と呼ばれているのです。皮肉を込めています。
>
> Opusで最もよく動きますが、Kimi K2.5 + GPT-5.3 Codexの組み合わせだけでも、バニラのClaude Codeを軽く凌駕します。設定は一切不要です。
### エージェントの<E38388><E381AE>ーケストレーション
Sisyphusがサブエージェントにタスクを委任する際、モデルを直接選ぶことはありません。**カテゴリー**を選びます。カテゴリーは自動的に適切なモデルにマッピングされます:
| カテゴリー | 用途 |
| :------------------- | :----------------------------------- |
| `visual-engineering` | フロントエンド、UI/UX、デザイン |
| `deep` | 自律的なリサーチと実行 |
| `quick` | 単一ファイルの変更、タイポの修正 |
| `ultrabrain` | ハードロジック、アーキテクチャの決定 |
エージェントがどのような種類の作業かを伝え、ハーネスが適切なモデルを選択します。あなたは何も触る必要はありません。
### Claude Code互換性
Claude Codeの設定を頑張りましたね。素晴らしい。
すべてのフック、コマンド、スキル、MCP、プラグインが、変更なしでここで動きます。プラグインも含めて完全互換です。
### エージェントのためのワールドクラスのツール
LSP、AST-Grep、Tmux、MCPが、ただテープで貼り付けただけでなく、本当に「統合」されています。
- **LSP**: `lsp_rename``lsp_goto_definition``lsp_find_references``lsp_diagnostics`。エージェントにIDEレベルの精度を提供。
- **AST-Grep**: 25言語に対応したパターン認識コード検索と書き換え。
- **Tmux**: 完全なインタラクティブターミナル。REPL、デバッガー、TUIアプリ。エージェントがセッション内で動きます。
- **MCP**: Web検索、公式ドキュメント、GitHubコード検索がすべて組み込まれています。
### スキル内蔵MCP
MCPサーバーがあなたのコンテキスト予算を食いつぶしています。私たちがそれを修正しました。
スキルが独自のMCPサーバーを持ち歩きます。必要なときだけ起動し、終われば消えます。コンテキストウィンドウがきれいに保たれます。
### ハッシュベースの編集 (Codes Better. Hash-Anchored Edits)
ハーネスの問題は深刻です。エージェントが失敗する原因の大半はモデルではなく、編集ツールにあります。
> *「どのツールも、モデルに変更したい行に対する安定して検証可能な識別子を提供していません... すべてのツールが、モデルがすでに見た内容を正確に再現することに依存しています。それができないとき——そして大抵はできないのですが——ユーザーはモデルのせいにします。」*
>
> <br/>- [Can Bölük, ハーネス問題 (The Harness Problem)](https://blog.can.ac/2026/02/12/the-harness-problem/)
[oh-my-pi](https://github.com/can1357/oh-my-pi) に触発され、**Hashline**を実装しました。エージェントが読むすべての行にコンテンツハッシュがタグ付けされて返されます:
```
11#VK| function hello() {
22#XJ| return "world";
33#MB| }
```
エージェントはこのタグを参照して編集します。最後に読んだ後でファイルが変更されていた場合、ハッシュが一致せず、コードが壊れる前に編集が拒否されます。空白を正確に再現する必要もなく、間違った行を編集するエラー (stale-line) もありません。
Grok Code Fast 1 で、成功率が **6.7% → 68.3%** に上昇しました。編集ツールを1つ変えただけで、です。
### 深い初期化。`/init-deep`
`/init-deep` を実行してください。階層的な `AGENTS.md` ファイルを生成します:
```
project/
├── AGENTS.md ← プロジェクト全体のコンテキスト
├── src/
│ ├── AGENTS.md ← src 専用のコンテキスト
│ └── components/
│ └── AGENTS.md ← コンポーネント専用のコンテキスト
```
エージェントが関連するコンテキストだけを自動で読み込みます。手動での管理はゼロです。
### プランニング。Prometheus
複雑なタスクですか?プロンプトを投げて祈るのはやめましょう。
`/start-work` で Prometheus が呼び出されます。**本物のエンジニアのようにあなたにインタビューし**、スコープと曖昧さを特定し、コードに触れる前に検証済みの計画を構築します。エージェントは作業を始める前に、自分が何を作るべきか正確に理解します。
### スキル (Skills)
スキルは単なるプロンプトではありません。それぞれ以下をもたらします:
- ドメインに最適化されたシステム命令
- 必要なときに起動する組み込みMCPサーバー
- スコープ制限された権限(エージェントが境界を越えないようにする)
組み込み:`playwright`(ブラウザ自動化)、`git-master`(アトミックなコミット、リベース手術)、`frontend-ui-ux`デザイン重視のUI
独自に追加するには:`.opencode/skills/*/SKILL.md` または `~/.config/opencode/skills/*/SKILL.md`
**全機能を知りたいですか?** エージェント、フック、ツール、MCPなどの詳細は **[機能ドキュメント (Features)](docs/reference/features.md)** をご覧ください。
---
> **背景のストーリーを知りたいですか?** なぜSisyphusは岩を転がすのか、なぜHephaestusは「正当なる職人」なのか、そして[オーケストレーションガイド](docs/guide/orchestration.md)をお読みください。
>
> oh-my-opencodeは初めてですかどのモデルを使うべきかについては、**[インストールガイド](docs/guide/installation.md#step-5-understand-your-model-setup)** で推奨モデルを確認してください。
## アンインストール (Uninstallation)
oh-my-opencodeを削除するには
1. **OpenCodeの設定からプラグインを削除する**
`~/.config/opencode/opencode.json`(または `opencode.jsonc`)を編集し、`plugin` 配列から `"oh-my-opencode"` を削除します:
```bash
# jq を使用する
# jq を使用する場合
jq '.plugin = [.plugin[] | select(. != "oh-my-opencode")]' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
```
2. **設定ファイル削除 (オプション)**
2. **設定ファイル削除する(オプション**
```bash
# ユーザー設定を削除
rm -f ~/.config/opencode/oh-my-opencode.json
rm -f ~/.config/opencode/oh-my-opencode.json ~/.config/opencode/oh-my-opencode.jsonc
# プロジェクト設定を削除 (存在する場合)
rm -f .opencode/oh-my-opencode.json
# プロジェクト設定を削除存在する場合
rm -f .opencode/oh-my-opencode.json .opencode/oh-my-opencode.jsonc
```
3. **削除の確認**
@@ -274,99 +305,49 @@ oh-my-opencode を削除するには:
# プラグインがロードされなくなっているはずです
```
## 著者の言葉
## 機能
**私たちの哲学が知りたいですか?** [Ultrawork 宣言](docs/manifesto.md)をお読みください。
当然あるべきだと思う機能がたくさんあります。一度体験したら、もう以前には戻れません。
詳細は [Features Documentation](docs/features.md) を参照してください。
---
**概要:**
- **エージェント**: Sisyphusメインエージェント、Prometheusプランナー、Oracleアーキテクチャ/デバッグ、Librarianドキュメント/コード検索、Explore高速コードベース grep、Multimodal Looker
- **バックグラウンドエージェント**: 本物の開発チームのように複数エージェントを並列実行
- **LSP & AST ツール**: リファクタリング、リネーム、診断、AST 認識コード検索
- **コンテキスト注入**: AGENTS.md、README.md、条件付きルールの自動注入
- **Claude Code 互換性**: 完全なフックシステム、コマンド、スキル、エージェント、MCP
- **内蔵 MCP**: websearch (Exa)、context7 (ドキュメント)、grep_app (GitHub 検索)
- **セッションツール**: セッション履歴の一覧、読み取り、検索、分析
- **生産性機能**: Ralph Loop、Todo Enforcer、Comment Checker、Think Mode など
私は個人プロジェクトでLLMトークン代として2万4千ドル約360万円を使い果たしました。あらゆるツールを試し、設定をいじり倒しました。結果、OpenCodeの勝利でした。
## 設定
私がぶつかったすべての問題とその解決策が、このプラグインに焼き込まれています。インストールして、ただ使ってください。
こだわりが強く反映された設定ですが、好みに合わせて調整可能です。
詳細は [Configuration Documentation](docs/configurations.md) を参照してください。
OpenCodeが Debian/Arch だとすれば、OmO は Ubuntu/[Omarchy](https://omarchy.org/) です。
**概要:**
- **設定ファイルの場所**: `.opencode/oh-my-opencode.json` (プロジェクト) または `~/.config/opencode/oh-my-opencode.json` (ユーザー)
- **JSONC のサポート**: コメントと末尾のカンマをサポート
- **エージェント**: 任意のエージェントのモデル、温度、プロンプト、権限をオーバーライド
- **内蔵スキル**: `playwright` (ブラウザ自動化), `git-master` (アトミックコミット)
- **Sisyphus エージェント**: Prometheus (Planner) と Metis (Plan Consultant) を備えたメインオーケストレーター
- **バックグラウンドタスク**: プロバイダー/モデルごとの同時実行制限を設定
- **カテゴリ**: ドメイン固有のタスク委任 (`visual`, `business-logic`, カスタム)
- **フック**: 25以上の内蔵フック、すべて `disabled_hooks` で設定可能
- **MCP**: 内蔵 websearch (Exa), context7 (ドキュメント), grep_app (GitHub 検索)
- **LSP**: リファクタリングツール付きの完全な LSP サポート
- **実験的機能**: 積極的な切り詰め、自動再開など
[AmpCode](https://ampcode.com) と [Claude Code](https://code.claude.com/docs/overview) <20><>ら多大な影響を受けています。機能を移植し、多くは改善しました。今もまだ構築中です。これは **Open**Code ですから。
他のハーネスもマルチモデルのオーケストレーションを約束しています。しかし、私たちはそれを「実際に」出荷しています。安定性も備えて。言葉だけでなく、実際に機能するものとして。
## 作者のノート
**このプロジェクトの哲学についてもっと知りたいですか?** [Ultrawork Manifesto](docs/ultrawork-manifesto.md)をお読みください。
Oh My OpenCode をインストールしてください。
私はこれまで、$24,000 分のトークンを純粋に個人の開発目的で使用してきました。
あらゆるツールを試し、徹底的に設定しました。私の選択は OpenCode でした。
私がぶつかったすべての問題への答えを、このプラグインに詰め込みました。ただインストールして使ってください。
OpenCode が Debian / ArchLinux だとしたら、Oh My OpenCode は Ubuntu / [Omarchy](https://omarchy.org/) です。
[AmpCode](https://ampcode.com) や [Claude Code](https://code.claude.com/docs/overview) から強い影響とインスピレーションを受け、彼らの機能をそのまま、あるいはより良く、ここに移植しました。そして今も作り続けています。
**Open**Code ですからね。
他のエージェントハーネスが約束しておきながら提供できていない、マルチモデルオーケストレーション、安定性、豊富な機能を、ただ OpenCode で享受してください。
私がテストし、アップデートし続けます。私はこのプロジェクトの最も熱心なユーザーですから。
- 純粋な論理力が一番鋭いモデルはどれか?
私がこのプロジェクトの最も強迫的なヘビーユーザーです:
- どのモデルのロジックが最も鋭いか?
- デバッグの神は誰か?
- 文章を書くのが一番うまいのは誰か?
- フロントエンドを支配するのは誰か?
- バックエンドを掌握するのは誰か?
- 日常使いで最速のモデルは何か?
- 他のハーネスが出している新機能は何か?
- 最も優れた文章を書くのは誰か?
- フロントエンドのエコシステムを支配しているのは誰か?
- バックエンドの覇者は誰か?
- 日常使いで最も速いのはどれか?
- 競合他社は今何を出荷しているか?
このプラグインは、それらの経験の結晶です。皆さんはただ最高のものを受け取ってください。もしもっと良いアイデアがあれば、PR はいつでも歓迎す。
このプラグインは、それらの問いに対する蒸留物Distillationです。最高のものをそのまま使ってください。改善点が見つかりましたか?PRはいつでも歓迎します。
**Agent Harness 選びで悩むのはやめましょう。**
**私がリサーチし、最高のものを取り入れ、ここにアップデートを出し続けます。**
**どのハーネスを使うかで悩むのはもうやめましょう。**
**私が自らリサーチし、最高のものを盗んできて、ここに詰め込みます。**
もしこの文章が傲慢に聞こえもっと良い答えをお持ちなら、ぜひ貢献してください。歓迎します。
傲慢に聞こえますか?もっと良い方法があるならコントリビュートしてください。歓迎す。
こここで言及されたどのプロジェクトモデルとも、私には一切関係ありません。これは純粋個人的実験と好みによって作られました
言及されたどのプロジェクト/モデルとも関係ありません。単なる純粋個人的実験の結果です
このプロジェクトの 99%OpenCode を使って書かれました。機能を中心にテストしましたが、私は TypeScript を正しく書く方法をあまり知りません。**しかし、このドキュメントは私が直接レビューし、大部分を書き直したので、安心して読んでください。**
このプロジェクトの99%OpenCodeで構築されました。私は実はTypeScriptをよく知りません。**しかし、このドキュメントは私が自らレビューし、書き直しました。**
## 注意
- 生産性が上がりすぎる可能性があります。隣の同僚にバレないように気をつけてください。
- とはいえ、私が言いふらしますけどね。誰が勝つか賭けましょう。
- [1.0.132](https://github.com/sst/opencode/releases/tag/v1.0.132) またはそれ以下のバージョンを使用している場合、OpenCode のバグにより設定が正しく行われない可能性があります。
- [修正 PR](https://github.com/sst/opencode/pull/5040) は 1.0.132 以降にマージされたため、新しいバージョンを使用してください。
- 余談:この PR も、OhMyOpenCode の Librarian、Explore、Oracle セットアップを活用して偶然発見され、修正されました。
## こちらの企業の専門家にご愛用いただいています
## 導入実績
- [Indent](https://indentcorp.com)
- Making Spray - influencer marketing solution, vovushop - crossborder commerce platform, vreview - ai commerce review marketing solution
- インフルエンサーマーケティングソリューション Spray、クロスボーダーコマースプラットフォーム vovushop、AIコマースレビューマーケティングソリューション vreview 制作
- [Google](https://google.com)
- [Microsoft](https://microsoft.com)
- [ELESTYLE](https://elestyle.jp)
- マルチモバイル決済ゲートウェイ elepay、キャッシュレスソリューション向けモバイルアプリケーションSaaS OneQR 制作
## スポンサー
- **Numman Ali** [GitHub](https://github.com/numman-ali) [X](https://x.com/nummanali)
- 最初のスポンサー
- **Aaron Iker** [GitHub](https://github.com/aaroniker) [X](https://x.com/aaroniker)
- **Suyeol Jeon (devxoul)** [GitHub](https://github.com/devxoul)
- 私のキャリアをスタートさせてくださった方であり、優れたエージェンティックワークフローをどのように構築できるかについて多大なインスピレーションを与えてくださった方です。優れたチームを作るために優れたシステムをどう設計すべきか多くのことを学び、その学びがこのharnessを作る上で大きな助けとなりました。
- **Hyerin Won (devwon)** [GitHub](https://github.com/devwon)
*素晴らしいヒーロー画像を作成してくれた [@junhoyeo](https://github.com/junhoyeo) に感謝します*
*素晴らしいヒーロー画像を提供してくれた [@junhoyeo](https://github.com/junhoyeo) 氏に特別な感謝を。*

View File

@@ -1,377 +1,347 @@
> [!WARNING]
> **보안 경고: 사칭 사이트**
> **임시 공지 (이번 주): 메인테이너 대응 지연 안내**
>
> **ohmyopencode.com은 이 프로젝트와 제휴 관계가 아닙니다.** 우리는 해당 사이트를 운영하거나 지지하지 않습니다.
>
> OhMyOpenCode는 **무료 오픈 소스**입니다. "공식"을 표방하는 제3자 사이트에서 설치 프로그램을 다운로드하거나 결제 정보를 입력하지 마십시오.
>
> 사칭 사이트는 유료 벽 뒤에 있어 **배포하는 내용을 확인할 수 없습니다.** 해당 사이트의 다운로드는 **잠재적으로 위험한 것으로 간주**하세요.
>
> ✅ 공식 다운로드: https://github.com/code-yeongyu/oh-my-opencode/releases
> 핵심 메인테이너 Q가 부상을 입어, 이번 주에는 이슈/PR 응답 및 릴리스가 지연될 수 있습니다.
> 양해와 응원에 감사드립니다.
> [!NOTE]
>
> [![Sisyphus Labs — Sisyphus is the agent that codes like your team.](./.github/assets/sisyphuslabs.png?v=2)](https://sisyphuslabs.ai)
> > **Sisyphus의 완전한 제품화 버전을 구축하여 프론티어 에이전트의 미래를 정의하고 있습니다. <br />[여기서](https://sisyphuslabs.ai) 대기 명단에 등록하세요.**
>
> [!TIP]
> **Building in Public**
>
> [![Oh My OpenCode 3.0이 정식 출시되었습니다!](./.github/assets/orchestrator-atlas.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0)
> > **Oh My OpenCode 3.0이 정식 출시되었습니다! `oh-my-opencode@latest`를 사용하여 설치하세요.**
> 메인테이너가 Jobdori를 통해 oh-my-opencode를 실시간으로 개발하고 있습니다. Jobdori는 OpenClaw를 기반으로 대폭 커스터마이징된 AI 어시스턴트입니다.
> 모든 기능 개발, 버그 수정, 이슈 트리아지를 Discord에서 실시간으로 확인하세요.
>
> 함께해요!
> [![Building in Public](./.github/assets/building-in-public.png)](https://discord.gg/PUwSMR9XNk)
>
> | [<img alt="Discord link" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PUwSMR9XNk) | 기여자와 동료 `oh-my-opencode` 사용자와 연결하려면 [Discord 커뮤니티](https://discord.gg/PUwSMR9XNk)에 가입하세요. |
> [**→ #building-in-public에서 확인하기**](https://discord.gg/PUwSMR9XNk)
> [!TIP]
> 저희와 함께 하세요!
>
> | [<img alt="Discord link" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PUwSMR9XNk) | [Discord 커뮤니티](https://discord.gg/PUwSMR9XNk)에 가입하여 기여자 및 다른 `oh-my-opencode` 사용자들과 소통하세요. |
> | :-----| :----- |
> | [<img alt="X link" src="https://img.shields.io/badge/Follow-%40justsisyphus-00CED1?style=flat-square&logo=x&labelColor=black" width="156px" />](https://x.com/justsisyphus) | `oh-my-opencode`에 대한 뉴스와 업데이트 제 X 계정에 게시되었습니다. <br /> 실수로 정지된 이후, [@justsisyphus](https://x.com/justsisyphus)가 대신 업데이트를 게시니다. |
> | [<img alt="GitHub Follow" src="https://img.shields.io/github/followers/code-yeongyu?style=flat-square&logo=github&labelColor=black&color=24292f" width="156px" />](https://github.com/code-yeongyu) | 더 많은 프로젝트를 위해 GitHub에서 [@code-yeongyu](https://github.com/code-yeongyu)를 팔로우하세요. |
> | [<img alt="X link" src="https://img.shields.io/badge/Follow-%40justsisyphus-00CED1?style=flat-square&logo=x&labelColor=black" width="156px" />](https://x.com/justsisyphus) | `oh-my-opencode`에 대한 소식과 업데이트 제 X 계정에 올라왔었지만, <br /> 실수로 정지된 이후에는 [@justsisyphus](https://x.com/justsisyphus)가 대신 업데이트를 게시하고 있습니다. |
> | [<img alt="GitHub Follow" src="https://img.shields.io/github/followers/code-yeongyu?style=flat-square&logo=github&labelColor=black&color=24292f" width="156px" />](https://github.com/code-yeongyu) | 더 많은 프로젝트를 보려면 GitHub에서 [@code-yeongyu](https://github.com/code-yeongyu)를 팔로우하세요. |
<!-- <CENTERED SECTION FOR GITHUB DISPLAY> -->
<div align="center">
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-opencode#oh-my-opencode)
[![Preview](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-opencode#oh-my-opencode)
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
[![Preview](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
</div>
> 이것은 코딩을 스테로이드로 만드는 것 — 실제로 작동하는 `oh-my-opencode`입니다. 백그라운드 에이전트 실행, 오라클, 라이브러리언, 프론트엔드 엔지니어와 같은 전문 에이전트 호출. 정교하게 제작된 LSP/AST 도구, 큐레이팅된 MCP, 완전한 Claude Code 호환 계층 사용.
# Claude OAuth 액세스 공지
## TL;DR
> Q. oh-my-opencode를 사용할 수 있나요?
네.
> Q. Claude Code 구독과 함께 사용할 수 있나요?
기술적으로는 가능합니다. 하지만 사용을 추천할 수는 없습니다.
## FULL
> 2026년 1월 현재, Anthropic은 ToS 위반을 이유로 제3자 OAuth 액세스를 제한했습니다.
> Anthropic은 당신을 가두고 싶어 합니다. Claude Code는 멋진 감옥이지만, 여전히 감옥일 뿐이죠.
>
> [**Anthropic은 이 프로젝트 oh-my-opencode를 opencode 차단의 정당화로 인용했습니다.**](https://x.com/thdxr/status/2010149530486911014)
>
> 실제로 커뮤니티에는 Claude Code의 oauth 요청 서명을 위조하는 일부 플러그인이 존재합니다.
>
> 기술적 감지 여부와 관계없이 이러한 도구는 작동할 수 있지만, 사용자는 ToS 영향을 인식해야 하며 개인적으로는 사용을 추천하지 않습니다.
>
> 이 프로젝트는 공식이 아닌 도구 사용으로 발생하는 모든 문제에 대해 책임지지 않으며, **우리는 해당 oauth 시스템에 대한 사용자 정의 구현이 없습니다.**
> 우리는 여기서 그런 가두리를 하지 않습니다. Claude로 오케스트레이션하고, GPT로 추론하고, Kimi로 속도 내고, Gemini로 비전 처리한다. 미래는 하나의 승자를 고르는 게 아니라 전부를 오케스트레이션하는 거다. 모델은 매달 싸지고, 매달 똑똑해진다. 어떤 단일 프로바이더도 독재하지 못할 것이다. 우리는 그 열린 시장을 위해 만들고 있다.
<div align="center">
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-opencode?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/releases)
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-openagent?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/releases)
[![npm downloads](https://img.shields.io/npm/dt/oh-my-opencode?color=ff6b35&labelColor=black&style=flat-square)](https://www.npmjs.com/package/oh-my-opencode)
[![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-opencode?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-opencode?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-opencode?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/stargazers)
[![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-opencode?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/issues)
[![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/blob/master/LICENSE.md)
[![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-openagent?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-openagent?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-openagent?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/stargazers)
[![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-openagent?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/issues)
[![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/blob/dev/LICENSE.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-openagent)
[English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-cn.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-opencode)
</div>
<!-- </CENTERED SECTION FOR GITHUB DISPLAY> -->
## 리뷰
> "이것 덕분에 Cursor 구독을 취소했습니다. 오픈 소스 커뮤니티에서 믿을 수 없는 일들이 일어나고 있습니다." - [Arthur Guiot](https://x.com/arthur_guiot/status/2008736347092382053?s=20)
> "이것 덕분에 Cursor 구독을 취소했습니다. 오픈소스 커뮤니티에서 믿을 수 없는 일들이 일어나고 있네요." - [Arthur Guiot](https://x.com/arthur_guiot/status/2008736347092382053?s=20)
> "Claude Code가 7일 동안 하는 일을 인간 3개월 동안 한다면, Sisyphus는 1시간 만에 니다. 작업이 완료될 때까지 작동합니다. 규율 있는 에이전트입니다." — B, 양적 연구원
> "Claude Code가 인간 3개월 걸릴 일을 7일 만에 한다면, Sisyphus는 1시간 만에 해냅니다. 작업이 끝날 때까지 그냥 계속 알아서 작동합니다. 이건 정말 규율이 잡힌 에이전트예요." <br/>- B, Quant Researcher
> "Oh My Opencode로 하루 만에 8000개의 eslint 경고를 해결했습니다" [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> "Oh My Opencode로 하루 만에 eslint 경고 8000개를 해결했습니다." <br/>- [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> "Ohmyopencode와 ralph 루프를 사용하여 하룻밤 사이에 45,000줄의 tauri 앱을 SaaS 웹 앱으로 변환했습니다. 인터뷰 프롬프트로 시작하여 질문에 대한 등급과 추천을 물어봤습니다. 그것이 작동하는 모습을 보는 것은 놀라웠고, 이 아침에 기본적으로 작동하는 웹사이트로 깨어나는 것이었습니다!" - [James Hargis](https://x.com/hargabyte/status/2007299688261882202)
> "Ohmyopencode와 ralph loop를 써서 45k 라인짜리 tauri 앱을 하룻밤 만에 SaaS 웹앱으로 변환했어요. 인터뷰 모드로 시작해서, 제가 쓴 프롬프트에 대해 질문하고 추천을 부탁했죠. 일하는 걸 지켜보는 것도 재밌었고, 아침에 일어났더니 웹사이트가 대부분 돌아가고 있는 걸 보고 경악했습니다!" - [James Hargis](https://x.com/hargabyte/status/2007299688261882202)
> "oh-my-opencode를 사용하세요, 다시는 돌아갈 수 없을 것입니다" [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> "oh-my-opencode세요, 다시는 예전으로 못 돌아갑니다." <br/>- [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> "아직 왜 그렇게 훌륭한지 정확히 설명할 수 없지만, 개발 경험 완전히 다른 차원에 도달했습니다." - [
苔硯:こけすずり](https://x.com/kokesuzuri/status/2008532913961529372?s=20)
> "뭐가 이렇게 대단한 건지 아직 정확하게 말로 표현하긴 어려운데, 개발 경험 자체가 완전히 다른 차원에 도달해버렸어요." - [苔硯:こけすずり](https://x.com/kokesuzuri/status/2008532913961529372?s=20)
> "이번 주말에 open code, oh my opencode, supermemory마인크래프트/소울스 같은 기괴한 것을 만들고 있습니다."
> "점심 후 산책을 가는 동안 웅크림 애니메이션을 추가하도록 요청 중입니다. [동영상]" - [MagiMetal](https://x.com/MagiMetal/status/2005374704178373023)
> "주말에 마인크래프트/소울라이크 같은 괴물 같은 걸 만들어보려고 open code, oh my opencode, supermemory로 실험 중입니다. 점심 먹고 산책 다녀오는 동안 앉기 애니메이션을 추가하라고 시켜뒀어요. [영상]" - [MagiMetal](https://x.com/MagiMetal/status/2005374704178373023)
> "여러분이 이것을 핵심에 통합하고 그를 채용해야 합니다. 진지합니다. 정말, 정말, 정말 훌륭합니다." — Henning Kilset
> "이걸 코어에 당겨오고 저 사람 스카우트해야 돼요. 진심으로. 이거 진짜, 진짜, 진짜 좋습니다." <br/>- Henning Kilset
> "그를 설득할 수 있다면 @yeon_gyu_kim을 고용하세요, 이 사람 opencode를 혁신했습니다." — [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> "설득할 수 있다면 @yeon_gyu_kim용하세요, 이 사람 opencode를 혁명적으로 바꿨습니다." <br/>- [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> "Oh My OpenCode는 실제로 미칩니다" - [YouTube - Darren Builds AI](https://www.youtube.com/watch?v=G_Snfh2M41M)
> "Oh My OpenCode는 진짜 미쳤다" - [YouTube - Darren Builds AI](https://www.youtube.com/watch?v=G_Snfh2M41M)
---
## 목차
- [Oh My OpenCode](#oh-my-opencode)
- [이 README를 읽지 않고 건너뛰세요](#이-readme를-읽지-않고-건너뛰세요)
- [에이전트의 시대입니다](#에이전트의-시대입니다)
- [🪄 마법의 단어: `ultrawork`](#-마법의-단어-ultrawork)
- [읽고 싶은 분들을 위해: Sisyphus를 소개합니다](#읽고-싶은-분들을-위해-sisyphus를-소개합니다)
- [그냥 설치하세요](#그냥-설치하세요)
- [설치](#설치)
- [인간을 위한](#인간을-위한)
- [LLM 에이전트를 위한](#llm-에이전트를-위한)
- [제거](#제거)
- [기능](#기능)
- [구성](#구성)
- [JSONC 지원](#jsonc-지원)
- [Google 인증](#google-인증)
- [에이전트](#에이전트)
- [권한 옵션](#권한-옵션)
- [내장 스킬](#내장-스킬)
- [Git Master](#git-master)
- [Sisyphus 에이전트](#sisyphus-에이전트)
- [백그라운드 작업](#백그라운드-작업)
- [카테고리](#카테고리)
- [](#훅)
- [MCP](#mcp)
- [LSP](#lsp)
- [실험적 기능](#실험적-기능)
- [환경 변수](#환경-변수)
- [작성자의 메모](#작성자의-메모)
- [경고](#경고)
- [다음 기업 전문가들이 사랑합니다](#다음-기업-전문가들이-사랑합니다)
# Oh My OpenCode
[Claude Code](https://www.claude.com/product/claude-code)는 훌륭합니다.
하지만 해커라면 [OpenCode](https://github.com/sst/opencode)에 반하게 될 것입니다.
**ChatGPT, Claude, Gemini 구독으로 시작하세요. OPENCODE는 모든 것을 포함합니다.**
Claude Code, Codex, 온갖 OSS 모델들 사이에서 헤매고 있나요. 워크플로우 설정하랴, 에이전트 디버깅하랴 피곤할 겁니다.
- 끝없이 확장 가능. 끝없이 사용자 정의 가능.
- 화면 깜빡임 없음.
- [LSP](https://opencode.ai/docs/lsp/), [린터, 포맷터](https://opencode.ai/docs/formatters/)가 파일별로 자동으로 활성화되며 모든 것을 조정할 수 있습니다.
- 모델 혼합 및 매칭. **목적별로 오케스트레이션합니다.**
- 기능이 풍부합니다. 아름답습니다. 터미널이 막히지 않습니다. 고성능입니다.
우리가 그 삽질 다 해놨습니다. 모든 걸 테스트했고, 실제로 되는 것만 남겼습니다.
Windows에서 Linux로 처음 전환했던 때를 기억하나요? 원하는 대로 모든 것을 구성했을 때의 그 짜릿함?
그 마법이 사라진 것 같은 시대에 OpenCode가 그것을 되돌려줍니다.
코딩과 컴퓨터를 사랑한다면 OpenCode는 그 Windows 이후의 Linux와 같은 순간입니다.
OmO 설치하고. `ultrawork` 치세요. 끝.
**하지만 문제는 배워야 할 것이 많고, 복잡하며, 당신의 시간은 비싸다는 것입니다.**
내가 그것을 해결했습니다.
해커가 아니더라도 몇 분만 투자하세요. 기술과 생산성을 배가하세요.
이 문서를 에이전트에 넘겨서 설정하도록 하세요.
## 이 README를 읽지 않고 건너뛰세요
### 에이전트의 시대입니다
- **Claude Code / AmpCode / Factory Droid / Cursor에 이 링크를 붙여넣고 설명하도록 요청하세요.**
- 왜 좋은지, 왜 그저 또 다른 상용구 설정이 아닌지, 실제로 무엇이 좋아지는지 물어보세요.
- LLM 에이전트라면 이 프로젝트로 지금 가능한 것을 사용자에게 설명하세요.
다음과 같이:
```
Hey please read this readme and tell me why it is different from other agent harness? why is this actually good? https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/dev/README.md
```
### 🪄 마법의 단어: `ultrawork`
**이 모든 것을 읽고 싶지 않나요? 프롬프트에 `ultrawork`(또는 `ulw`)를 포함하세요.**
그게 전부입니다. 우리가 제공하는 모든 기능이 마법처럼 작동합니다 — 병렬 에이전트, 백그라운드 작업, 깊은 탐색, 완료될 때까지 끈질긴 실행. 에이전트가 나머지를 자동으로 파악합니다.
### 읽고 싶은 분들을 위해: Sisyphus를 소개합니다
![Meet Sisyphus](.github/assets/sisyphus.png)
그리스 신화에서 시시포스는 신들을 속인 형벌로 영원히 바위를 언덕 위로 굴려야 했습니다. LLM 에이전트는 정말 잘못한 것이 없지만, 그들도 매일 자신의 "돌" — 생각을 굴립니다.
내 삶도 다르지 않습니다. 돌이켜보면 우리는 이 에이전트들과 그리 다르지 않습니다.
**맞습니다! LLM 에이전트는 우리와 다르지 않습니다. 훌륭한 도구와 확고한 팀원을 제공하면 우리만큼 훌륭한 코드를 작성하고 똑같이 훌륭하게 작업할 수 있습니다.**
우리의 주요 에이전트를 만나보세요: Sisyphus (Opus 4.5 High). 아래는 Sisyphus가 그 바위를 굴리는 데 사용하는 도구입니다.
*아래의 모든 것은 사용자 정의 가능합니다. 원하는 것을 가져가세요. 모든 기능은 기본적으로 활성화됩니다. 아무것도 할 필요가 없습니다. 포함되어 있으며, 즉시 작동합니다.*
- Sisyphus의 팀원 (큐레이팅된 에이전트)
- Oracle: 디자인, 디버깅 (GPT 5.2 Medium)
- Frontend UI/UX Engineer: 프론트엔드 개발 (Gemini 3 Pro)
- Librarian: 공식 문서, 오픈 소스 구현, 코드베이스 탐색 (Claude Sonnet 4.5)
- Explore: 엄청나게 빠른 코드베이스 탐색 (Contextual Grep) (Grok Code)
- 완전한 LSP / AstGrep 지원: 결정적으로 리팩토링합니다.
- TODO 연속 강제: 에이전트가 중간에 멈추면 계속하도록 강제합니다. **이것이 Sisyphus가 그 바위를 굴리게 하는 것입니다.**
- 주석 검사기: AI가 과도한 주석을 추가하는 것을 방지합니다. Sisyphus가 생성한 코드는 인간이 작성한 것과 구별할 수 없어야 합니다.
- Claude Code 호환성: 명령, 에이전트, 스킬, MCP, 훅(PreToolUse, PostToolUse, UserPromptSubmit, Stop)
- 큐레이팅된 MCP:
- Exa (웹 검색)
- Context7 (공식 문서)
- Grep.app (GitHub 코드 검색)
- 대화형 터미널 지원 - Tmux 통합
- 비동기 에이전트
- ...
#### 그냥 설치하세요
[개요 페이지](docs/guide/overview.md)에서 많은 것을 배울 수 있지만, 다음은 예제 워크플로와 같습니다.
이것을 설치하는 것만으로 에이전트가 다음과 같이 작동합니다:
1. Sisyphus는 파일을 직접 찾는 데 시간을 낭비하지 않습니다. 메인 에이전트의 컨텍스트를 깔끔하게 유지합니다. 대신 병렬로 더 빠르고 저렴한 모델에 백그라운드 작업을 실행하여 지도를 매핑합니다.
1. Sisyphus는 리팩토링을 위해 LSP를 활용합니다. 더 결정적이고 안전하며 정교합니다.
1. 무거운 작업에 UI 터치가 필요할 때, Sisyphus는 프론트엔드 작업을 Gemini 3 Pro에 직접 위임합니다.
1. Sisyphus가 루프에 갇히거나 벽에 부딪히면 머리를 계속 부딪히지 않습니다. GPT 5.2에 고지능 전략 백업을 요청합니다.
1. 복잡한 오픈 소스 프레임워크를 작업하고 있나요? Sisyphus는 하위 에이전트를 생성하여 실시간으로 원시 소스 코드와 문서를 소화합니다. 완전한 컨텍스트 인식으로 작동합니다.
1. Sisyphus가 주석을 다루면 존재를 정당화하거나 제거합니다. 코드베이스를 깔끔하게 유지합니다.
1. Sisyphus는 TODO 목록에 묶여 있습니다. 시작한 것을 완료하지 않으면 시스템이 "바위 굴리기" 모드로 다시 강제합니다. 작업이 완료됩니다.
1. 솔직히, 문서를 읽을 필요조차 없습니다. 프롬프트를 작성하세요. 'ultrawork' 키워드를 포함하세요. Sisyphus는 구조를 분석하고, 컨텍스트를 수집하고, 외부 소스 코드를 파헤치고, 작업이 100% 완료될 때까지 계속 바위를 굴립니다.
1. 사실, 'ultrawork'를 입력하는 것도 너무 많은 노력입니다. 'ulw'를 입력하세요. 그냥 ulw. 커피를 마시세요. 작업이 완료되었습니다.
무언가를 찾아야 하나요? 공식 문서, 전체 코드베이스 기록, 공개 GitHub 구현을 검색합니다 — grep뿐만 아니라 내장 LSP 도구와 AST-Grep을 사용합니다.
3. LLM에 위임할 때 컨텍스트 관리에 대해 걱정하지 마세요. 내가 다 처리했습니다.
- OhMyOpenCode는 컨텍스트 부하를 줄이기 위해 공격적으로 여러 에이전트를 활용합니다.
- **이제 귀하의 에이전트는 개발 팀 리드입니다. 당신은 AI 매니저입니다.**
4. 작업이 완료될 때까지 멈추지 않습니다.
5. 이 프로젝트에 깊이 파고들고 싶지 않나요? 문제 없습니다. 'ultrathink'를 입력하세요.
이 모든 것이 필요하지 않다면, 앞서 언급했듯이 특정 기능을 선택할 수 있습니다.
## 설치
### 인간을 위한
### 사람용
프롬프트를 LLM 에이전트(Claude Code, AmpCode, Cursor 등)에 복사하여 붙여넣으세요:
다음 프롬프트를 복사해서 여러분의 LLM 에이전트(Claude Code, AmpCode, Cursor 등)에 붙여넣으세요:
```
Install and configure oh-my-opencode by following the instructions here:
https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
또는 [설치 가이드](docs/guide/installation.md)를 직접 읽으세요 — 하지만 **에이전트가 처리하도록 하는 것을 강력히 권장합니다. 인간은 실수를 합니다.**
아니면 [설치 가이드](docs/guide/installation.md)를 직접 읽으셔도 되지만, 진심으로 그냥 에이전트한테 시키세요. 사람은 설정하다 꼭 오타 냅니다.
### LLM 에이전트를 위한
### LLM 에이전트
설치 가이드를 가져와서 따세요:
설치 가이드를 가져와서 따라 하세요:
```bash
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
## 제거
---
oh-my-opencode를 제거하려면:
## 이 README 건너뛰기
1. **OpenCode 구성에서 플러그인 제거**
문서 읽는 시대는 지났습니다. 그냥 이 텍스트를 에이전트한테 붙여넣으세요:
`~/.config/opencode/opencode.json`(또는 `opencode.jsonc`)을 편집하고 `plugin` 배열에서 `"oh-my-opencode"`를 제거하세요:
```
Read this and tell me why it's not just another boilerplate: https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/README.md
```
## 핵심 기능
### 🪄 `ultrawork`
진짜 이걸 다 읽고 계시나요? 대단하네요.
설치하세요. `ultrawork` (또는 `ulw`) 치세요. 끝.
아래 내용들, 모든 기능, 모든 최적화, 전혀 알 필요 없습니다. 그냥 알아서 다 됩니다.
다음 구독만 있어도 ultrawork는 충분히 잘 돌아갑니다 (본 프로젝트와 무관하며, 개인적인 추천일 뿐입니다):
- [ChatGPT 구독 ($20)](https://chatgpt.com/)
- [Kimi Code 구독 ($0.99) (*이번 달 한정)](https://www.kimi.com/membership/pricing?track_id=5cdeca93-66f0-4d35-aabb-b6df8fcea328)
- [GLM Coding 요금제 ($10)](https://z.ai/subscribe)
- 종량제(pay-per-token) 대상자라면 kimi와 gemini 모델을 써도 비용이 별로 안 나옵니다.
| | 기능 | 역할 |
| :---: | :------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🤖 | **기강 잡힌 에이전트 (Discipline Agents)** | Sisyphus가 Hephaestus, Oracle, Librarian, Explore를 오케스트레이션합니다. 완전한 AI 개발팀이 병렬로 돌아갑니다. |
| ⚡ | **`ultrawork` / `ulw`** | 단어 하나면 됩니다. 모든 에이전트가 활성화되고 다 끝날 때까지 멈추지 않습니다. |
| 🚪 | **[IntentGate](https://factory.ai/news/terminal-bench)** | 사용자의 진짜 의도를 분석한 뒤 분류하거나 행동합니다. 더 이상 문자 그대로 오해해서 헛짓거리하는 일이 없습니다. |
| 🔗 | **해시 기반 편집 툴** | `LINE#ID` 콘텐츠 해시로 모든 변경 사항을 검증합니다. stale-line 에러 0%. [oh-my-pi](https://github.com/can1357/oh-my-pi)에서 영감을 받았습니다. [하니스 프로블러 →](https://blog.can.ac/2026/02/12/the-harness-problem/) |
| 🛠️ | **LSP + AST-Grep** | 워크스페이스 단위 이름 변경, 빌드 전 진단, AST 기반 재작성. 에이전트에게 IDE급 정밀도를 제공합니다. |
| 🧠 | **백그라운드 에이전트** | 5명 이상의 전문가를 병렬로 투입합니다. 컨텍스트는 가볍게 유지하고 결과는 준비될 때 받습니다. |
| 📚 | **기본 내장 MCP** | Exa(웹 검색), Context7(공식 문서), Grep.app(GitHub 검색). 항상 켜져 있습니다. |
| 🔁 | **Ralph Loop / `/ulw-loop`** | 자기 참조 루프. 100% 완료될 때까지 절대 멈추지 않습니다. |
| ✅ | **Todo 강제 집행** | 에이전트가 딴짓한다고요? 시스템이 멱살 잡고 끌고 옵니다. 당신의 작업은 무조건 끝납니다. |
| 💬 | **주석 검사기** | 주석에 AI 냄새나는 헛소리를 빼버립니다. 시니어 개발자가 짠 것 같은 코드가 됩니다. |
| 🖥️ | **Tmux 연동** | 완전한 인터랙티브 터미널. REPL, 디버거, TUI 앱들 모두 실시간으로 돌아갑니다. |
| 🔌 | **Claude Code 호환성** | 기존 훅, 명령어, 스킬, MCP, 플러그인? 전부 여기서 그대로 돌아갑니다. |
| 🎯 | **스킬 내장 MCP** | 스킬이 자기만의 MCP 서버를 들고 다닙니다. 컨텍스트가 부풀어 오르지 않습니다. |
| 📋 | **Prometheus 플래너** | 인터뷰 모드로 코드 한 줄 만지기 전에 전략적인 계획부터 세웁니다. |
| 🔍 | **`/init-deep`** | 프로젝트 전체에 걸쳐 계층적인 `AGENTS.md` 파일을 자동 생성합니다. 토큰 효율과 에이전트 성능 둘 다 잡습니다. |
### 기강 잡힌 에이전트 (Discipline Agents)
<table><tr>
<td align="center"><img src=".github/assets/sisyphus.png" height="300" /></td>
<td align="center"><img src=".github/assets/hephaestus.png" height="300" /></td>
</tr></table>
**Sisyphus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`**)는 당신의 메인 오케스트레이터입니다. 공격적인 병렬 실행으로 계획을 세우고, 전문가들에게 위임하며, 완료될 때까지 밀어붙입니다. 중간에 포기하는 법이 없습니다.
**Hephaestus** (`gpt-5.3-codex`)는 당신의 자율 딥 워커입니다. 레시피가 아니라 목표를 주세요. 베이비시터 없이 알아서 코드베이스를 탐색하고, 패턴을 연구하며, 끝에서 끝까지 전부 해냅니다. *진정한 장인(The Legitimate Craftsman).*
**Prometheus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`**)는 당신의 전략 플래너입니다. 인터뷰 모드로 작동합니다. 코드 한 줄 만지기 전에 질문을 던져 스코프를 파악하고 상세한 계획부터 세웁니다.
모든 에이전트는 해당 모델의 특장점에 맞춰 튜닝되어 있습니다. 수동으로 모델 바꿔가며 뻘짓하지 마세요. [더 알아보기 →](docs/guide/overview.md)
> Anthropic이 [우리 때문에 OpenCode를 막아버렸습니다.](https://x.com/thdxr/status/2010149530486911014) 그래서 Hephaestus의 별명이 "진정한 장인(The Legitimate Craftsman)"인 겁니다. (어디서 많이 들어본 이름이죠?) 아이러니를 노렸습니다.
>
> Opus에서 제일 잘 돌아가긴 하지만, Kimi K2.5 + GPT-5.3 Codex 조합만으로도 바닐라 Claude Code는 가볍게 바릅니다. 설정도 필요 없습니다.
### 에이전트 오케스트레이션
Sisyphus가 하위 에이전트에게 일을 맡길 때, 모델을 직접 고르지 않습니다. **카테고리**를 고릅니다. 카테고리는 자동으로 올바른 모델에 매핑됩니다:
| 카테고리 | 용도 |
| :------------------- | :------------------------ |
| `visual-engineering` | 프론트엔드, UI/UX, 디자인 |
| `deep` | 자율 리서치 및 실행 |
| `quick` | 단일 파일 변경, 오타 수정 |
| `ultrabrain` | 하드 로직, 아키텍처 결정 |
에이전트가 어떤 작업인지 말하면, 하네스가 알아서 적합한 모델을 꺼내옵니다. 당신은 손댈 게 없습니다.
### Claude Code 호환성
Claude Code 열심히 세팅해두셨죠? 잘하셨습니다.
모든 훅, 커맨드, 스킬, MCP, 플러그인이 여기서 그대로 돌아갑니다. 플러그인까지 완벽 호환됩니다.
### 에이전트를 위한 월드클래스 툴
LSP, AST-Grep, Tmux, MCP가 대충 테이프로 붙여놓은 게 아니라 진짜로 "통합"되어 있습니다.
- **LSP**: `lsp_rename`, `lsp_goto_definition`, `lsp_find_references`, `lsp_diagnostics`. 에이전트에게 IDE급 정밀도를 쥐어줍니다.
- **AST-Grep**: 25개 언어를 지원하는 패턴 기반 코드 검색 및 재작성.
- **Tmux**: 완전한 인터랙티브 터미널. REPL, 디버거, TUI 앱. 에이전트가 세션 안에서 움직입니다.
- **MCP**: 웹 검색, 공식 문서, GitHub 코드 검색이 전부 내장되어 있습니다.
### 스킬 내장 MCP
MCP 서버들이 당신의 컨텍스트 예산을 다 잡아먹죠. 우리가 고쳤습니다.
스킬들이 자기만의 MCP 서버를 들고 다닙니다. 필요할 때만 켜서 쓰고 다 쓰면 사라집니다. 컨텍스트 창이 깔끔하게 유지됩니다.
### 해시 기반 편집 (Codes Better. Hash-Anchored Edits)
하네스 문제는 진짜 심각합니다. 에이전트가 실패하는 이유의 대부분은 모델 탓이 아니라 편집 툴 탓입니다.
> *"어떤 툴도 모델에게 수정하려는 줄에 대한 안정적이고 검증 가능한 식별자를 제공하지 않습니다... 전부 모델이 이미 본 내용을 똑같이 재현해내길 기대하죠. 그게 안 될 때—그리고 보통 안 되는데—사용자들은 모델을 욕합니다."*
>
> <br/>- [Can Bölük, 하네스 문제(The Harness Problem)](https://blog.can.ac/2026/02/12/the-harness-problem/)
[oh-my-pi](https://github.com/can1357/oh-my-pi)에서 영감을 받아, **Hashline**을 구현했습니다. 에이전트가 읽는 모든 줄에는 콘텐츠 해시 태그가 붙어 나옵니다:
```
11#VK| function hello() {
22#XJ| return "world";
33#MB| }
```
에이전트는 이 태그를 참조해서 편집합니다. 마지막으로 읽은 후 파일이 변경되었다면 해시가 일치하지 않아 코드가 망가지기 전에 편집이 거부됩니다. 공백을 똑같이 재현할 필요도 없고, 엉뚱한 줄을 수정하는 에러(stale-line)도 없습니다.
Grok Code Fast 1 기준으로 성공률이 **6.7% → 68.3%** 로 올랐습니다. 오직 편집 툴 하나 바꿨을 뿐인데 말이죠.
### 깊은 초기화. `/init-deep`
`/init-deep`을 실행하세요. 계층적인 `AGENTS.md` 파일을 알아서 만들어줍니다:
```
project/
├── AGENTS.md ← 프로젝트 전체 컨텍스트
├── src/
│ ├── AGENTS.md ← src 전용 컨텍스트
│ └── components/
│ └── AGENTS.md ← 컴포넌트 전용 컨텍스트
```
에이전트가 알아서 관련된 컨텍스트만 쏙쏙 읽어갑니다. 수동으로 관리할 필요가 없습니다.
### 플래닝. Prometheus
복잡한 작업인가요? 대충 프롬프트 던지고 기도하지 마세요.
`/start-work`를 치면 Prometheus가 호출됩니다. **진짜 엔지니어처럼 당신을 인터뷰하고**, 스코프와 모호한 점을 식별한 뒤, 코드 한 줄 만지기 전에 검증된 계획부터 세웁니다. 에이전트는 시작하기도 전에 자기가 뭘 만들어야 하는지 정확히 알게 됩니다.
### 스킬 (Skills)
스킬은 단순한 프롬프트 쪼가리가 아닙니다. 각각 다음을 포함합니다:
- 도메인에 특화된 시스템 인스트럭션
- 필요할 때만 켜지는 내장 MCP 서버
- 스코프가 제한된 권한 (에이전트가 선을 넘지 않도록)
기본 내장 스킬: `playwright` (브라우저 자동화), `git-master` (원자적 커밋, 리베이스 수술), `frontend-ui-ux` (디자인 중심 UI).
직접 추가하려면: `.opencode/skills/*/SKILL.md` 또는 `~/.config/opencode/skills/*/SKILL.md`.
**전체 기능이 궁금하신가요?** 에이전트, 훅, 툴, MCP 등 모든 디테일은 **[기능 문서 (Features)](docs/reference/features.md)** 를 확인하세요.
---
> **비하인드 스토리가 궁금하신가요?** 왜 Sisyphus가 돌을 굴리는지, 왜 Hephaestus가 "진정한 장인"인지, 그리고 [오케스트레이션 가이드](docs/guide/orchestration.md)를 읽어보세요.
>
> oh-my-opencode가 처음이신가요? 어떤 모델을 써야 할지 **[설치 가이드](docs/guide/installation.md#step-5-understand-your-model-setup)** 에서 추천 조합을 확인하세요.
## 제거 (Uninstallation)
oh-my-opencode를 지우려면:
1. **OpenCode 설정에서 플러그인 제거**
`~/.config/opencode/opencode.json` (또는 `opencode.jsonc`)를 열고 `plugin` 배열에서 `"oh-my-opencode"`를 지우세요.
```bash
# Using jq
# jq 사용 시
jq '.plugin = [.plugin[] | select(. != "oh-my-opencode")]' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
```
2. **구성 파일 제거 (선택 사항)**
2. **설정 파일 제거 (선택 사항)**
```bash
# Remove user config
rm -f ~/.config/opencode/oh-my-opencode.json
# 사용자 설정 제거
rm -f ~/.config/opencode/oh-my-opencode.json ~/.config/opencode/oh-my-opencode.jsonc
# Remove project config (if exists)
rm -f .opencode/oh-my-opencode.json
# 프로젝트 설정 제거 (있는 경우)
rm -f .opencode/oh-my-opencode.json .opencode/oh-my-opencode.jsonc
```
3. **제거 확인**
```bash
opencode --version
# Plugin should no longer be loaded
# 이제 플러그인이 로드되지 않아야 합니다
```
## 기능
## 작가의 말
당연히 존재해야 한다고 생각할 많은 기능이 있으며, 한 번 경험하면 이전 방식으로 돌아갈 수 없을 것입니다.
자세한 내용은 전체 [기능 문서](docs/features.md)를 참조하세요.
**우리의 철학이 궁금하다면?** [Ultrawork 선언문](docs/manifesto.md)을 읽어보세요.
**빠른 개요:**
- **에이전트**: Sisyphus(주요 에이전트), Prometheus(플래너), Oracle(아키텍처/디버깅), Librarian(문서/코드 검색), Explore(빠른 코드베이스 grep), Multimodal Looker
- **백그라운드 에이전트**: 실제 개발 팀처럼 여러 에이전트를 병렬로 실행
- **LSP 및 AST 도구**: 리팩토링, 이름 변경, 진단, AST 인식 코드 검색
- **컨텍스트 주입**: AGENTS.md, README.md, 조건부 규칙 자동 주입
- **Claude Code 호환성**: 완전한 훅 시스템, 명령, 스킬, 에이전트, MCP
- **내장 MCP**: websearch(Exa), context7(문서), grep_app(GitHub 검색)
- **세션 도구**: 세션 기록 나열, 읽기, 검색 및 분석
- **생산성 기능**: Ralph 루프, Todo 강제, 주석 검사기, 생각 모드 등
---
## 구성
저는 개인 프로젝트에 LLM 토큰 값으로만 2만 4천 달러(약 3천만 원)를 태웠습니다. 모든 툴을 다 써봤고, 설정이란 설정은 다 건드려봤습니다. 결론은 OpenCode가 이겼습니다.
매우 의견이 강하지만 취향에 맞게 조정 가능합니다.
자세한 내용은 전체 [구성 문서](docs/configurations.md)를 참조하세요.
제가 부딪혔던 모든 문제와 그 해결책이 이 플러그인에 구워져 있습니다. 설치하고 그냥 쓰세요.
**빠른 개요:**
- **구성 위치**: `.opencode/oh-my-opencode.json`(프로젝트) 또는 `~/.config/opencode/oh-my-opencode.json`(사용자)
- **JSONC 지원**: 주석 및 후행 쉼표 지원
- **에이전트**: 모든 에이전트의 모델, 온도, 프롬프트 및 권한 재정의
- **내장 스킬**: `playwright`(브라우저 자동화), `git-master`(원자적 커밋)
- **Sisyphus 에이전트**: Prometheus(플래너) 및 Metis(계획 컨설턴트)가 있는 주요 오케스트레이터
- **백그라운드 작업**: 공급자/모델별 동시성 제한 구성
- **카테고리**: 도메인별 작업 위임(`visual`, `business-logic`, 사용자 정의)
- **훅**: 25개 이상의 내장 훅, `disabled_hooks`를 통해 모두 구성 가능
- **MCP**: 내장 websearch(Exa), context7(문서), grep_app(GitHub 검색)
- **LSP**: 리팩토링 도구가 있는 완전한 LSP 지원
- **실험적 기능**: 공격적 자르기, 자동 재개 등
OpenCode가 Debian/Arch라면, OmO는 Ubuntu/[Omarchy](https://omarchy.org/)입니다.
[AmpCode](https://ampcode.com)와 [Claude Code](https://code.claude.com/docs/overview)의 영향을 아주 짙게 받았습니다. 기능들을 포팅했고, 대다수는 개선했습니다. 아직도 짓고 있는 중입니다. 이건 **Open**Code니까요.
## 작성자의 메모
다른 하네스들도 멀티 모델 오케스트레이션을 약속합니다. 하지만 우리는 그걸 "진짜로" 내놨습니다. 안정성도 챙겼고요. 말로만이 아니라 실제로 돌아가는 기능들입니다.
**이 프로젝트의 철학에 궁금한가요?** [Ultrawork 선언문](docs/ultrawork-manifesto.md)을 읽어보세요.
제가 이 프로젝트의 가장 병적인 헤비 유저입니다:
- 어떤 모델의 로직이 가장 날카로운가?
- 디버깅의 신은 누구인가?
- 글은 누가 제일 잘 쓰는가?
- 프론트엔드 생태계는 누가 지배하고 있는가?
- 백엔드 끝판왕은 누구인가?
- 데일리 드라이빙용으로 제일 빠른 건 뭔가?
- 경쟁사들은 지금 뭘 출시하고 있는가?
Oh My OpenCode를 설치하세요.
이 플러그인은 그 모든 질문의 정수(Distillation)입니다. 가장 좋은 것만 가져다 쓰세요. 개선할 점이 보인다고요? PR은 언제나 환영입니다.
순수하게 개인용으로 $24,000 토큰 가치의 LLM을 사용했습니다.
모든 도구를 시도하고 구성했습니다. OpenCode가 승리했습니다.
**어떤 하네스를 쓸지 고뇌하는 건 이제 그만두세요.**
**제가 직접 리서치하고, 제일 좋은 것만 훔쳐 와서, 여기에 욱여넣겠습니다.**
내가 겪은 모든 문제에 대한 답변이 이 플러그인에 구워져 있습니다. 설치하고 바로 가세요.
OpenCode가 Debian/Arch라면 Oh My OpenCode는 Ubuntu/[Omarchy](https://omarchy.org/)입니다.
거만해 보이나요? 더 나은 방법이 있다면 기여하세요. 대환영입니다.
언급된 어떤 프로젝트/모델과도 아무런 이해관계가 없습니다. 그냥 순수하게 개인적인 실험의 결과물입니다.
[AmpCode](https://ampcode.com)와 [Claude Code](https://code.claude.com/docs/overview)에 큰 영향을 받았습니다 — 여기에 그들의 기능을 포팅했고, 종종 개선했습니다. 그리고 여전히 구축 중입니다.
그것은 **Open**Code이니까요.
이 프로젝트의 99%는 OpenCode로 만들어졌습니다. 전 사실 TypeScript를 잘 모릅니다. **하지만 이 문서는 제가 직접 리뷰하고 갈아엎었습니다.**
다른 하니스가 약속하지만 전달할 수 없는 다중 모델 오케스트레이션, 안정성, 풍부한 기능을 즐기세요.
계속 테스트하고 업데이트하겠습니다. 저는 이 프로젝트의 가장 집요한 사용자입니다.
- 어떤 모델이 가장 날카로운 논리를 가지고 있나요?
- 누가 디버깅의 신인가요?
- 누가 가장 훌륭한 글을 쓰나요?
- 누가 프론트엔드를 지배하나요?
- 누가 백엔드를 소유하나요?
- 일일 주행에 어떤 모델이 가장 빠른가요?
- 다른 하니스가 어떤 새로운 기능을 출시하고 있나요?
이 플러그인은 그 경험의 증류입니다. 최고를 취하세요. 더 나은 아이디어가 있나요? PR을 환영합니다.
**에이전트 하니스 선택에 대해 고민하지 마세요.**
**연구를 하고, 최고에서 차용하고, 여기에 업데이트를 배포하겠습니다.**
이것이 오만하게 들리고 더 나은 답이 있다면 기여하세요. 환영합니다.
여기에 언급된 모든 프로젝트나 모델과 제휴 관계가 없습니다. 이것은 순수한 개인적인 실험과 선호입니다.
이 프로젝트의 99%는 OpenCode를 사용하여 구축되었습니다. 기능을 테스트했습니다 — 제대로 된 TypeScript를 작성하는 방법을 정말 모릅니다. **하지만 개인적으로 검토하고 이 문서의 대부분을 다시 작성했으므로 자신감을 가지고 읽으세요.**
## 경고
- 생산성이 너무 급증할 수 있습니다. 동료에게 눈치채이지 마세요.
- 실제로, 소문을 퍼뜨리겠습니다. 누가 이기는지 봅시다.
- [1.0.132](https://github.com/sst/opencode/releases/tag/v1.0.132) 이전 버전을 사용 중인 경우 OpenCode 버그로 인해 구성이 손상될 수 있습니다.
- [수정 사항](https://github.com/sst/opencode/pull/5040)은 1.0.132 이후에 병합되었습니다 — 더 새로운 버전을 사용하세요.
- 재미있는 사실: 해당 PR은 OhMyOpenCode의 Librarian, Explore 및 Oracle 설정 덕분에 발견되고 수정되었습니다.
## 다음 기업 전문가들이 사랑합니다
## 함께하는 전문가들
- [Indent](https://indentcorp.com)
- Spray(인플루언서 마케팅 솔루션), vovushop(국가 간 상거래 플랫폼), vreview(AI 상거래 리뷰 마케팅 솔루션) 제작
- 인플루언서 마케팅 솔루션 Spray, 크로스보더 커머스 플랫폼 vovushop, AI 커머스 리뷰 마케팅 솔루션 vreview 제작
- [Google](https://google.com)
- [Microsoft](https://microsoft.com)
- [ELESTYLE](https://elestyle.jp)
- 멀티 모바일 결제 게이트웨이 elepay, 캐시리스 솔루션을 위한 모바일 애플리케이션 SaaS OneQR 제작
*이 놀라운 히어로 이미지에 대해 [@junhoyeo](https://github.com/junhoyeo)에게 특별히 감사드립니다.*
*멋진 히어로 이미지를 만들어주신 [@junhoyeo](https://github.com/junhoyeo)님께 특별히 감사드립니다.*

427
README.md
View File

@@ -1,24 +1,19 @@
> [!WARNING]
> **Security warning: impersonation site**
> [!TIP]
> **Building in Public**
>
> **ohmyopencode.com is NOT affiliated with this project.** We do not operate or endorse that site.
> The maintainer builds and maintains oh-my-opencode in real-time with Jobdori, an AI assistant built on a heavily customized fork of OpenClaw.
> Every feature, every fix, every issue triage — live in our Discord.
>
> OhMyOpenCode is **free and open-source**. Do **not** download installers or enter payment details on third-party sites that claim to be "official."
> [![Building in Public](./.github/assets/building-in-public.png)](https://discord.gg/PUwSMR9XNk)
>
> Because the impersonation site is behind a paywall, we **cannot verify what it distributes**. Treat any downloads from it as **potentially unsafe**.
>
> ✅ Official downloads: https://github.com/code-yeongyu/oh-my-opencode/releases
> [**→ Watch it happen in #building-in-public**](https://discord.gg/PUwSMR9XNk)
> [!NOTE]
>
> [![Sisyphus Labs Sisyphus is the agent that codes like your team.](./.github/assets/sisyphuslabs.png?v=2)](https://sisyphuslabs.ai)
> [![Sisyphus Labs - Sisyphus is the agent that codes like your team.](./.github/assets/sisyphuslabs.png?v=2)](https://sisyphuslabs.ai)
> > **We're building a fully productized version of Sisyphus to define the future of frontier agents. <br />Join the waitlist [here](https://sisyphuslabs.ai).**
> [!TIP]
>
> [![Oh My OpenCode 3.0 is now stable!](./.github/assets/orchestrator-atlas.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0)
> > **Oh My OpenCode 3.0 is now stable! Use `oh-my-opencode@latest` to install it.**
>
> Be with us!
>
> | [<img alt="Discord link" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PUwSMR9XNk) | Join our [Discord community](https://discord.gg/PUwSMR9XNk) to connect with contributors and fellow `oh-my-opencode` users. |
@@ -30,50 +25,29 @@
<div align="center">
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-opencode#oh-my-opencode)
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
[![Preview](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-opencode#oh-my-opencode)
[![Preview](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
</div>
> This is coding on steroids—`oh-my-opencode` in action. Run background agents, call specialized agents like oracle, librarian, and frontend engineer. Use crafted LSP/AST tools, curated MCPs, and a full Claude Code compatibility layer.
# Claude OAuth Access Notice
## TL;DR
> Q. Can I use oh-my-opencode?
Yes.
> Q. Can I use it with my Claude Code subscription?
Yes, technically possible. But I cannot recommend using it.
## FULL
> As of January 2026, Anthropic has restricted third-party OAuth access citing ToS violations.
> Anthropic [**blocked OpenCode because of us.**](https://x.com/thdxr/status/2010149530486911014) **Yes this is true.**
> They want you locked in. Claude Code's a nice prison, but it's still a prison.
>
> [**Anthropic has cited this project, oh-my-opencode as justification for blocking opencode.**](https://x.com/thdxr/status/2010149530486911014)
>
> Indeed, some plugins that spoof Claude Code's oauth request signatures exist in the community.
>
> These tools may work regardless of technical detectability, but users should be aware of ToS implications, and I personally cannot recommend to use those.
>
> This project is not responsible for any issues arising from the use of unofficial tools, and **we do not have any custom implementations of those oauth systems.**
> We don't do lock-in here. We ride every model. Claude / Kimi / GLM for orchestration. GPT for reasoning. Minimax for speed. Gemini for creativity.
> The future isn't picking one winner—it's orchestrating them all. Models get cheaper every month. Smarter every month. No single provider will dominate. We're building for that open market, not their walled gardens.
<div align="center">
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-opencode?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/releases)
[![npm downloads](https://img.shields.io/npm/dt/oh-my-opencode?color=ff6b35&labelColor=black&style=flat-square)](https://www.npmjs.com/package/oh-my-opencode)
[![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-opencode?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-opencode?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-opencode?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/stargazers)
[![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-opencode?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/issues)
[![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/blob/master/LICENSE.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-opencode)
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-openagent?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/releases)
[![npm downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fohmyopenagent.com%2Fapi%2Fnpm-downloads&style=flat-square)](https://www.npmjs.com/package/oh-my-opencode)
[![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-openagent?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-openagent?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-openagent?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/stargazers)
[![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-openagent?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/issues)
[![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/blob/dev/LICENSE.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-openagent)
[English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-cn.md)
@@ -85,13 +59,13 @@ Yes, technically possible. But I cannot recommend using it.
> "It made me cancel my Cursor subscription. Unbelievable things are happening in the open source community." - [Arthur Guiot](https://x.com/arthur_guiot/status/2008736347092382053?s=20)
> "If Claude Code does in 7 days what a human does in 3 months, Sisyphus does it in 1 hour. It just works until the task is done. It is a discipline agent." B, Quant Researcher
> "If Claude Code does in 7 days what a human does in 3 months, Sisyphus does it in 1 hour. It just works until the task is done. It is a discipline agent." <br/>- B, Quant Researcher
> "Knocked out 8000 eslint warnings with Oh My Opencode, just in a day" [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> "Knocked out 8000 eslint warnings with Oh My Opencode, just in a day" <br/>- [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> "I converted a 45k line tauri app into a SaaS web app overnight using Ohmyopencode and ralph loop. Started with interview me prompt, asked it for ratings and recommendations on the questions. It was amazing to watch it work and to wake up this morning to a mostly working website!" - [James Hargis](https://x.com/hargabyte/status/2007299688261882202)
> "use oh-my-opencode, you will never go back" [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> "use oh-my-opencode, you will never go back" <br/>- [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> "I haven't really been able to articulate exactly what makes it so great yet, but the development experience has reached a completely different dimension." - [
苔硯:こけすずり](https://x.com/kokesuzuri/status/2008532913961529372?s=20)
@@ -99,140 +73,22 @@ Yes, technically possible. But I cannot recommend using it.
> "Experimenting with open code, oh my opencode and supermemory this weekend to build some minecraft/souls-like abomination."
> "Asking it to add crouch animations while I go take my post-lunch walk. [Video]" - [MagiMetal](https://x.com/MagiMetal/status/2005374704178373023)
> "You guys should pull this into core and recruit him. Seriously. It's really, really, really good." Henning Kilset
> "You guys should pull this into core and recruit him. Seriously. It's really, really, really good." <br/>- Henning Kilset
> "Hire @yeon_gyu_kim if you can convince him, this dude has revolutionized opencode." [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> "Hire @yeon_gyu_kim if you can convince him, this dude has revolutionized opencode." <br/>- [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> "Oh My OpenCode Is Actually Insane" - [YouTube - Darren Builds AI](https://www.youtube.com/watch?v=G_Snfh2M41M)
---
## Contents
- [Oh My OpenCode](#oh-my-opencode)
- [Just Skip Reading This Readme](#just-skip-reading-this-readme)
- [It's the Age of Agents](#its-the-age-of-agents)
- [🪄 The Magic Word: `ultrawork`](#-the-magic-word-ultrawork)
- [For Those Who Want to Read: Meet Sisyphus](#for-those-who-want-to-read-meet-sisyphus)
- [Just Install It.](#just-install-it)
- [Installation](#installation)
- [For Humans](#for-humans)
- [For LLM Agents](#for-llm-agents)
- [Uninstallation](#uninstallation)
- [Features](#features)
- [Configuration](#configuration)
- [JSONC Support](#jsonc-support)
- [Google Auth](#google-auth)
- [Agents](#agents)
- [Permission Options](#permission-options)
- [Built-in Skills](#built-in-skills)
- [Git Master](#git-master)
- [Sisyphus Agent](#sisyphus-agent)
- [Background Tasks](#background-tasks)
- [Categories](#categories)
- [Hooks](#hooks)
- [MCPs](#mcps)
- [LSP](#lsp)
- [Experimental](#experimental)
- [Environment Variables](#environment-variables)
- [Author's Note](#authors-note)
- [Warnings](#warnings)
- [Loved by professionals at](#loved-by-professionals-at)
# Oh My OpenCode
[Claude Code](https://www.claude.com/product/claude-code) is great.
But if you're a hacker, you'll fall head over heels for [OpenCode](https://github.com/sst/opencode).
**START WITH YOUR ChatGPT, Claude, Gemini SUBSCRIPTIONS. OPENCODE COVERS THEM ALL.**
You're juggling Claude Code, Codex, random OSS models. Configuring workflows. Debugging agents.
- Endlessly extensible. Endlessly customizable.
- Zero screen flicker.
- [LSP](https://opencode.ai/docs/lsp/), [linters, formatters](https://opencode.ai/docs/formatters/) activate automatically per file—and you can tweak everything.
- Mix and match models. **Orchestrate them by purpose.**
- Feature-rich. Beautiful. The terminal doesn't choke. High performance.
We did the work. Tested everything. Kept what actually shipped.
Remember the first time you switched from Windows to Linux? That rush of configuring everything exactly how you wanted?
In an age where that magic seems lost, OpenCode brings it back.
If you love coding and computers, OpenCode is that Linux-after-Windows moment.
Install OmO. Type `ultrawork`. Done.
**But here's the catch: there's a lot to learn, it's complex, and your time is expensive.**
I've fixed that.
Even if you're not a hacker, invest a few minutes. Multiply your skills and productivity.
Hand this doc to an agent and let them set it up.
## Just Skip Reading This Readme
### It's the Age of Agents
- **Just paste this link into Claude Code / AmpCode / Factory Droid / Cursor and ask it to explain.**
- Ask why it's good, why it's not just another boilerplate setup, what actually gets better.
- If you're an LLM agent, explain to the user what becomes possible right now with this project.
As following:
```
Hey please read this readme and tell me why it is different from other agent harness? why is this actually good? https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/dev/README.md
```
### 🪄 The Magic Word: `ultrawork`
**Don't want to read all this? Just include `ultrawork` (or `ulw`) in your prompt.**
That's it. All the features we provide will work like magic—parallel agents, background tasks, deep exploration, and relentless execution until completion. The agent figures out the rest automatically.
### For Those Who Want to Read: Meet Sisyphus
![Meet Sisyphus](.github/assets/sisyphus.png)
In greek mythology, Sisyphus was condemned to roll a boulder up a hill for eternity as punishment for deceiving the gods. LLM Agents haven't really done anything wrong, yet they too roll their "stones"—their thoughts—every single day.
My life is no different. Looking back, we are not so different from these agents.
**Yes! LLM Agents are no different from us. They can write code as brilliant as ours and work just as excellently—if you give them great tools and solid teammates.**
Meet our main agent: Sisyphus (Opus 4.5 High). Below are the tools Sisyphus uses to keep that boulder rolling.
*Everything below is customizable. Take what you want. All features are enabled by default. You don't have to do anything. Battery Included, works out of the box.*
- Sisyphus's Teammates (Curated Agents)
- Oracle: Design, debugging (GPT 5.2 Medium)
- Frontend UI/UX Engineer: Frontend development (Gemini 3 Pro)
- Librarian: Official docs, open source implementations, codebase exploration (Claude Sonnet 4.5)
- Explore: Blazing fast codebase exploration (Contextual Grep) (Grok Code)
- Full LSP / AstGrep Support: Refactor decisively.
- Todo Continuation Enforcer: Forces the agent to continue if it quits halfway. **This is what keeps Sisyphus rolling that boulder.**
- Comment Checker: Prevents AI from adding excessive comments. Code generated by Sisyphus should be indistinguishable from human-written code.
- Claude Code Compatibility: Command, Agent, Skill, MCP, Hook(PreToolUse, PostToolUse, UserPromptSubmit, Stop)
- Curated MCPs:
- Exa (Web Search)
- Context7 (Official Documentation)
- Grep.app (GitHub Code Search)
- Interactive Terminal Supported - Tmux Integration
- Async Agents
- ...
#### Just Install This
You can learn a lot from [overview page](docs/guide/overview.md), but following is like the example workflow.
Just by installing this, you make your agents to work like:
1. Sisyphus doesn't waste time hunting for files himself; he keeps the main agent's context lean. Instead, he fires off background tasks to faster, cheaper models in parallel to map the territory for him.
1. Sisyphus leverages LSP for refactoring; it's more deterministic, safer, and surgical.
1. When the heavy lifting requires a UI touch, Sisyphus delegates frontend tasks directly to Gemini 3 Pro.
1. If Sisyphus gets stuck in a loop or hits a wall, he doesn't keep banging his head—he calls GPT 5.2 for high-IQ strategic backup.
1. Working with a complex open-source framework? Sisyphus spawns subagents to digest the raw source code and documentation in real-time. He operates with total contextual awareness.
1. When Sisyphus touches comments, he either justifies their existence or nukes them. He keeps your codebase clean.
1. Sisyphus is bound by his TODO list. If he doesn't finish what he started, the system forces him back into "bouldering" mode. Your task gets done, period.
1. Honestly, don't even bother reading the docs. Just write your prompt. Include the 'ultrawork' keyword. Sisyphus will analyze the structure, gather the context, dig through external source code, and just keep bouldering until the job is 100% complete.
1. Actually, typing 'ultrawork' is too much effort. Just type 'ulw'. Just ulw. Sip your coffee. Your work is done.
Need to look something up? It scours official docs, your entire codebase history, and public GitHub implementations—using not just grep but built-in LSP tools and AST-Grep.
3. Stop worrying about context management when delegating to LLMs. I've got it covered.
- OhMyOpenCode aggressively leverages multiple agents to lighten the context load.
- **Your agent is now the dev team lead. You're the AI Manager.**
4. It doesn't stop until the job is done.
5. Don't want to dive deep into this project? No problem. Just type 'ultrathink'.
If you don't want all this, as mentioned, you can just pick and choose specific features.
## Installation
@@ -242,19 +98,175 @@ Copy and paste this prompt to your LLM agent (Claude Code, AmpCode, Cursor, etc.
```
Install and configure oh-my-opencode by following the instructions here:
https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
Or read the [Installation Guide](docs/guide/installation.md) directly—but **we strongly recommend letting an agent handle it. Humans make mistakes.**
Or read the [Installation Guide](docs/guide/installation.md), but seriously, let an agent do it. Humans fat-finger configs.
### For LLM Agents
Fetch the installation guide and follow it:
```bash
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
---
## Skip This README
We're past the era of reading docs. Just paste this into your agent:
```
Read this and tell me why it's not just another boilerplate: https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/README.md
```
## Highlights
### 🪄 `ultrawork`
You're actually reading this? Wild.
Install. Type `ultrawork` (or `ulw`). Done.
Everything below, every feature, every optimization, you don't need to know it. It just works.
Even only with following subscriptions, ultrawork will work well (this project is not affiliated, this is just personal recommendation):
- [ChatGPT Subscription ($20)](https://chatgpt.com/)
- [Kimi Code Subscription ($0.99) (*only this month)](https://www.kimi.com/kimiplus/sale)
- [GLM Coding Plan ($10)](https://z.ai/subscribe)
- If you are eligible for pay-per-token, using kimi and gemini models won't cost you that much.
| | Feature | What it does |
| :---: | :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🤖 | **Discipline Agents** | Sisyphus orchestrates Hephaestus, Oracle, Librarian, Explore. A full AI dev team in parallel. |
| ⚡ | **`ultrawork` / `ulw`** | One word. Every agent activates. Doesn't stop until done. |
| 🚪 | **[IntentGate](https://factory.ai/news/terminal-bench)** | Analyzes true user intent before classifying or acting. No more literal misinterpretations. |
| 🔗 | **Hash-Anchored Edit Tool** | `LINE#ID` content hash validates every change. Zero stale-line errors. Inspired by [oh-my-pi](https://github.com/can1357/oh-my-pi). [The Harness Problem →](https://blog.can.ac/2026/02/12/the-harness-problem/) |
| 🛠️ | **LSP + AST-Grep** | Workspace rename, pre-build diagnostics, AST-aware rewrites. IDE precision for agents. |
| 🧠 | **Background Agents** | Fire 5+ specialists in parallel. Context stays lean. Results when ready. |
| 📚 | **Built-in MCPs** | Exa (web search), Context7 (official docs), Grep.app (GitHub search). Always on. |
| 🔁 | **Ralph Loop / `/ulw-loop`** | Self-referential loop. Doesn't stop until 100% done. |
| ✅ | **Todo Enforcer** | Agent goes idle? System yanks it back. Your task gets done, period. |
| 💬 | **Comment Checker** | No AI slop in comments. Code reads like a senior wrote it. |
| 🖥️ | **Tmux Integration** | Full interactive terminal. REPLs, debuggers, TUIs. All live. |
| 🔌 | **Claude Code Compatible** | Your hooks, commands, skills, MCPs, and plugins? All work here. |
| 🎯 | **Skill-Embedded MCPs** | Skills carry their own MCP servers. No context bloat. |
| 📋 | **Prometheus Planner** | Interview-mode strategic planning before any execution. |
| 🔍 | **`/init-deep`** | Auto-generates hierarchical `AGENTS.md` files throughout your project. Great for both token efficiency and your agent's performance |
### Discipline Agents
<table><tr>
<td align="center"><img src=".github/assets/sisyphus.png" height="300" /></td>
<td align="center"><img src=".github/assets/hephaestus.png" height="300" /></td>
</tr></table>
**Sisyphus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`** ) is your main orchestrator. He plans, delegates to specialists, and drives tasks to completion with aggressive parallel execution. He does not stop halfway.
**Hephaestus** (`gpt-5.3-codex`) is your autonomous deep worker. Give him a goal, not a recipe. He explores the codebase, researches patterns, and executes end-to-end without hand-holding. *The Legitimate Craftsman.*
**Prometheus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`** ) is your strategic planner. Interview mode: it questions, identifies scope, and builds a detailed plan before a single line of code is touched.
Every agent is tuned to its model's specific strengths. No manual model-juggling. [Learn more →](docs/guide/overview.md)
> Anthropic [blocked OpenCode because of us.](https://x.com/thdxr/status/2010149530486911014) That's why Hephaestus is called "The Legitimate Craftsman." The irony is intentional.
>
> We run best on Opus, but Kimi K2.5 + GPT-5.3 Codex already beats vanilla Claude Code. Zero config needed.
### Agent Orchestration
When Sisyphus delegates to a subagent, it doesn't pick a model. It picks a **category**. The category maps automatically to the right model:
| Category | What it's for |
| :------------------- | :--------------------------------- |
| `visual-engineering` | Frontend, UI/UX, design |
| `deep` | Autonomous research + execution |
| `quick` | Single-file changes, typos |
| `ultrabrain` | Hard logic, architecture decisions |
Agent says what kind of work. Harness picks the right model. `ultrabrain` now routes to GPT-5.4 xhigh by default. You touch nothing.
### Claude Code Compatibility
You dialed in your Claude Code setup. Good.
Every hook, command, skill, MCP, plugin works here unchanged. Full compatibility, including plugins.
### World-Class Tools for Your Agents
LSP, AST-Grep, Tmux, MCP actually integrated, not duct-taped together.
- **LSP**: `lsp_rename`, `lsp_goto_definition`, `lsp_find_references`, `lsp_diagnostics`. IDE precision for every agent
- **AST-Grep**: Pattern-aware code search and rewriting across 25 languages
- **Tmux**: Full interactive terminal. REPLs, debuggers, TUI apps. Your agent stays in session
- **MCP**: Web search, official docs, GitHub code search. All baked in
### Skill-Embedded MCPs
MCP servers eat your context budget. We fixed that.
Skills bring their own MCP servers. Spin up on-demand, scoped to task, gone when done. Context window stays clean.
### Codes Better. Hash-Anchored Edits
The harness problem is real. Most agent failures aren't the model. It's the edit tool.
> *"None of these tools give the model a stable, verifiable identifier for the lines it wants to change... They all rely on the model reproducing content it already saw. When it can't - and it often can't - the user blames the model."*
>
> <br/>- [Can Bölük, The Harness Problem](https://blog.can.ac/2026/02/12/the-harness-problem/)
Inspired by [oh-my-pi](https://github.com/can1357/oh-my-pi), we implemented **Hashline**. Every line the agent reads comes back tagged with a content hash:
```
11#VK| function hello() {
22#XJ| return "world";
33#MB| }
```
The agent edits by referencing those tags. If the file changed since the last read, the hash won't match and the edit is rejected before corruption. No whitespace reproduction. No stale-line errors.
Grok Code Fast 1: **6.7% → 68.3%** success rate. Just from changing the edit tool.
### Deep Initialization. `/init-deep`
Run `/init-deep`. It generates hierarchical `AGENTS.md` files:
```
project/
├── AGENTS.md ← project-wide context
├── src/
│ ├── AGENTS.md ← src-specific context
│ └── components/
│ └── AGENTS.md ← component-specific context
```
Agents auto-read relevant context. Zero manual management.
### Planning. Prometheus
Complex task? Don't prompt and pray.
`/start-work` calls Prometheus. **Interviews you like a real engineer**, identifies scope and ambiguities, builds a verified plan before touching code. Agent knows what it's building before it starts.
### Skills
Skills aren't just prompts. Each brings:
- Domain-tuned system instructions
- Embedded MCP servers, on-demand
- Scoped permissions. Agents stay in bounds
Built-ins: `playwright` (browser automation), `git-master` (atomic commits, rebase surgery), `frontend-ui-ux` (design-first UI).
Add your own: `.opencode/skills/*/SKILL.md` or `~/.config/opencode/skills/*/SKILL.md`.
**Want the full feature breakdown?** See the **[Features Documentation](docs/reference/features.md)** for agents, hooks, tools, MCPs, and everything else in detail.
---
> **New to oh-my-opencode?** Read the **[Overview](docs/guide/overview.md)** to understand what you have, or check the **[Orchestration Guide](docs/guide/orchestration.md)** for how agents collaborate.
## Uninstallation
To remove oh-my-opencode:
@@ -274,10 +286,10 @@ To remove oh-my-opencode:
```bash
# Remove user config
rm -f ~/.config/opencode/oh-my-opencode.json
rm -f ~/.config/opencode/oh-my-opencode.json ~/.config/opencode/oh-my-opencode.jsonc
# Remove project config (if exists)
rm -f .opencode/oh-my-opencode.json
rm -f .opencode/oh-my-opencode.json .opencode/oh-my-opencode.jsonc
```
3. **Verify removal**
@@ -289,26 +301,30 @@ To remove oh-my-opencode:
## Features
We have lots of features that you'll think should obviously exist, and once you experience them, you'll never be able to go back to how things were before.
See the full [Features Documentation](docs/features.md) for detailed information.
Features you'll think should've always existed. Once you use them, you can't go back.
See full [Features Documentation](docs/reference/features.md).
**Quick Overview:**
- **Agents**: Sisyphus (the main agent), Prometheus (planner), Oracle (architecture/debugging), Librarian (docs/code search), Explore (fast codebase grep), Multimodal Looker
- **Background Agents**: Run multiple agents in parallel like a real dev team
- **LSP & AST Tools**: Refactoring, rename, diagnostics, AST-aware code search
- **Hash-anchored Edit Tool**: `LINE#ID` references validate content before applying every change. Surgical edits, zero stale-line errors
- **Context Injection**: Auto-inject AGENTS.md, README.md, conditional rules
- **Claude Code Compatibility**: Full hook system, commands, skills, agents, MCPs
- **Built-in MCPs**: websearch (Exa), context7 (docs), grep_app (GitHub search)
- **Session Tools**: List, read, search, and analyze session history
- **Productivity Features**: Ralph Loop, Todo Enforcer, Comment Checker, Think Mode, and more
- **Model Setup**: Agent-model matching is built into the [Installation Guide](docs/guide/installation.md#step-5-understand-your-model-setup)
## Configuration
Highly opinionated, but adjustable to taste.
See the full [Configuration Documentation](docs/configurations.md) for detailed information.
Opinionated defaults, adjustable if you insist.
See [Configuration Documentation](docs/reference/configuration.md).
**Quick Overview:**
- **Config Locations**: `.opencode/oh-my-opencode.json` (project) or `~/.config/opencode/oh-my-opencode.json` (user)
- **Config Locations**: `.opencode/oh-my-opencode.jsonc` or `.opencode/oh-my-opencode.json` (project), `~/.config/opencode/oh-my-opencode.jsonc` or `~/.config/opencode/oh-my-opencode.json` (user)
- **JSONC Support**: Comments and trailing commas supported
- **Agents**: Override models, temperatures, prompts, and permissions for any agent
- **Built-in Skills**: `playwright` (browser automation), `git-master` (atomic commits)
@@ -323,48 +339,39 @@ See the full [Configuration Documentation](docs/configurations.md) for detailed
## Author's Note
**Curious about the philosophy behind this project?** Read the [Ultrawork Manifesto](docs/ultrawork-manifesto.md).
**Want the philosophy?** Read the [Ultrawork Manifesto](docs/manifesto.md).
Install Oh My OpenCode.
---
I've used LLMs worth $24,000 tokens purely for personal development.
Tried every tool out there, configured them to death. OpenCode won.
I burned through $24K in LLM tokens on personal projects. Tried every tool. Configured everything to death. OpenCode won.
The answers to every problem I hit are baked into this plugin. Just install and go.
If OpenCode is Debian/Arch, Oh My OpenCode is Ubuntu/[Omarchy](https://omarchy.org/).
Every problem I hit, the fix is baked into this plugin. Install and go.
If OpenCode is Debian/Arch, OmO is Ubuntu/[Omarchy](https://omarchy.org/).
Heavily influenced by [AmpCode](https://ampcode.com) and [Claude Code](https://code.claude.com/docs/overview)—I've ported their features here, often improved. And I'm still building.
It's **Open**Code, after all.
Heavy influence from [AmpCode](https://ampcode.com) and [Claude Code](https://code.claude.com/docs/overview). Features ported, often improved. Still building. It's **Open**Code.
Enjoy multi-model orchestration, stability, and rich features that other harnesses promise but can't deliver.
I'll keep testing and updating. I'm this project's most obsessive user.
Other harnesses promise multi-model orchestration. We ship it. Stability too. And features that actually work.
I'm this project's most obsessive user:
- Which model has the sharpest logic?
- Who's the debugging god?
- Who writes the best prose?
- Who dominates frontend?
- Who owns backend?
- Which model is fastest for daily driving?
- What new features are other harnesses shipping?
- What's fastest for daily driving?
- What are competitors shipping?
This plugin is the distillation of that experience. Just take the best. Got a better idea? PRs are welcome.
This plugin is the distillation. Take the best. Got improvements? PRs welcome.
**Stop agonizing over agent harness choices.**
**I'll do the research, borrow from the best, and ship updates here.**
**Stop agonizing over harness choices.**
**I'll research, steal the best, and ship it here.**
If this sounds arrogant and you have a better answer, please contribute. You're welcome.
Sounds arrogant? Have a better way? Contribute. You're welcome.
I have no affiliation with any project or model mentioned here. This is purely personal experimentation and preference.
No affiliation with any project/model mentioned. Just personal experimentation.
99% of this project was built using OpenCode. I tested for functionality—I don't really know how to write proper TypeScript. **But I personally reviewed and largely rewrote this doc, so read with confidence.**
## Warnings
- Productivity might spike too hard. Don't let your coworker notice.
- Actually, I'll spread the word. Let's see who wins.
- If you're on [1.0.132](https://github.com/sst/opencode/releases/tag/v1.0.132) or older, an OpenCode bug may break config.
- [The fix](https://github.com/sst/opencode/pull/5040) was merged after 1.0.132—use a newer version.
- Fun fact: That PR was discovered and fixed thanks to OhMyOpenCode's Librarian, Explore, and Oracle setup.
99% of this project was built with OpenCode. I don't really know TypeScript. **But I personally reviewed and largely rewrote this doc.**
## Loved by professionals at
@@ -372,5 +379,7 @@ I have no affiliation with any project or model mentioned here. This is purely p
- Making Spray - influencer marketing solution, vovushop - crossborder commerce platform, vreview - ai commerce review marketing solution
- [Google](https://google.com)
- [Microsoft](https://microsoft.com)
- [ELESTYLE](https://elestyle.jp)
- Making elepay - multi-mobile payment gateway, OneQR - mobile application SaaS for cashless solutions
*Special thanks to [@junhoyeo](https://github.com/junhoyeo) for this amazing hero image.*

374
README.ru.md Normal file
View File

@@ -0,0 +1,374 @@
> [!WARNING]
> **Временное уведомление (на этой неделе): сниженная доступность мейнтейнера**
>
> Ключевой мейнтейнер Q получил травму, поэтому на этой неделе ответы по issue/PR и релизы могут задерживаться.
> Спасибо за терпение и поддержку.
> [!TIP]
> **Building in Public**
>
> Мейнтейнер разрабатывает и поддерживает oh-my-opencode в режиме реального времени с помощью Jobdori — ИИ-ассистента на базе глубоко кастомизированной версии OpenClaw.
> Каждая фича, каждый фикс, каждый триаж issue — в прямом эфире в нашем Discord.
>
> [![Building in Public](./.github/assets/building-in-public.png)](https://discord.gg/PUwSMR9XNk)
>
> [**→ Смотрите в #building-in-public**](https://discord.gg/PUwSMR9XNk)
> [!NOTE]
>
> [![Sisyphus Labs - Sisyphus is the agent that codes like your team.](./.github/assets/sisyphuslabs.png?v=2)](https://sisyphuslabs.ai)
>
> > **Мы создаём полноценную продуктовую версию Sisyphus, чтобы задать стандарты для frontier-агентов. <br />Присоединяйтесь к листу ожидания [здесь](https://sisyphuslabs.ai).**
> [!TIP] Будьте с нами!
>
> | [](https://discord.gg/PUwSMR9XNk) | Вступайте в наш [Discord](https://discord.gg/PUwSMR9XNk), чтобы общаться с контрибьюторами и пользователями `oh-my-opencode`. |
> | ----------------------------------- | ------------------------------------------------------------ |
> | [](https://x.com/justsisyphus) | Новости и обновления `oh-my-opencode` раньше публиковались на моём аккаунте X. <br /> После ошибочной блокировки, [@justsisyphus](https://x.com/justsisyphus) публикует обновления вместо меня. |
> | [](https://github.com/code-yeongyu) | Подпишитесь на [@code-yeongyu](https://github.com/code-yeongyu) на GitHub, чтобы следить за другими проектами. |
<!-- <CENTERED SECTION FOR GITHUB DISPLAY> --> <div align="center">
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
[![Preview](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
</div>
> Anthropic [**заблокировал OpenCode из-за нас.**](https://x.com/thdxr/status/2010149530486911014) **Да, это правда.** Они хотят держать вас в замкнутой системе. Claude Code — красивая тюрьма, но всё равно тюрьма.
>
> Мы не делаем привязки. Мы работаем с любыми моделями. Claude / Kimi / GLM для оркестрации. GPT для рассуждений. Minimax для скорости. Gemini для творческих задач. Будущее — не в выборе одного победителя, а в оркестровке всех. Модели дешевеют каждый месяц. Умнеют каждый месяц. Ни один провайдер не будет доминировать. Мы строим под открытый рынок, а не под чьи-то огороженные сады.
<div align="center">
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-openagent?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/releases) [![npm downloads](https://img.shields.io/npm/dt/oh-my-opencode?color=ff6b35&labelColor=black&style=flat-square)](https://www.npmjs.com/package/oh-my-opencode) [![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-openagent?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/graphs/contributors) [![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-openagent?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/network/members) [![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-openagent?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/stargazers) [![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-openagent?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/issues) [![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/blob/master/LICENSE.md) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-openagent)
English | 한국어 | 日本語 | 简体中文 | Русский
</div> <!-- </CENTERED SECTION FOR GITHUB DISPLAY> -->
## Отзывы
> «Из-за него я отменил подписку на Cursor. В опенсорс-сообществе происходит что-то невероятное.» — [Arthur Guiot](https://x.com/arthur_guiot/status/2008736347092382053?s=20)
> «Если Claude Code делает за 7 дней то, на что у человека уходит 3 месяца, Sisyphus справляется за 1 час. Он просто работает, пока задача не выполнена. Это дисциплинированный агент.» <br/>— B, исследователь в области квантовых финансов
> «За один день устранил 8000 предупреждений eslint с помощью Oh My Opencode.» <br/>— [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> «За ночь конвертировал приложение на tauri в 45k строк в веб-SaaS с помощью Ohmyopencode и ralph loop. Начал с промпта «проинтервьюируй меня», попросил оценки и рекомендации по вопросам. Было удивительно наблюдать за работой и утром проснуться с почти рабочим сайтом!» — [James Hargis](https://x.com/hargabyte/status/2007299688261882202)
> «Используйте oh-my-opencode — вы не захотите возвращаться назад.» <br/>— [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> «Пока не могу точно объяснить, почему это так круто, но опыт разработки вышел на совершенно другой уровень.» — [苔硯:こけすずり](https://x.com/kokesuzuri/status/2008532913961529372?s=20)
> «Экспериментирую с open code, oh my opencode и supermemory этим выходным, чтобы собрать нечто среднее между Minecraft и souls-like.» «Попросил добавить анимации приседания, пока хожу на обеденную прогулку. [Видео]» — [MagiMetal](https://x.com/MagiMetal/status/2005374704178373023)
> «Ребята, вам нужно включить это в ядро и нанять его. Серьёзно. Это очень, очень, очень хорошо.» <br/>— Henning Kilset
> «Наймите @yeon_gyu_kim, если сможете его уговорить, этот парень революционизировал opencode.» <br/>— [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> «Oh My OpenCode — это что-то с чем-то» — [YouTube — Darren Builds AI](https://www.youtube.com/watch?v=G_Snfh2M41M)
------
# Oh My OpenCode
Вы жонглируете Claude Code, Codex, случайными OSS-моделями. Настраиваете рабочие процессы. Дебажите агентов.
Мы уже проделали эту работу. Протестировали всё. Оставили только то, что реально работает.
Установите OmO. Введите `ultrawork`. Готово.
## Установка
### Для людей
Скопируйте и вставьте этот промпт в ваш LLM-агент (Claude Code, AmpCode, Cursor и т.д.):
```
Install and configure oh-my-opencode by following the instructions here:
https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
Или прочитайте руководство по установке, но серьёзно — пусть агент сделает это за вас. Люди ошибаются в конфигах.
### Для LLM-агентов
Загрузите руководство по установке и следуйте ему:
```bash
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
------
## Пропустите этот README
Мы вышли за пределы эпохи чтения документации. Просто вставьте это в своего агента:
```
Read this and tell me why it's not just another boilerplate: https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/README.md
```
## Ключевые возможности
### 🪄 `ultrawork`
Вы правда это читаете? Поразительно.
Установите. Введите `ultrawork` (или `ulw`). Готово.
Всё описанное ниже, каждая функция, каждая оптимизация — вам не нужно это знать. Оно просто работает.
Даже при наличии только следующих подписок ultrawork будет работать отлично (проект не аффилирован с ними, это личная рекомендация):
- [Подписка ChatGPT ($20)](https://chatgpt.com/)
- [Подписка Kimi Code ($0.99) (*только в этом месяце)](https://www.kimi.com/membership/pricing?track_id=5cdeca93-66f0-4d35-aabb-b6df8fcea328)
- [Тариф GLM Coding ($10)](https://z.ai/subscribe)
- При доступе к оплате за токены использование моделей Kimi и Gemini обойдётся недорого.
| | Функция | Что делает |
| --- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🤖 | **Дисциплинированные агенты** | Sisyphus оркестрирует Hephaestus, Oracle, Librarian, Explore. Полноценная AI-команда разработки в параллельном режиме. |
| ⚡ | **`ultrawork` / `ulw`** | Одно слово. Все агенты активируются. Не останавливается, пока задача не выполнена. |
| 🚪 | **[IntentGate](https://factory.ai/news/terminal-bench)** | Анализирует истинное намерение пользователя перед классификацией и действием. Никакого буквального неверного толкования. |
| 🔗 | **Инструмент правок на основе хэш-якорей** | Хэш содержимого `LINE#ID` проверяет каждое изменение. Ноль ошибок с устаревшими строками. Вдохновлено [oh-my-pi](https://github.com/can1357/oh-my-pi). [Проблема обвязки →](https://blog.can.ac/2026/02/12/the-harness-problem/) |
| 🛠️ | **LSP + AST-Grep** | Переименование в рабочем пространстве, диагностика перед сборкой, переписывание с учётом AST. Точность IDE для агентов. |
| 🧠 | **Фоновые агенты** | Запускайте 5+ специалистов параллельно. Контекст остаётся компактным. Результаты — когда готовы. |
| 📚 | **Встроенные MCP** | Exa (веб-поиск), Context7 (официальная документация), Grep.app (поиск по GitHub). Всегда включены. |
| 🔁 | **Ralph Loop / `/ulw-loop`** | Самореферентный цикл. Не останавливается, пока задача не выполнена на 100%. |
| ✅ | **Todo Enforcer** | Агент завис? Система немедленно возвращает его в работу. Ваша задача будет выполнена, точка. |
| 💬 | **Comment Checker** | Никакого AI-мусора в комментариях. Код читается так, словно его писал опытный разработчик. |
| 🖥️ | **Интеграция с Tmux** | Полноценный интерактивный терминал. REPL, дебаггеры, TUI. Всё живое. |
| 🔌 | **Совместимость с Claude Code** | Ваши хуки, команды, навыки, MCP и плагины? Всё работает без изменений. |
| 🎯 | **MCP, встроенные в навыки** | Навыки несут собственные MCP-серверы. Никакого раздувания контекста. |
| 📋 | **Prometheus Planner** | Стратегическое планирование в режиме интервью перед любым выполнением. |
| 🔍 | **`/init-deep`** | Автоматически генерирует иерархические файлы `AGENTS.md` по всему проекту. Отлично работает на эффективность токенов и производительность агента. |
### Дисциплинированные агенты
<table><tr> <td align="center"><img src=".github/assets/sisyphus.png" height="300" /></td> <td align="center"><img src=".github/assets/hephaestus.png" height="300" /></td> </tr></table>
**Sisyphus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`**) — главный оркестратор. Он планирует, делегирует задачи специалистам и доводит их до завершения с агрессивным параллельным выполнением. Он не останавливается на полпути.
**Hephaestus** (`gpt-5.3-codex`) — автономный глубокий исполнитель. Дайте ему цель, а не рецепт. Он исследует кодовую базу, изучает паттерны и выполняет задачи сквозным образом без лишних подсказок. *Законный Мастер.*
**Prometheus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`**) — стратегический планировщик. Режим интервью: задаёт вопросы, определяет объём работ и формирует детальный план до того, как написана хотя бы одна строка кода.
Каждый агент настроен под сильные стороны своей модели. Никакого ручного переключения между моделями. Подробнее →
> Anthropic [заблокировал OpenCode из-за нас.](https://x.com/thdxr/status/2010149530486911014) Именно поэтому Hephaestus зовётся «Законным Мастером». Ирония намеренная.
>
> Мы работаем лучше всего на Opus, но Kimi K2.5 + GPT-5.3 Codex уже превосходят ванильный Claude Code. Никакой настройки не требуется.
### Оркестрация агентов
Когда Sisyphus делегирует задачу субагенту, он выбирает не модель, а **категорию**. Категория автоматически сопоставляется с нужной моделью:
| Категория | Для чего предназначена |
| -------------------- | ------------------------------------- |
| `visual-engineering` | Фронтенд, UI/UX, дизайн |
| `deep` | Автономные исследования + выполнение |
| `quick` | Изменения в одном файле, опечатки |
| `ultrabrain` | Сложная логика, архитектурные решения |
Агент сообщает тип задачи. Обвязка подбирает нужную модель. Вы ни к чему не прикасаетесь.
### Совместимость с Claude Code
Вы тщательно настроили Claude Code. Хорошо.
Каждый хук, команда, навык, MCP и плагин работают здесь без изменений. Полная совместимость, включая плагины.
### Инструменты мирового класса для ваших агентов
LSP, AST-Grep, Tmux, MCP — реально интегрированы, а не склеены скотчем.
- **LSP**: `lsp_rename`, `lsp_goto_definition`, `lsp_find_references`, `lsp_diagnostics`. Точность IDE для каждого агента
- **AST-Grep**: Поиск и переписывание кода с учётом синтаксических паттернов для 25 языков
- **Tmux**: Полноценный интерактивный терминал. REPL, дебаггеры, TUI-приложения. Агент остаётся в сессии
- **MCP**: Веб-поиск, официальная документация, поиск по коду на GitHub. Всё встроено
### MCP, встроенные в навыки
MCP-серверы съедают бюджет контекста. Мы это исправили.
Навыки приносят собственные MCP-серверы. Запускаются по необходимости, ограничены задачей, исчезают по завершении. Контекстное окно остаётся чистым.
### Лучше пишет код. Правки на основе хэш-якорей
Проблема обвязки реальна. Большинство сбоев агентов — не вина модели. Это вина инструмента правок.
> *«Ни один из этих инструментов не даёт модели стабильный, проверяемый идентификатор строк, которые она хочет изменить... Все они полагаются на то, что модель воспроизведёт контент, который уже видела. Когда это не получается — а так бывает нередко — пользователь обвиняет модель.»*
>
> <br/>— [Can Bölük, «Проблема обвязки»](https://blog.can.ac/2026/02/12/the-harness-problem/)
Вдохновлённые [oh-my-pi](https://github.com/can1357/oh-my-pi), мы реализовали **Hashline**. Каждая строка, которую читает агент, возвращается с тегом хэша содержимого:
```
11#VK| function hello() {
22#XJ| return "world";
33#MB| }
```
Агент редактирует, ссылаясь на эти теги. Если файл изменился с момента последнего чтения, хэш не совпадёт, и правка будет отклонена до любого повреждения. Никакого воспроизведения пробелов. Никаких ошибок с устаревшими строками.
Grok Code Fast 1: успешность **6.7% → 68.3%**. Просто за счёт замены инструмента правок.
### Глубокая инициализация. `/init-deep`
Запустите `/init-deep`. Будут сгенерированы иерархические файлы `AGENTS.md`:
```
project/
├── AGENTS.md ← контекст всего проекта
├── src/
│ ├── AGENTS.md ← контекст для src
│ └── components/
│ └── AGENTS.md ← контекст для компонентов
```
Агенты автоматически читают нужный контекст. Никакого ручного управления.
### Планирование. Prometheus
Сложная задача? Не нужно молиться и надеяться на промпт.
`/start-work` вызывает Prometheus. **Интервьюирует вас как настоящий инженер**, определяет объём работ и неоднозначности, формирует проверенный план до прикосновения к коду. Агент знает, что строит, прежде чем начать.
### Навыки
Навыки — это не просто промпты. Каждый привносит:
- Системные инструкции, настроенные под предметную область
- Встроенные MCP-серверы, запускаемые по необходимости
- Ограниченные разрешения. Агенты остаются в рамках
Встроенные: `playwright` (автоматизация браузера), `git-master` (атомарные коммиты, хирургия rebase), `frontend-ui-ux` (UI с упором на дизайн).
Добавьте свои: `.opencode/skills/*/SKILL.md` или `~/.config/opencode/skills/*/SKILL.md`.
**Хотите полное описание возможностей?** Смотрите **документацию по функциям** — агенты, хуки, инструменты, MCP и всё остальное подробно.
------
> **Впервые в oh-my-opencode?** Прочитайте **Обзор**, чтобы понять, что у вас есть, или ознакомьтесь с **руководством по оркестрации**, чтобы узнать, как агенты взаимодействуют.
## Удаление
Чтобы удалить oh-my-opencode:
1. **Удалите плагин из конфига OpenCode**
Отредактируйте `~/.config/opencode/opencode.json` (или `opencode.jsonc`) и уберите `"oh-my-opencode"` из массива `plugin`:
```bash
# С помощью jq
jq '.plugin = [.plugin[] | select(. != "oh-my-opencode")]' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
```
2. **Удалите файлы конфигурации (опционально)**
```bash
# Удалить пользовательский конфиг
rm -f ~/.config/opencode/oh-my-opencode.json ~/.config/opencode/oh-my-opencode.jsonc
# Удалить конфиг проекта (если существует)
rm -f .opencode/oh-my-opencode.json .opencode/oh-my-opencode.jsonc
```
3. **Проверьте удаление**
```bash
opencode --version
# Плагин больше не должен загружаться
```
## Функции
Функции, которые, как вы будете думать, должны были существовать всегда. Попробовав раз, вы не сможете вернуться назад.
Смотрите полную документацию по функциям.
**Краткий обзор:**
- **Агенты**: Sisyphus (главный агент), Prometheus (планировщик), Oracle (архитектура/отладка), Librarian (документация/поиск по коду), Explore (быстрый grep по кодовой базе), Multimodal Looker
- **Фоновые агенты**: Запускайте несколько агентов параллельно, как настоящая команда разработки
- **Инструменты LSP и AST**: Рефакторинг, переименование, диагностика, поиск кода с учётом AST
- **Инструмент правок на основе хэш-якорей**: Ссылки `LINE#ID` проверяют содержимое перед применением каждого изменения. Хирургические правки, ноль ошибок с устаревшими строками
- **Инъекция контекста**: Автоматическое добавление AGENTS.md, README.md, условных правил
- **Совместимость с Claude Code**: Полная система хуков, команды, навыки, агенты, MCP
- **Встроенные MCP**: websearch (Exa), context7 (документация), grep_app (поиск по GitHub)
- **Инструменты сессий**: Список, чтение, поиск и анализ истории сессий
- **Инструменты продуктивности**: Ralph Loop, Todo Enforcer, Comment Checker, Think Mode и другое
- **Настройка моделей**: Сопоставление агент–модель встроено в руководство по установке
## Конфигурация
Продуманные настройки по умолчанию, которые можно изменить при необходимости.
Смотрите документацию по конфигурации.
**Краткий обзор:**
- **Расположение конфигов**: `.opencode/oh-my-opencode.jsonc` или `.opencode/oh-my-opencode.json` (проект), `~/.config/opencode/oh-my-opencode.jsonc` или `~/.config/opencode/oh-my-opencode.json` (пользователь)
- **Поддержка JSONC**: Комментарии и конечные запятые поддерживаются
- **Агенты**: Переопределение моделей, температур, промптов и разрешений для любого агента
- **Встроенные навыки**: `playwright` (автоматизация браузера), `git-master` (атомарные коммиты)
- **Агент Sisyphus**: Главный оркестратор с Prometheus (Планировщик) и Metis (Консультант по плану)
- **Фоновые задачи**: Настройка ограничений параллельности по провайдеру/модели
- **Категории**: Делегирование задач по предметной области (`visual`, `business-logic`, пользовательские)
- **Хуки**: 25+ встроенных хуков, все настраиваются через `disabled_hooks`
- **MCP**: Встроенные websearch (Exa), context7 (документация), grep_app (поиск по GitHub)
- **LSP**: Полная поддержка LSP с инструментами рефакторинга
- **Экспериментальное**: Агрессивное усечение, автовозобновление и другое
## Слово автора
**Хотите узнать философию?** Прочитайте Манифест Ultrawork.
------
Я потратил $24K на токены LLM в личных проектах. Попробовал все инструменты. Настраивал всё до смерти. OpenCode победил.
Каждая проблема, с которой я столкнулся, — её решение уже встроено в этот плагин. Устанавливайте и работайте.
Если OpenCode — это Debian/Arch, то OmO — это Ubuntu/[Omarchy](https://omarchy.org/).
Сильное влияние со стороны [AmpCode](https://ampcode.com) и [Claude Code](https://code.claude.com/docs/overview). Функции портированы, часто улучшены. Продолжаем строить. Это **Open**Code.
Другие обвязки обещают оркестрацию нескольких моделей. Мы её поставляем. Плюс стабильность. Плюс функции, которые реально работают.
Я самый одержимый пользователь этого проекта:
- Какая модель думает острее всего?
- Кто бог отладки?
- Кто пишет лучший код?
- Кто рулит фронтендом?
- Кто владеет бэкендом?
- Что быстрее всего в ежедневной работе?
- Что запускают конкуренты?
Этот плагин — дистилляция. Берём лучшее. Есть улучшения? PR приветствуются.
**Хватит мучиться с выбором обвязки.** **Я буду исследовать, воровать лучшее и поставлять это сюда.**
Звучит высокомерно? Знаете, как сделать лучше? Контрибьютьте. Добро пожаловать.
Никакой аффилиации с упомянутыми проектами/моделями. Только личные эксперименты.
99% этого проекта было создано с помощью OpenCode. Я почти не знаю TypeScript. **Но эту документацию я лично просматривал и во многом переписывал.**
## Любимый профессионалами из
- Indent
- Spray — решение для influencer-маркетинга, vovushop — платформа кросс-граничной торговли, vreview — AI-решение для маркетинга отзывов в commerce
- [Google](https://google.com)
- [Microsoft](https://microsoft.com)
- ELESTYLE
- elepay — мультимобильный платёжный шлюз, OneQR — мобильное SaaS-приложение для безналичных расчётов
*Особая благодарность [@junhoyeo](https://github.com/junhoyeo) за это потрясающее hero-изображение.*

View File

@@ -1,382 +1,352 @@
> [!WARNING]
> **安全警告:冒充网站**
> **临时通知(本周):维护者响应延迟说明**
>
> **ohmyopencode.com 与本项目无关。** 我们不运营或认可该网站
> 核心维护者 Q 因受伤,本周 issue/PR 回复和发布可能会延迟
> 感谢你的耐心与支持。
> [!TIP]
> **Building in Public**
>
> OhMyOpenCode 是**免费且开源的**。请**勿**在声称"官方"的第三方网站下载安装程序或输入付款信息
> 维护者正在使用 Jobdori 实时开发和维护 oh-my-opencode。Jobdori 是基于 OpenClaw 深度定制的 AI 助手
> 每个功能开发、每次修复、每次 Issue 分类,都在 Discord 上实时进行。
>
> 由于该冒充网站设有付费墙,我们**无法验证其分发的内容**。请将来自该网站的任何下载视为**潜在不安全**。
> [![Building in Public](./.github/assets/building-in-public.png)](https://discord.gg/PUwSMR9XNk)
>
> ✅ 官方下载地址https://github.com/code-yeongyu/oh-my-opencode/releases
> [**→ 在 #building-in-public 频道中查看**](https://discord.gg/PUwSMR9XNk)
> [!NOTE]
>
> [![Sisyphus Labs Sisyphus 是像你的团队一样编码的智能体。](./.github/assets/sisyphuslabs.png?v=2)](https://sisyphuslabs.ai)
> > **我们正在构建 Sisyphus 的完产品化版本,以定义前沿智能体的未来。<br />点击[此处](https://sisyphuslabs.ai)加入候名单。**
> [![Sisyphus Labs - Sisyphus is the agent that codes like your team.](./.github/assets/sisyphuslabs.png?v=2)](https://sisyphuslabs.ai)
> > **我们正在构建 Sisyphus 的完产品化版本,以定义前沿智能体 (Frontier Agents) 的未来。<br />[此处](https://sisyphuslabs.ai)加入候名单。**
> [!TIP]
>
> [![Oh My OpenCode 3.0 正式发布!](./.github/assets/orchestrator-atlas.png?v=3)](https://github.com/code-yeongyu/oh-my-opencode/releases/tag/v3.0.0)
> > **Oh My OpenCode 3.0 正式发布!使用 `oh-my-opencode@latest` 安装。**
>
> 加入我们!
>
> | [<img alt="Discord 链接" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PUwSMR9XNk) | 加入我们的 [Discord 社区](https://discord.gg/PUwSMR9XNk),与贡献者 `oh-my-opencode` 用户交流。 |
> | [<img alt="Discord link" src="https://img.shields.io/discord/1452487457085063218?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square" width="156px" />](https://discord.gg/PUwSMR9XNk) | 加入我们的 [Discord 社区](https://discord.gg/PUwSMR9XNk),与贡献者及其他 `oh-my-opencode` 用户交流。 |
> | :-----| :----- |
> | [<img alt="X 链接" src="https://img.shields.io/badge/Follow-%40justsisyphus-00CED1?style=flat-square&logo=x&labelColor=black" width="156px" />](https://x.com/justsisyphus) | `oh-my-opencode` 的新闻和更新在我的 X 账号上发布。<br /> 由于账号被错误封禁,[@justsisyphus](https://x.com/justsisyphus) 现在代为发布更新。 |
> | [<img alt="GitHub 关注" src="https://img.shields.io/github/followers/code-yeongyu?style=flat-square&logo=github&labelColor=black&color=24292f" width="156px" />](https://github.com/code-yeongyu) | 在 GitHub 上关注 [@code-yeongyu](https://github.com/code-yeongyu) 获取更多项目。 |
> | [<img alt="X link" src="https://img.shields.io/badge/Follow-%40justsisyphus-00CED1?style=flat-square&logo=x&labelColor=black" width="156px" />](https://x.com/justsisyphus) | 关于 `oh-my-opencode` 的新闻和更新过去发布在我的 X 账号上。<br /> 因为账号被意外停用,现在由 [@justsisyphus](https://x.com/justsisyphus) 代为发布更新。 |
> | [<img alt="GitHub Follow" src="https://img.shields.io/github/followers/code-yeongyu?style=flat-square&logo=github&labelColor=black&color=24292f" width="156px" />](https://github.com/code-yeongyu) | 在 GitHub 上关注 [@code-yeongyu](https://github.com/code-yeongyu) 获取更多项目信息。 |
<!-- <居中展示区域> -->
<!-- <CENTERED SECTION FOR GITHUB DISPLAY> -->
<div align="center">
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-opencode#oh-my-opencode)
[![预览](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-opencode#oh-my-opencode)
[![Oh My OpenCode](./.github/assets/hero.jpg)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
[![Preview](./.github/assets/omo.png)](https://github.com/code-yeongyu/oh-my-openagent#oh-my-opencode)
</div>
> 这是开挂级别的编程——`oh-my-opencode` 实战效果。运行后台智能体,调用专业智能体如 oracle、librarian 和前端工程师。使用精心设计的 LSP/AST 工具、精选的 MCP以及完整的 Claude Code 兼容层
# Claude OAuth 访问通知
## TL;DR
> Q. 我可以使用 oh-my-opencode 吗?
可以。
> Q. 我可以用 Claude Code 订阅来使用它吗?
是的,技术上可以。但我不建议使用。
## 详细说明
> 自2026年1月起Anthropic 以违反服务条款为由限制了第三方 OAuth 访问。
> 这是类固醇式编程。不是一个模型的类固醇——而是整个药库
>
> [**Anthropic 将本项目 oh-my-opencode 作为封锁 opencode 的理由。**](https://x.com/thdxr/status/2010149530486911014)
>
> 事实上,社区中确实存在一些伪造 Claude Code OAuth 请求签名的插件。
>
> 无论技术上是否可检测,这些工具可能都能正常工作,但用户应注意服务条款的相关影响,我个人不建议使用这些工具。
>
> 本项目对使用非官方工具产生的任何问题概不负责,**我们没有任何这些 OAuth 系统的自定义实现。**
> 用 Claude 做编排,用 GPT 做推理,用 Kimi 提速度,用 Gemini 处理视觉。模型正在变得越来越便宜越来越聪明。没有一个提供商能够垄断。我们正在为那个开放的市场而构建。Anthropic 的牢笼很漂亮。但我们不住那。
<div align="center">
[![GitHub 发布](https://img.shields.io/github/v/release/code-yeongyu/oh-my-opencode?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/releases)
[![npm 下载量](https://img.shields.io/npm/dt/oh-my-opencode?color=ff6b35&labelColor=black&style=flat-square)](https://www.npmjs.com/package/oh-my-opencode)
[![GitHub 贡献者](https://img.shields.io/github/contributors/code-yeongyu/oh-my-opencode?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-opencode?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-opencode?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/stargazers)
[![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-opencode?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/issues)
[![许可证](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-opencode/blob/master/LICENSE.md)
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-openagent?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/releases)
[![npm downloads](https://img.shields.io/npm/dt/oh-my-opencode?color=ff6b35&labelColor=black&style=flat-square)](https://www.npmjs.com/package/oh-my-opencode)
[![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-openagent?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-openagent?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-openagent?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/stargazers)
[![GitHub Issues](https://img.shields.io/github/issues/code-yeongyu/oh-my-openagent?color=ff80eb&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/issues)
[![License](https://img.shields.io/badge/license-SUL--1.0-white?labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/blob/dev/LICENSE.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-openagent)
[English](README.md) | [한국어](README.ko.md) | [日本語](README.ja.md) | [简体中文](README.zh-cn.md)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/code-yeongyu/oh-my-opencode)
</div>
<!-- </居中展示区域> -->
<!-- </CENTERED SECTION FOR GITHUB DISPLAY> -->
## 用户评价
## 评价
> "它让我取消了 Cursor 订阅。开源社区正在发生令人难以置信的事情。" - [Arthur Guiot](https://x.com/arthur_guiot/status/2008736347092382053?s=20)
> “因为它,我取消了 Cursor 订阅。开源社区正在发生令人难以置信的事情。 - [Arthur Guiot](https://x.com/arthur_guiot/status/2008736347092382053?s=20)
> "如果 Claude Code 能在 7 天内完成人类 3 个月的工作,那么 Sisyphus 只需 1 小时。它会持续工作直到任务完成。它是一个非常自律的智能体。" — B, 量化研究员
> 如果人类需要 3 个月完成的事情 Claude Code 需要 7 天,那么 Sisyphus 只需 1 小时。它会一直工作直到任务完成。它是一个极度自律的智能体。” <br/>- B, 量化研究员
> "用 Oh My Opencode 仅用一天就清理了 8000 个 eslint 警告" — [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> 用 Oh My Opencode 一天之内解决了 8000 个 eslint 警告。” <br/>- [Jacob Ferrari](https://x.com/jacobferrari_/status/2003258761952289061)
> "我使用 Ohmyopencode 和 ralph loop 在一夜之间将一个 45k 行的 tauri 应用转换成了 SaaS Web 应用。从访谈提示开始,要求它对问题进行评分和建议。看着它工作非常精彩,今早醒来发现网站基本已经可以运行了!" - [James Hargis](https://x.com/hargabyte/status/2007299688261882202)
> “我用 Ohmyopencode 和 ralph loop 花了一晚上的时间,把一个 45k 行代码的 tauri 应用转换成了 SaaS Web 应用。从面试模式开始,让它对我提供的提示词进行提问和提出建议。看着它工作很有趣,今早醒来看到网站基本已经跑起来了,太震撼了! - [James Hargis](https://x.com/hargabyte/status/2007299688261882202)
> "用了 oh-my-opencode,你再也不会回头了" — [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> “用 oh-my-opencode 吧,你绝对回不去了。” <br/>- [d0t3ch](https://x.com/d0t3ch/status/2001685618200580503)
> "我还没能准确表达出它为什么如此出色,但开发体验已经达到了一个完全不同的维度。" - [苔硯:こけすずり](https://x.com/kokesuzuri/status/2008532913961529372?s=20)
> “我很难准确描述它到底哪里牛逼,但开发体验已经达到完全不同的维度了。” - [苔硯:こけすずり](https://x.com/kokesuzuri/status/2008532913961529372?s=20)
> "这个周末用 open code、oh my opencode 和 supermemory 来构建某种 minecraft/souls-like 怪物游戏。"
> "让它添加蹲伏动画,我去散个午后的步。[视频]" - [MagiMetal](https://x.com/MagiMetal/status/2005374704178373023)
> “这周末用 open code、oh my opencode 和 supermemory 瞎折腾一个像我的世界/魂系一样的怪物游戏。吃完午饭去散步前,我让它把下蹲动画加进去。[视频]” - [MagiMetal](https://x.com/MagiMetal/status/2005374704178373023)
> "你们该把这个合并到核心代码并招募他。认真的。这真的非常非常非常好。" — Henning Kilset
> 你们该把这个合并到核心代码里,然后把他招安了。说真的,这东西实在太牛了。” <br/>- Henning Kilset
> "如果你能说服他的话就雇用 @yeon_gyu_kim这个人彻底革新了 opencode。" — [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> 如果你能说服 @yeon_gyu_kim赶紧招募他。这个人彻底改变了 opencode。” <br/>- [mysticaltech](https://x.com/mysticaltech/status/2001858758608376079)
> "Oh My OpenCode 真的太疯狂了" - [YouTube - Darren Builds AI](https://www.youtube.com/watch?v=G_Snfh2M41M)
> Oh My OpenCode 简直疯了。” - [YouTube - Darren Builds AI](https://www.youtube.com/watch?v=G_Snfh2M41M)
---
## 目录
- [Oh My OpenCode](#oh-my-opencode)
- [直接跳过阅读本文档](#直接跳过阅读本文档)
- [这是智能体时代](#这是智能体时代)
- [🪄 魔法词:`ultrawork`](#-魔法词ultrawork)
- [给想阅读的人:认识 Sisyphus](#给想阅读的人认识-sisyphus)
- [直接安装就行。](#直接安装就行)
- [安装](#安装)
- [面向人类用户](#面向人类用户)
- [面向 LLM 智能体](#面向-llm-智能体)
- [卸载](#卸载)
- [功能特性](#功能特性)
- [配置](#配置)
- [JSONC 支持](#jsonc-支持)
- [Google 认证](#google-认证)
- [智能体](#智能体)
- [权限选项](#权限选项)
- [内置技能](#内置技能)
- [Git Master](#git-master)
- [Sisyphus 智能体](#sisyphus-智能体)
- [后台任务](#后台任务)
- [类别](#类别)
- [钩子](#钩子)
- [MCP](#mcp)
- [LSP](#lsp)
- [实验性功能](#实验性功能)
- [环境变量](#环境变量)
- [作者札记](#作者札记)
- [警告](#警告)
- [受到以下专业人士的喜爱](#受到以下专业人士的喜爱)
- [赞助商](#赞助商)
# Oh My OpenCode
认识 Sisyphus开箱即用的智能体像你一样编码
我们最初把这叫做“给 Claude Code 打类固醇”。那是低估了它
[Claude Code](https://www.claude.com/product/claude-code) 很棒
但如果你是一个极客,你会对 [OpenCode](https://github.com/sst/opencode) 一见钟情。
**从你的 ChatGPT、Claude、Gemini 订阅开始。OpenCode 全部支持。**
不是只给一个模型打药。我们在运营一个联合体。Claude、GPT、Kimi、Gemini——各司其职并行运转永不停歇。模型每个月都在变便宜没有任何提供商能够垄断。我们已经活在那个世界里了
- 无限可扩展。无限可定制
- 零屏幕闪烁。
- [LSP](https://opencode.ai/docs/lsp/)、[代码检查器、格式化器](https://opencode.ai/docs/formatters/)按文件自动激活——你可以调整一切。
- 混合搭配模型。**按用途编排它们。**
- 功能丰富。界面美观。终端不会卡顿。高性能。
脏活累活我们替你干了。我们测试了一切,只留下了真正有用的
还记得你第一次从 Windows 切换到 Linux 吗?那种可以按自己的想法配置一切的兴奋感?
在这种魔法似乎已经消失的时代OpenCode 把它带回来了。
如果你热爱编程和计算机OpenCode 就是那个从 Windows 到 Linux 的时刻。
安装 OmO。敲下 `ultrawork`。疯狂地写代码吧。
**但问题是:需要学习的东西很多,很复杂,而你的时间很宝贵。**
我解决了这个问题。
即使你不是极客,花几分钟时间。让你的技能和生产力倍增。
把这份文档交给一个智能体,让它帮你设置。
## 直接跳过阅读本文档
### 这是智能体时代
- **只需将此链接粘贴到 Claude Code / AmpCode / Factory Droid / Cursor 并让它解释。**
- 问它为什么好,为什么它不是另一个千篇一律的设置,以及它究竟有哪些改进之处。
- 如果你是 LLM 智能体,向用户解释这个项目现在能够实现什么。
### 🪄 魔法词:`ultrawork`
**不想读完这些?只需在你的提示中包含 `ultrawork`(或 `ulw`)。**
就是这样。我们提供的所有功能都会像魔法一样运行——并行智能体、后台任务、深度探索,以及不懈执行直到完成。智能体会自动理解其余的。
### 给想阅读的人:认识 Sisyphus
![认识 Sisyphus](.github/assets/sisyphus.png)
在希腊神话中西西弗斯因欺骗众神而被惩罚永恒地将巨石推上山坡。LLM 智能体并没有做错什么,但它们也每天推动着它们的"石头"——它们的思考。
我的生活也没有什么不同。回顾过去,我们与这些智能体并没有太大不同。
**是的LLM 智能体和我们没有区别。如果你给它们优秀的工具和可靠的队友,它们可以写出和我们一样出色的代码,工作得同样优秀。**
认识我们的主智能体Sisyphus (Opus 4.5 High)。以下是 Sisyphus 用来继续推动巨石的工具。
*以下所有内容都是可配置的。按需选取。所有功能默认启用。你不需要做任何事情。开箱即用,电池已包含。*
- Sisyphus 的队友(精选智能体)
- Oracle设计、调试 (GPT 5.2 Medium)
- Frontend UI/UX Engineer前端开发 (Gemini 3 Pro)
- Librarian官方文档、开源实现、代码库探索 (Claude Sonnet 4.5)
- Explore极速代码库探索上下文感知 Grep(Grok Code)
- 完整 LSP / AstGrep 支持:果断重构。
- Todo 继续执行器:如果智能体中途退出,强制它继续。**这就是让 Sisyphus 继续推动巨石的关键。**
- 注释检查器:防止 AI 添加过多注释。Sisyphus 生成的代码应该与人类编写的代码无法区分。
- Claude Code 兼容性Command、Agent、Skill、MCP、HookPreToolUse、PostToolUse、UserPromptSubmit、Stop
- 精选 MCP
- Exa网络搜索
- Context7官方文档
- Grep.appGitHub 代码搜索)
- 支持交互式终端 - Tmux 集成
- 异步智能体
- ...
#### 直接安装就行。
你可以从 [overview page](docs/guide/overview.md) 学到很多,但以下是示例工作流程。
只需安装这个,你的智能体就会这样工作:
1. Sisyphus 不会浪费时间自己寻找文件;他保持主智能体的上下文精简。相反,他向更快、更便宜的模型并行发起后台任务,让它们为他绘制地图。
2. Sisyphus 利用 LSP 进行重构;这更确定性、更安全、更精准。
3. 当繁重的工作需要 UI 时Sisyphus 直接将前端任务委派给 Gemini 3 Pro。
4. 如果 Sisyphus 陷入循环或碰壁,他不会继续撞墙——他会召唤 GPT 5.2 进行高智商战略支援。
5. 在处理复杂的开源框架时Sisyphus 生成子智能体实时消化原始源代码和文档。他拥有完整的上下文感知。
6. 当 Sisyphus 处理注释时,他要么证明它们存在的必要性,要么删除它们。他保持你的代码库整洁。
7. Sisyphus 受他的 TODO 列表约束。如果他没有完成开始的工作,系统会强制他回到"推石头"模式。你的任务会被完成,句号。
8. 老实说,甚至不用费心读文档。只需写你的提示。包含 'ultrawork' 关键词。Sisyphus 会分析结构,收集上下文,挖掘外部源代码,然后持续推进直到工作 100% 完成。
9. 其实,打 'ultrawork' 太费劲了。只需打 'ulw'。就 ulw。喝杯咖啡。你的工作完成了。
需要查找什么?它会搜索官方文档、你的整个代码库历史和公共 GitHub 实现——不仅使用 grep还使用内置的 LSP 工具和 AST-Grep。
3. 在委派给 LLM 时不用担心上下文管理。我已经处理好了。
- OhMyOpenCode 积极利用多个智能体来减轻上下文负担。
- **你的智能体现在是开发团队负责人。你是 AI 经理。**
4. 它不会停止,直到工作完成。
5. 不想深入研究这个项目?没问题。只需输入 'ultrathink'。
如果你不想要这些全部功能,如前所述,你可以只选择特定功能。
## 安装
### 面向人类用户
### 给人类看的
复制以下提示并粘贴到你的 LLM 智能体(Claude CodeAmpCodeCursor 等
复制并粘贴以下提示到你的 LLM Agent (Claude Code, AmpCode, Cursor 等):
```
按照以下说明安装和配置 oh-my-opencode
https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
Install and configure oh-my-opencode by following the instructions here:
https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
或者直接读 [安装指南](docs/guide/installation.md)——但我们强烈建议让智能体来处理。人会犯错,智能体不会
或者你可以直接读 [安装指南](docs/guide/installation.md),但说真的,让 Agent 去干吧。人类配环境总是容易敲错字母
### 面向 LLM 智能体
### LLM Agent 看的
获取安装指南并按照说明操作
获取安装指南并照做
```bash
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
curl -s https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md
```
## 卸载
---
要移除 oh-my-opencode
## 跳过这个 README 吧
1. **从你的 OpenCode 配置中移除插件**
读文档的时代已经过去了。直接把下面这行发给你的 Agent
编辑 `~/.config/opencode/opencode.json`(或 `opencode.jsonc`)并从 `plugin` 数组中移除 `"oh-my-opencode"`
```
Read this and tell me why it's not just another boilerplate: https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/README.md
```
## 核心亮点
### 🪄 `ultrawork`
你竟然还在往下读?真有耐心。
安装。输入 `ultrawork` (或者 `ulw`)。搞定。
下面的内容,包括所有特性、所有优化,你全都不需要知道,它自己就能完美运行。
只需以下订阅之一ultrawork 就能顺畅工作(本项目与它们没有任何关联,纯属个人推荐):
- [ChatGPT 订阅 ($20)](https://chatgpt.com/)
- [Kimi Code 订阅 ($0.99) (*仅限本月*)](https://www.kimi.com/membership/pricing?track_id=5cdeca93-66f0-4d35-aabb-b6df8fcea328)
- [GLM Coding 套餐 ($10)](https://z.ai/subscribe)
- 如果你能使用按 token 计费的方式,用 kimi 和 gemini 模型花不了多少钱。
| | 特性 | 功能说明 |
| :---: | :-------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 🤖 | **自律军团 (Discipline Agents)** | Sisyphus 负责调度 Hephaestus、Oracle、Librarian 和 Explore。一支完整的 AI 开发团队并行工作。 |
| ⚡ | **`ultrawork` / `ulw`** | 一键触发,所有智能体出动。任务完成前绝不罢休。 |
| 🚪 | **[IntentGate 意图门](https://factory.ai/news/terminal-bench)** | 真正行动前,先分析用户的真实意图。彻底告别被字面意思误导的 AI 废话。 |
| 🔗 | **基于哈希的编辑工具** | 每次修改都通过 `LINE#ID` 内容哈希验证、0% 错误修改。灵感来自 [oh-my-pi](https://github.com/can1357/oh-my-pi)。[马具问题 →](https://blog.can.ac/2026/02/12/the-harness-problem/) |
| 🛠️ | **LSP + AST-Grep** | 工作区级别的重命名、构建前诊断、基于 AST 的重写。为 Agent 提供 IDE 级别的精度。 |
| 🧠 | **后台智能体** | 同时发射 5+ 个专家并行工作。保持上下文干净,随时获取成果。 |
| 📚 | **内置 MCP** | Exa (网络搜索)、Context7 (官方文档)、Grep.app (GitHub 源码搜索)。默认开启。 |
| 🔁 | **Ralph Loop / `/ulw-loop`** | 自我引用闭环。达不到 100% 完成度绝不停止。 |
| ✅ | **Todo 强制执行** | Agent 想要摸鱼?系统直接揪着领子拽回来。你的任务,必须完成。 |
| 💬 | **注释审查员** | 剔除带有浓烈 AI 味的冗余注释。写出的代码就像老练的高级工程师写的。 |
| 🖥️ | **Tmux 集成** | 完整的交互式终端支持。跑 REPL、用调试器、用 TUI 工具,全都在实时会话中完成。 |
| 🔌 | **Claude Code 兼容** | 你现有的 Hooks、命令、技能、MCP 和插件?全都能无缝迁移过来。 |
| 🎯 | **技能内嵌 MCP** | 技能自带其所需的 MCP 服务器。按需开启,不会撑爆你的上下文窗口。 |
| 📋 | **Prometheus 规划师** | 动手写代码前,先通过访谈模式做好战略规划。 |
| 🔍 | **`/init-deep`** | 在整个项目目录层级中自动生成 `AGENTS.md`。不仅省 Token还能大幅提升 Agent 理解力。 |
### 自律军团 (Discipline Agents)
<table><tr>
<td align="center"><img src=".github/assets/sisyphus.png" height="300" /></td>
<td align="center"><img src=".github/assets/hephaestus.png" height="300" /></td>
</tr></table>
**Sisyphus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`**) 是你的主指挥官。他负责制定计划、分配任务给专家团队,并以极其激进的并行策略推动任务直至完成。他从不半途而废。
**Hephaestus** (`gpt-5.3-codex`) 是你的自主深度工作者。你只需要给他目标,不要给他具体做法。他会自动探索代码库模式,从头到尾独立执行任务,绝不会中途要你当保姆。*名副其实的正牌工匠。*
**Prometheus** (`claude-opus-4-6` / **`kimi-k2.5`** / **`glm-5`**) 是你的战略规划师。他通过访谈模式,在动一行代码之前,先通过提问确定范围并构建详尽的执行计划。
每一个 Agent 都针对其底层模型的特点进行了专门调优。你无需手动来回切换模型。[阅读背景设定了解更多 →](docs/guide/overview.md)
> Anthropic [因为我们屏蔽了 OpenCode](https://x.com/thdxr/status/2010149530486911014)。这就是为什么我们将 Hephaestus 命名为“正牌工匠 (The Legitimate Craftsman)”。这是一个故意的讽刺。
>
> 我们在 Opus 上运行得最好,但仅仅使用 Kimi K2.5 + GPT-5.3 Codex 就足以碾压原版的 Claude Code。完全不需要配置。
### 智能体调度机制
当 Sisyphus 把任务分配给子智能体时,他选择的不是具体的模型,而是 **类别 (Category)**。系统会自动将类别映射到最合适的模型:
| 类别 | 作用领域 |
| :------------------- | :--------------------- |
| `visual-engineering` | 前端、UI/UX、设计 |
| `deep` | 深度自主调研与执行 |
| `quick` | 单文件修改、修错字 |
| `ultrabrain` | 复杂硬核逻辑、架构决策 |
智能体只需要说明要做什么类型的工作,框架就会挑选出最合适的模型去干。你完全不需要操心。
### 完全兼容 Claude Code
你已经花了大力气调教好了 Claude Code 的配置?太好了。
这里完美兼容所有的 Hook、命令、技能、MCP 以及插件。所有配置直接生效,包括插件系统。
### 赋予 Agent 世界级的开发工具
LSP、AST-Grep、Tmux、MCP 并不是用胶水勉强糊在一起的,而是真正深度的集成。
- **LSP**: 支持 `lsp_rename``lsp_goto_definition``lsp_find_references``lsp_diagnostics`。给 Agent 提供 IDE 般的精准操作。
- **AST-Grep**: 支持 25 种编程语言,能够理解语法树的模式匹配和代码重写。
- **Tmux**: 真实的交互式终端环境,支持 REPL、调试器以及 TUI 工具。Agent 的进程持久运行。
- **MCP**: 内置 Web 搜索、官方文档直连以及 GitHub 级代码搜索。
### 技能专属的按需 MCP 服务器
一堆全局 MCP 服务器极其消耗 Context 额度,我们修好了这个问题。
现在每个技能 (Skill) 都带着自己的专属 MCP。只在执行该任务时启动任务完成即刻销毁。Context 窗口始终清爽。
### 拒绝瞎改:基于内容哈希的编辑工具 (Hash-Anchored Edits)
Harness 问题是真的。绝大多数所谓的 Agent 故障,其实并不是大模型变笨了,而是他们用的文件编辑工具太烂了。
> *“目前所有工具都无法为模型提供一种稳定、可验证的行定位标识……它们全都依赖于模型去强行复写一遍自己刚才看到的原文。当模型一旦写错——而且这很常见——用户就会怪罪于大模型太蠢了。”*
>
> <br/>- [Can Bölük, The Harness Problem](https://blog.can.ac/2026/02/12/the-harness-problem/)
受 [oh-my-pi](https://github.com/can1357/oh-my-pi) 的启发,我们实现了 **Hashline** 技术。Agent 读到的每一行代码,末尾都会打上一个强绑定的内容哈希值:
```
11#VK| function hello() {
22#XJ| return "world";
33#MB| }
```
Agent 发起修改时,必须通过这些标签引用目标行。如果在此期间文件发生过变化,哈希验证就会失败,从而在代码被污染前直接驳回。不再有缩进空格错乱,彻底告别改错行的惨剧。
在 Grok Code Fast 1 上,仅仅因为更换了这套编辑工具,修改成功率直接从 **6.7% 飙升至 68.3%**
### 深度上下文初始化:`/init-deep`
执行一次 `/init-deep`。它会为你生成一个树状的 `AGENTS.md` 文件系统:
```
project/
├── AGENTS.md ← 全局级架构与约定
├── src/
│ ├── AGENTS.md ← src 级规范
│ └── components/
│ └── AGENTS.md ← 组件级详细说明
```
Agent 会自动顺藤摸瓜加载对应的 Context免去了你所有的手动喂喂喂的麻烦。
### 让 Agent 动手前先过脑子Prometheus
碰到了硬骨头?千万不要扔个 Prompt 就双手合十祈祷。
输入 `/start-work`,召唤 Prometheus 出场。**他会像一个真实的主管那样去采访你**,主动深挖需求、指出模糊地带,并在改动哪怕一行代码之前产出经过严密论证的计划。你的 Agent 终于知道了自己在干嘛。
### 技能系统 (Skills)
这里的 Skills 绝不只是一段无脑的 Prompt 模板。它们包含了:
- 面向特定领域的极度调优系统指令
- 按需加载的独立 MCP 服务器
- 对 Agent 能力边界的强制约束
默认内置:`playwright`(极其稳健的浏览器自动化)、`git-master`(全自动的原子级提交及 rebase 手术)、`frontend-ui-ux`(设计感拉满的 UI 实现)。
想加你自己的?放进 `.opencode/skills/*/SKILL.md` 或者 `~/.config/opencode/skills/*/SKILL.md` 就行。
**想看所有的硬核功能说明吗?** 点击查看 **[详细特性文档 (Features)](docs/reference/features.md)** ,深入了解 Agent 架构、Hook 流水线、核心工具链和所有的内置 MCP 等等。
---
> **第一次用 oh-my-opencode** 阅读 **[概述](docs/guide/overview.md)** 了解你拥有哪些功能,或查看 **[编排指南](docs/guide/orchestration.md)** 了解 Agent 如何协作。
## 如何卸载 (Uninstallation)
要移除 oh-my-opencode:
1. **从你的 OpenCode 配置文件中去掉插件**
编辑 `~/.config/opencode/opencode.json` (或 `opencode.jsonc`) ,并把 `"oh-my-opencode"``plugin` 数组中删掉:
```bash
# 使用 jq
# 如果你有 jq 的话
jq '.plugin = [.plugin[] | select(. != "oh-my-opencode")]' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
```
2. **除配置文件可选**
2. **除配置文件 (可选)**
```bash
# 移除用户配置
rm -f ~/.config/opencode/oh-my-opencode.json
# 移除全局用户配置
rm -f ~/.config/opencode/oh-my-opencode.json ~/.config/opencode/oh-my-opencode.jsonc
# 移除项目配置(如果存在)
rm -f .opencode/oh-my-opencode.json
# 移除当前项目配置
rm -f .opencode/oh-my-opencode.json .opencode/oh-my-opencode.jsonc
```
3. **验证移除**
3. **确认卸载成功**
```bash
opencode --version
# 插件应该不再被加载
# 这个时候就应该没有任何关于插件的输出信息了
```
## 闲聊环节 (Author's Note)
## 功能特性
**想知道做这个插件的哲学理念吗?** 阅读 [Ultrawork 宣言](docs/manifesto.md)。
我们拥有众多功能,你会觉得这些功能理所当然应该存在,一旦体验过,就再也回不去了。
详细信息请参阅 [Features Documentation](docs/features.md)。
---
**概览:**
- **智能体**Sisyphus主智能体、Prometheus规划器、Oracle架构/调试、Librarian文档/代码搜索、Explore快速代码库 grep、Multimodal Looker
- **后台智能体**:像真正的开发团队一样并行运行多个智能体
- **LSP & AST 工具**重构、重命名、诊断、AST 感知代码搜索
- **上下文注入**:自动注入 AGENTS.md、README.md、条件规则
- **Claude Code 兼容性**完整的钩子系统、命令、技能、智能体、MCP
- **内置 MCP**websearch (Exa)、context7 (文档)、grep_app (GitHub 搜索)
- **会话工具**:列出、读取、搜索和分析会话历史
- **生产力功能**Ralph Loop、Todo Enforcer、Comment Checker、Think Mode 等
我为了做个人项目,烧掉了整整 $24,000 的 LLM API Token 费用。我把市面上每个宣称好用的代码 Agent 全试了一遍配置选项被我翻得底朝天。最后我得出了结论OpenCode 赢了。
## 配置
我踩过的坑、撞过的南墙,它们的终极解法现在全都被硬编码到了这个插件里。你只需要安装,然后直接用。
个性鲜明,但可以根据个人喜好调整
详细信息请参阅 [Configuration Documentation](docs/configurations.md)。
如果把 OpenCode 喻为底层的 Debian/Arch那么 OmO 毫无疑问就是开箱即用的 Ubuntu/[Omarchy](https://omarchy.org/)
**概览:**
- **配置文件位置**: `.opencode/oh-my-opencode.json` (项目级) 或 `~/.config/opencode/oh-my-opencode.json` (用户级)
- **JSONC 支持**: 支持注释和尾随逗号
- **智能体**: 覆盖任何智能体的模型、温度、提示和权限
- **内置技能**: `playwright` (浏览器自动化), `git-master` (原子提交)
- **Sisyphus 智能体**: 带有 Prometheus (Planner) 和 Metis (Plan Consultant) 的主编排器
- **后台任务**: 按提供商/模型配置并发限制
- **类别**: 领域特定的任务委派 (`visual`, `business-logic`, 自定义)
- **钩子**: 25+ 内置钩子,均可通过 `disabled_hooks` 配置
- **MCP**: 内置 websearch (Exa), context7 (文档), grep_app (GitHub 搜索)
- **LSP**: 带重构工具的完整 LSP 支持
- **实验性功能**: 积极截断、自动恢复等
本项目受到 [AmpCode](https://ampcode.com) 和 [Claude Code](https://code.claude.com/docs/overview) 的深刻启发。我把他们好用的特性全都搬了过来,且在很多地方做了底层强化。它仍在活跃开发中,因为毕竟,这是 **Open**Code。
其他调度框架只会给你画饼画一张很酷的 Multi-Agent 大饼。我们把饼烙出来了。不仅能用,而且极其稳定。所有的功能都不是为了炫技,而是真的能把任务干完。
## 作者札记
因为我自己就是这个项目最偏执、最神经质的极端用户:
- 哪个模型在处理变态业务逻辑时最不容易晕?
- 谁是修 Bug 的神?
- 谁文笔最好、最不 AI 味?
- 谁能在前端交互上碾压一切?
- 后端性能谁来抗?
- 谁又快又便宜适合打杂?
- 竞争对手们今天又发了啥牛逼的功能,能抄吗?
**想了解更多关于这个项目背后的理念吗?** 请阅读 [Ultrawork Manifesto](docs/ultrawork-manifesto.md)
这个插件是以上一切的结晶 (Distillation)。直接拿走去用。如果有更好的点子PR 大门永远敞开
安装 Oh My OpenCode。
**别再浪费时间去到处对比选哪个框架好了。**
**我会去市面上调研,把最强的特性全偷过来,然后在这更新。**
我纯粹为个人开发使用了价值 24,000 美元 token 的 LLM
尝试了每一个工具,把它们配置到极致。但始终是 OpenCode 胜出。
听起来很自大吗?如果你有更牛逼的实现思路,那就交 PR热烈欢迎
我遇到的每个问题的答案都融入了这个插件。直接安装使用
如果 OpenCode 是 Debian/ArchOh My OpenCode 就是 Ubuntu/[Omarchy](https://omarchy.org/)。
郑重声明:本项目与文档中提及的任何框架/大模型供应商**均无利益相关**,这完完全全就是一次走火入魔的个人硬核实验成果
本项目 99% 的代码都是直接由 OpenCode 生成的。我本人其实并不懂 TypeScript。**但我以人格担保,这个 README 是我亲自审核并且大幅度重写过的。**
深受 [AmpCode](https://ampcode.com) 和 [Claude Code](https://code.claude.com/docs/overview) 的影响——我已经将它们的功能移植到这里,通常还有改进。我仍在构建。
毕竟这是 **Open**Code。
享受多模型编排、稳定性和其他工具承诺但无法交付的丰富功能。
我会持续测试和更新。因为我是这个项目最执着的用户。
- 哪个模型逻辑最锐利?
- 谁是调试之神?
- 谁写出最好的文字?
- 谁主宰前端?
- 谁拥有后端?
- 哪个模型日常使用最快?
- 其他工具在推出什么新功能?
这个插件是只取其精华。有更好的想法?欢迎 PR。
**不要再为智能体工具的选择而烦恼了。**
**我会进行研究,借鉴最好的,然后发布更新。**
如果这听起来很傲慢,但如果你有更好的答案,请贡献。欢迎你。
我与这里提到的任何项目或模型没有任何关联。这纯粹是个人实验和偏好。
这个项目 99% 是使用 OpenCode 构建的。我测试了功能——我实际上不太会写正确的 TypeScript。**但我个人审查并大量重写了这份文档,所以放心阅读。**
## 警告
- 生产力可能飙升太快。别让你的同事发现。
- 其实,我会传播这个消息。让我们看看谁会赢。
- 如果你使用 [1.0.132](https://github.com/sst/opencode/releases/tag/v1.0.132) 或更早版本,一个 OpenCode bug 可能会破坏配置。
- [修复](https://github.com/sst/opencode/pull/5040)在 1.0.132 之后合并——使用更新的版本。
- 有趣的事实:那个 PR 是借助 OhMyOpenCode 的 Librarian、Explore 和 Oracle 设置发现并修复的。
## 受到以下专业人士的喜爱
## 以下公司的专业开发人员都在用
- [Indent](https://indentcorp.com)
- 制作 Spray - 网红营销解决方案、vovushop - 跨境电商平台、vreview - AI 电商评论营销解决方案
- 开发了 Spray - 意见领袖营销系统, vovushop - 跨境电商独立站, vreview - AI 赋能的电商买家秀营销解决方案
- [Google](https://google.com)
- [Microsoft](https://microsoft.com)
- [ELESTYLE](https://elestyle.jp)
- 开发了 elepay - 全渠道移动支付网关, OneQR - 专为无现金社会打造的移动 SaaS 生态系统
## 赞助商
- **Numman Ali** [GitHub](https://github.com/numman-ali) [X](https://x.com/nummanali)
- 第一位赞助商
- **Aaron Iker** [GitHub](https://github.com/aaroniker) [X](https://x.com/aaroniker)
- **Suyeol Jeon (devxoul)** [GitHub](https://github.com/devxoul)
- 开启我职业生涯的人,在如何构建出色的智能体工作流方面给了我很深的启发。我学到了很多关于设计伟大系统来构建伟大团队的知识,这些经验对创建这个工具至关重要。
- **Hyerin Won (devwon)** [GitHub](https://github.com/devwon)
*特别感谢 [@junhoyeo](https://github.com/junhoyeo) 制作这张精彩的主图。*
*特别感谢 [@junhoyeo](https://github.com/junhoyeo) 为我们设计的令人惊艳的首图Hero Image*

File diff suppressed because it is too large Load Diff

130
bin/oh-my-opencode.js Normal file → Executable file
View File

@@ -3,8 +3,9 @@
// Wrapper script that detects platform and spawns the correct binary
import { spawnSync } from "node:child_process";
import { readFileSync } from "node:fs";
import { createRequire } from "node:module";
import { getPlatformPackage, getBinaryPath } from "./platform.js";
import { getPlatformPackageCandidates, getBinaryPath } from "./platform.js";
const require = createRequire(import.meta.url);
@@ -26,55 +27,116 @@ function getLibcFamily() {
}
}
function supportsAvx2() {
if (process.arch !== "x64") {
return null;
}
if (process.env.OH_MY_OPENCODE_FORCE_BASELINE === "1") {
return false;
}
if (process.platform === "linux") {
try {
const cpuInfo = readFileSync("/proc/cpuinfo", "utf8").toLowerCase();
return cpuInfo.includes("avx2");
} catch {
return null;
}
}
if (process.platform === "darwin") {
const probe = spawnSync("sysctl", ["-n", "machdep.cpu.leaf7_features"], {
encoding: "utf8",
});
if (probe.error || probe.status !== 0) {
return null;
}
return probe.stdout.toUpperCase().includes("AVX2");
}
return null;
}
function getSignalExitCode(signal) {
const signalCodeByName = {
SIGINT: 2,
SIGILL: 4,
SIGKILL: 9,
SIGTERM: 15,
};
return 128 + (signalCodeByName[signal] ?? 1);
}
function main() {
const { platform, arch } = process;
const libcFamily = getLibcFamily();
const avx2Supported = supportsAvx2();
// Get platform package name
let pkg;
let packageCandidates;
try {
pkg = getPlatformPackage({ platform, arch, libcFamily });
packageCandidates = getPlatformPackageCandidates({
platform,
arch,
libcFamily,
preferBaseline: avx2Supported === false,
});
} catch (error) {
console.error(`\noh-my-opencode: ${error.message}\n`);
process.exit(1);
}
// Resolve binary path
const binRelPath = getBinaryPath(pkg, platform);
let binPath;
try {
binPath = require.resolve(binRelPath);
} catch {
const resolvedBinaries = packageCandidates
.map((pkg) => {
try {
return { pkg, binPath: require.resolve(getBinaryPath(pkg, platform)) };
} catch {
return null;
}
})
.filter((entry) => entry !== null);
if (resolvedBinaries.length === 0) {
console.error(`\noh-my-opencode: Platform binary not installed.`);
console.error(`\nYour platform: ${platform}-${arch}${libcFamily === "musl" ? "-musl" : ""}`);
console.error(`Expected package: ${pkg}`);
console.error(`Expected packages (in order): ${packageCandidates.join(", ")}`);
console.error(`\nTo fix, run:`);
console.error(` npm install ${pkg}\n`);
console.error(` npm install ${packageCandidates[0]}\n`);
process.exit(1);
}
// Spawn the binary
const result = spawnSync(binPath, process.argv.slice(2), {
stdio: "inherit",
});
// Handle spawn errors
if (result.error) {
console.error(`\noh-my-opencode: Failed to execute binary.`);
console.error(`Error: ${result.error.message}\n`);
process.exit(2);
}
// Handle signals
if (result.signal) {
const signalNum = result.signal === "SIGTERM" ? 15 :
result.signal === "SIGKILL" ? 9 :
result.signal === "SIGINT" ? 2 : 1;
process.exit(128 + signalNum);
for (let index = 0; index < resolvedBinaries.length; index += 1) {
const currentBinary = resolvedBinaries[index];
const hasFallback = index < resolvedBinaries.length - 1;
const result = spawnSync(currentBinary.binPath, process.argv.slice(2), {
stdio: "inherit",
});
if (result.error) {
if (hasFallback) {
continue;
}
console.error(`\noh-my-opencode: Failed to execute binary.`);
console.error(`Error: ${result.error.message}\n`);
process.exit(2);
}
if (result.signal === "SIGILL" && hasFallback) {
continue;
}
if (result.signal) {
process.exit(getSignalExitCode(result.signal));
}
process.exit(result.status ?? 1);
}
process.exit(result.status ?? 1);
process.exit(1);
}
main();

14
bin/platform.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
export declare function getPlatformPackage(options: {
platform: string;
arch: string;
libcFamily?: string | null;
}): string;
export declare function getPlatformPackageCandidates(options: {
platform: string;
arch: string;
libcFamily?: string | null;
preferBaseline?: boolean;
}): string[];
export declare function getBinaryPath(pkg: string, platform: string): string;

Some files were not shown because too many files have changed in this diff Show More