Commit Graph

5042 Commits

Author SHA1 Message Date
YeonGyu-Kim 2c8e2dac41 refactor(mode-prompts): migrate hyperplan prompt
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-24 18:32:45 +09:00
YeonGyu-Kim e79baf5910 refactor(mode-prompts): migrate team prompt
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-24 18:32:35 +09:00
YeonGyu-Kim 3b7f51d568 refactor(mode-prompts): migrate analyze prompt
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-24 18:32:19 +09:00
YeonGyu-Kim 5cefbdbb6d refactor(mode-prompts): migrate search prompt
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-24 18:31:17 +09:00
YeonGyu-Kim c187dba56b test(keyword-detector): capture mode prompt baselines
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-24 18:30:53 +09:00
YeonGyu-Kim 87de056308 refactor(model-core): move model family detectors
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-24 17:16:40 +09:00
YeonGyu-Kim e1e9f348f0 Merge pull request #4382 from code-yeongyu/feat/ultrawork-prompt-tdd-evidence-tightening
feat(ultrawork): enforce TDD, scenario contract, durable notepad, reviewer gate
2026-05-24 15:55:43 +09:00
YeonGyu-Kim d073bf1bdf feat(ultrawork): enforce TDD, scenario contract, durable notepad, reviewer gate
Closes five gaps in the ultrawork prompt versus codex-plugins' parallel
directive, applied to all three model variants (default/Claude, GPT, Gemini)
with prompt-engineering entropy gate (each addition encodes a distinct
binding boolean, not narrative reinforcement):

1. TDD-MANDATORY (was conditional "when test infrastructure exists"):
   every production change follows RED -> GREEN -> SURFACE. Failing test
   first, capture assertion msg, smallest change to flip green, exercise
   real surface, capture artifact. Exemption whitelist: formatting /
   comment-only / version bump / rename-only, each must be justified
   in writing; unjustified exemption = rejection.

2. Scenario contract (was free-form Test Plan Template): require 3+
   scenarios upfront covering happy path, edge (boundary / empty /
   malformed / concurrent), adjacent-surface regression. Each scenario
   binds a binary pass condition, a real-surface artifact source, and
   a test file + test id written test-first.

3. RED->GREEN evidence capture (was "all tests pass"): every scenario
   requires TWO captured artifacts -- RED assertion msg before the
   change AND GREEN assertion msg after -- alongside the real-surface
   artifact (tmux / curl / browser / Playwright / computer-use /
   CLI stdout / parsed config / DB diff). Tests are the floor (always
   required); surface artifact is the ceiling (also required).

4. Durable notepad: mktemp -t ulw-*.md with append-only sections
   (Plan, Scenarios, Now, Todo, Findings, Learnings). Survives context
   loss; resume by re-reading.

5. Reviewer gate: trigger when user said strictly / rigorously /
   "deeply", or task touches 3+ files / 20+ turns / 30+ min, or it is
   refactor / migration / perf / security work. Reviewer verdict is
   binding ("looks good but..." = rejection). Loop until unconditional
   approval.

Plus: TODO format upgraded from vague "track every step" to atomic
`path: <action> for <scenario-id> -- verify by <check>` with a GOOD
test-first / impl pair example and a BAD list including
"production code before its failing test".

Per-variant adaptation:
- default.ts (Claude): full structured sections.
- gpt.ts (GPT-5.x): outcome-first prose, shorter prose per gpt-5.5 guide.
- gemini.ts: explicit enforcement framing + anti-optimism checkpoint
  upgraded with a TDD-violation question (#7).

Verified by:
- bun test src/hooks/keyword-detector/ (119 pass / 0 fail).
- lsp_diagnostics clean on all three files.
- Module-load smoke test confirms each exported message string parses
  and contains the new section anchors (TDD MANDATORY, SCENARIO
  CONTRACT, DURABLE NOTEPAD, REVIEWER GATE).

Char deltas (directive body only):
- default 13646 -> 17144 (+26%)
- gpt     6740  -> 9215  (+37%, was the leanest start)
- gemini  14196 -> 16136 (+14%)

Existing tests only assert presence of "ULTRAWORK MODE ENABLED!" which
is preserved verbatim in every variant.
2026-05-24 15:48:59 +09:00
YeonGyu-Kim 39a549a3df Merge pull request #4381 from code-yeongyu/fix/team-mode-closure-prompts
fix(team-mode): make lead close teams on its own initiative
2026-05-24 15:37:28 +09:00
YeonGyu-Kim 5f1fb0c52a fix(team-mode): make lead close teams on its own initiative
The lead currently leaves teams alive after the task list drains because
none of the prompt surfaces tell it WHEN to close or HOW. omx-style
'self-closing' behavior was missing for four reasons (diagnosed via
prompt-engineering A/B/C: wrong / misframed / missing):

1. builtin team-mode skill 'Lifecycle' (B+C): 'phase ends / shape
   outgrown' is qualitative, so the model maps it to 'wait for user'.
   Step 6 jumped to team_delete without the request/approve pair the
   tool contract requires. Replaced with a 'Closure Contract' (a
   computable predicate over team_task_list + team_status) and an
   explicit 'Closure Sequence' (request -> approve -> delete, with
   force=true reserved for unrecoverable paths only).

2. TEAM_MESSAGE keyword injection (C): spent 100%% of its one-shot
   budget on routing ('do not substitute delegate_task'), 0%% on
   closure. Added the same closure rule in compressed form. Kept the
   'NEVER substitute with delegate_task' literal that
   keyword-detector/index.test.ts depends on.

3. team-mode-status-injector body (C): the only per-session injection
   for team mode had no closure obligation. Replaced the optional
   'load the team-mode skill ... otherwise use the team_* tools'
   sentence with a 'Closure invariant' clause that ties the check to
   every team_task_update.

4. member-guidance Wrap-up (A+B): step 3 said 'so the lead can decide
   whether to request shutdown', but team_shutdown_request is
   lead-only - members cannot initiate it. Step ordering also placed
   the completion message before team_task_update, so the lead's
   closable check would see stale data. Reordered to
   task_update -> check task_list for new work -> if nothing left,
   send a single 'closure-ready' message and idle. Test assertion
   updated to match the new accurate contract.

Also: stripped Korean alternation from TEAM_PATTERN per directive
('절대로 코드 내에 한국어 적지 마라'). Pattern is now
/\\bteam[\\s_-]?mode\\b/i. Removed 4 Korean test cases
(2 positive triggers + 2 false-positive guards) that the pattern no
longer needs to defend, and updated the keyword-detector AGENTS.md
row.

Net: -71 lines across prompt surfaces. The Closure Contract is the
only addition; everything else tightened.

Tests: 428/428 pass across src/features/team-mode/,
src/features/builtin-skills/, src/hooks/keyword-detector/,
src/hooks/team-mode-status-injector/, src/hooks/team-mailbox-injector/,
src/hooks/team-tool-gating/, src/hooks/team-session-events/.
LSP: no errors introduced (one pre-existing error in
keyword-detector/index.test.ts confirmed pre-existing on dev).
2026-05-24 15:21:24 +09:00
YeonGyu-Kim 9a1dd75608 fix(ralph-loop): skip handleFailedVerification when oracle dispatch is in flight (#4256)
When verification_pending is true and the agent has dispatched an Oracle
verification (verification_attempt_id is set), session.idle events that
arrive before tool-execute-after stores the Oracle session ID
(verification_session_id still undefined) caused handlePendingVerification
to fall through to handleFailedVerification. This injected a duplicate
'verification failed' continuation prompt, spawning a second Oracle.

The fix adds a guard in handlePendingVerification: when
verification_attempt_id is set but verification_session_id is not, Oracle
dispatch is in flight and the handler returns early instead of declaring
failure. The pending wake will retry on the next session.idle.

Regression test added in given/when/then style proving the race sequence:
  1. ULW loop detects DONE, enters verification_pending
  2. Oracle dispatch stamps verification_attempt_id (tool-execute-before)
  3. Second session.idle fires before tool-execute-after stores session ID
  4. Handler must NOT call handleFailedVerification

RED (before fix): 2 prompt injections (duplicate Oracle)
GREEN (after fix): 1 prompt injection (correct)

Fixes #4256
Fixes #4019
2026-05-24 15:00:26 +09:00
YeonGyu-Kim 5e2f12fd3e Merge pull request #4348 from Yeachan-Heo/omc-team/you-are-one-of-5-parallel-work/worker-4
fix: trust user-configured multimodal-looker model for vision (#4209)
2026-05-24 02:11:31 +09:00
YeonGyu-Kim 0c14c4738b Merge pull request #4350 from Yeachan-Heo/omc-team/you-are-one-of-5-parallel-work/worker-3
fix: TUI subagent session entry stuck spinning + unclickable (#4252)
2026-05-24 02:11:06 +09:00
YeonGyu-Kim f390d365c3 Merge pull request #4352 from Yeachan-Heo/fix/atlas-config-model-override-4255
fix: Atlas agent honors config.agents.atlas.model override (#4255)
2026-05-24 02:10:55 +09:00
bellman bfc507895b fix: trust user-configured multimodal-looker model for vision (#4209)
When a user explicitly configures a model for the multimodal-looker
agent (e.g. zhipuai-coding-plan/glm-5.1), treat that model as
vision-capable even when its provider config does not declare
modalities.input or capabilities.input.image. This unblocks
vision-capable models that the provider config does not advertise.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 02:04:48 +09:00
bellman 779e2d2f10 fix(task): capture late-arriving sessionId so TUI subagent entry is clickable (#4252)
The OpenCode TUI renders background subagent session entries using
`props.metadata.sessionId` as the navigation target. When the wait-loop
in delegate-task and background-task tools exits before the session is
assigned, but the session is created moments later (before metadata
publish), the published metadata had `sessionId: undefined`, leaving
the TUI entry stuck spinning with no clickable target.

Add a single late-fallback `manager.getTask(task.id)?.sessionId` check
between the wait-loop exit and metadata publish in both paths. This
closes the narrow race window that produced the symptom in #4252.

Regression test: `late-session-id-capture.test.ts` mocks the exact race
(launch returns no sessionId; getTask returns it after the wait loop).

Verified:
- npm run build: PASS
- npm test: exit code 0 (one unrelated pre-existing failure in
  sisyphus-task > browserProvider propagation re: agent-browser skill)
2026-05-24 02:04:38 +09:00
bellman 7d444eed5e fix(agents): honor user atlas model when resolution returns undefined (#4255)
Atlas was the only agent that bailed early (returning undefined) when
applyModelResolution returned undefined, even if the user had explicitly
configured agents.atlas.model. The general-agents.ts path already handled
this case by falling back to the user's override; sisyphus has its own
explicit-config check. Atlas had neither, so under edge cases (cold
provider cache, no system default, empty availableModels) Atlas was
silently dropped and OpenCode used its built-in default — surfaced as
the hardcoded claude-sonnet-4-6 in the reported bug.

This aligns atlas-agent.ts with the same defensive pattern used in
general-agents.ts: when resolution fails but the user has an explicit
model override, honor it directly instead of dropping the agent.

Adds a regression test covering the scenario where availableModels is
empty AND systemDefaultModel is undefined AND no provider cache exists.
2026-05-24 02:04:20 +09:00
Yeachan-Heo 6c691a1afa fix(grep): probe OpenCode cache-backed bin for auto-downloaded rg (#3805)
Upstream OpenCode's Global.Path.bin resolves to ~/.cache/opencode/bin
(XDG cache), where its ripgrep auto-installer and many LSP servers land.
OMO's getOpenCodeBundledRg only checked the data-dir variant
(~/.local/share/opencode/bin), so when OpenCode had already downloaded
rg into its cache directory OMO would skip it and either redownload via
its own fallback installer or fall back to system grep.

Probe the cache-backed bin path first so OMO reuses tools OpenCode has
already installed.
2026-05-24 02:02:31 +09:00
YeonGyu-Kim b3097e5693 fix(background-agent): suppress redundant parent wakes 2026-05-24 01:07:38 +09:00
YeonGyu-Kim 01d2196220 Merge pull request #4238 from islee23520/fix/look-at-status-map-hang
Avoid look_at status map wait hang
2026-05-23 01:55:07 +09:00
YeonGyu-Kim f511b4bc15 Merge pull request #4263 from YOMXXX/fix/gpt-5-3-codex-migration
fix(migration): stop rewriting explicit gpt-5.3-codex to gpt-5.4 (#3777)
2026-05-23 01:54:10 +09:00
YeonGyu-Kim d06a5d7ad1 Merge pull request #4272 from YOMXXX/fix/ast-grep-windows-cli-suffix-test
test(ast-grep): lock Windows path matching against #4220 regression
2026-05-23 01:53:49 +09:00
YeonGyu-Kim 9da3009574 Merge pull request #4279 from MoerAI/fix/migrate-orphan-lsp-config-key
fix(migration): drop orphan 'lsp' config key so users see LSP moved to .opencode/lsp.json (fixes #4225)
2026-05-23 01:53:24 +09:00
YeonGyu-Kim 74db81dfeb Merge pull request #4285 from SpencerJung/fix/issue-4123-tool-pair-retrigger
fix(tool-pair-validator): continue after synthetic repairs
2026-05-23 01:51:37 +09:00
YeonGyu-Kim 6cac80fe87 Merge pull request #4290 from SpencerJung/fix/issue-4170-cjk-agent-header
fix(cli): preserve CJK agent header text
2026-05-23 01:51:18 +09:00
YeonGyu-Kim 12d7d1045b Merge pull request #4282 from SpencerJung/fix/issue-4149-terminal-continuation-guard
fix(atlas): honor stopped continuation after boulder completion
2026-05-23 01:51:01 +09:00
YeonGyu-Kim e7120f6ad4 Merge pull request #4295 from vanhci/fix/issue-4292-comment-checker-deadloop
fix(comment-checker): skip modified-existing comments and dedupe per-session (issue #4292)
2026-05-22 22:04:58 +09:00
YeonGyu-Kim 9e5c431817 Merge pull request #4297 from SpencerJung/fix/issue-4128-desktop-sidecar-crash
fix(background-agent): keep cleanup error listener active
2026-05-22 22:04:54 +09:00
YeonGyu-Kim 7409f2ea3b Merge pull request #4300 from code-yeongyu/fix/issue-3919-desktop-native-search
fix(tools/grep, tools/glob): Node-safe subprocess streaming for Desktop utility-process compatibility (#3919)
2026-05-22 20:58:08 +09:00
YeonGyu-Kim e6d8b3e7d3 Merge pull request #4299 from code-yeongyu/fix/issue-4128-ctx-dollar-guard
fix(session-notification-sender): guard ctx.$ availability with execFile fallback (#4128, #4061)
2026-05-22 20:49:16 +09:00
YeonGyu-Kim 560569e369 fix(parent-wake-notifier): drop duplicate wakes during promptAsync gate hold (#4256, #4019)
In v4.1.0+, users observed duplicate assistant streams rendering the same
content in two languages simultaneously (e.g. Chinese + English), most often
at the end of a turn.

Root cause: ParentWakeNotifier.requeueWake() unconditionally requeued ANY
wake that arrived during the background-agent-parent-wake post-dispatch
hold window. When a duplicate completion edge fired during that hold, the
same wake was replayed after the hold expired, triggering a second prompt
dispatch and a parallel assistant stream.

The fix compares the new wake against dispatchedParentWakes.get(sessionID)
and drops identical wakes during the gate hold, while preserving the existing
requeue behavior for genuinely-new wakes and failed-dispatch retries.

Regression test added in given/when/then style covering the duplicate-during-
hold scenario (TDD red-then-green).

Fixes #4256
Fixes #4019
2026-05-22 20:40:37 +09:00
YeonGyu-Kim aded57ff1f fix(shared): harden ripgrep-cli, zip-extractor, binary-downloader subprocess paths
Same Web-Response-on-Node hazard existed in ripgrep auto-download flow,
zip extraction helpers, and binary downloader streams. Switch to the new
Node-safe reader and ensure no spawn path escapes as unhandledRejection.

Related to #3919.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-22 20:40:24 +09:00
YeonGyu-Kim d17b2127f2 fix(tools/grep, tools/glob): use Node-safe subprocess streaming (#3919)
OpenCode Desktop v1.14.41+ runs OMO inside a Node.js utility process.
The previous `new Response(proc.stdout).text()` call is Bun-/Web-API-specific
and crashed the Desktop sidecar on Windows when grep/glob were invoked.

Switch glob/grep cli to the new process-stream-reader + search-process-output
helpers. Behavior on Bun and CLI/Linux/macOS is unchanged. ripgrep auto-download,
PowerShell fallback, and rgSemaphore are preserved.

Fixes #3919

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-22 20:40:06 +09:00
YeonGyu-Kim 4ea7562f50 feat(shared): add Node-safe process stream reader and search output collector
Introduces:
- src/shared/process-stream-reader.ts: Buffer-concat stream reader compatible with both Bun and Node ChildProcess stdout (replaces Web Response API usage)
- src/tools/shared/search-process-output.ts: structured subprocess output collector with timeout, kill, and rejection cleanup
- bun-spawn-shim hardened: Node path forces windowsHide: true; spawn errors no longer escape as unhandledRejection

Foundation for #3919 fix.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-22 20:39:52 +09:00
YeonGyu-Kim bc8c462d28 fix(session-notification-sender): guard ctx.$ with execFile fallback for Desktop sidecar (#4128, #4061)
OpenCode Desktop's Electron sidecar runtime can omit Bun's ctx.$ helper.
The sender previously called ctx.$ unconditionally, throwing
TypeError: ctx.$ is not a function as unhandledRejection and crashing
the sidecar with exit code 1.

Add a runtime guard at every call site, falling back to Node.js
child_process.execFile (with windowsHide: true) when ctx.$ is missing.
The Bun ctx.$ path remains preferred when available. Every notification
path is wrapped in try/catch so no failure escapes as unhandledRejection.

Fixes #4128
Fixes #4061
2026-05-22 20:39:33 +09:00
MoerAI 6062df8262 fix(migration): make 'lsp' migration guidance self-contained and update stale docs (addresses codex P2 on #4279)
The migration log message previously pointed users to docs/reference/configuration.md for the new LSP config location, but that doc section still showed the obsolete plugin-level 'lsp' block. A user following the guidance would re-add the same 'lsp' key, see it stripped again on next startup, and never reach a usable config.\n\nFix both sides: rewrite the log message so it is self-contained (states the new path .opencode/lsp.json and the consumer directly) and rewrite the LSP section in docs/reference/configuration.md to describe the actual current architecture (LSP served by the 'lsp' MCP server, reading server map from .opencode/lsp.json via LSP_TOOLS_MCP_PROJECT_CONFIG, schema lives in packages/lsp-tools-mcp).\n\nVerification: bun test src/shared/migration/ -> 26/26 pass. bun run typecheck -> exit 0. Manual probe -> migration still strips lsp from both in-memory and persisted file.
2026-05-22 18:10:12 +09:00
SpencerJung ec9997b7a6 fix(background-agent): keep cleanup error listener active
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-22 17:12:14 +09:00
Vanhci 4cf391b7ff fix(comment-checker): skip modified-existing comments and dedupe per-session (issue #4292)
Issue 1: hasNewCommentsOnly() now returns false when oldString and newString
both contain comment syntax and the new lines are a subset of old lines —
preventing the hook from firing on comment-only modifications.

Issue 2: Per-session deduplication via sessionLastWarning Map with a 30s
window (DEDUP_WINDOW_MS). At most one warning fires per session per
response turn, breaking the deadloop on consecutive edits.
2026-05-22 16:06:09 +08:00
SpencerJung ed4c04e575 fix(cli): preserve CJK agent header text
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-22 16:40:24 +09:00
SpencerJung 28569307eb fix(tool-pair-validator): continue after synthetic repairs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-22 16:36:12 +09:00
SpencerJung 7dae2711fc fix(atlas): honor stopped continuation after boulder completion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-22 16:20:39 +09:00
MoerAI a7429cc223 fix(migration): drop orphan 'lsp' config key so users see LSP moved to .opencode/lsp.json (fixes #4225)
The lsp config block was removed from OhMyOpenCodeConfigSchema when LSP tools were migrated from native plugin tools to the lsp tier-1 MCP server (packages/lsp-tools-mcp). Zod v4 strips unknown keys silently on safeParse, so a v3-era oh-my-opencode.jsonc with 'lsp': { typescript: { command: ... } } continues to live in the file unchanged while doing absolutely nothing. The user reporting #4225 saw their custom LSP servers stop working with zero indication that the configuration site moved.\n\nAdd a migrator that removes the orphan lsp key during migrateConfigFile, mirroring the existing omo_agent -> sisyphus_agent migration immediately above and the 'Removed obsolete hooks from disabled_hooks' precedent below. A single log line records the configPath and the list of dropped server keys so the user has a paper trail in oh-my-opencode.log, and needsWrite is flipped so the cleanup persists to disk (with a timestamped backup) the next time the plugin loads.\n\nReproduction (clean upstream/dev, BEFORE fix):\n  needsWrite=false\n  inMemory.lsp=<original block, kept>\n  persisted.lsp=<original block, kept>\n\nVerification (AFTER fix):\n  needsWrite=true\n  inMemory.lsp=undefined\n  persisted.lsp=undefined\n\nbun test src/shared/migration/ -> 26/26 pass (24/24 pre-existing + 2 new regression tests). bun run typecheck -> exit 0.
2026-05-22 16:06:19 +09:00
李冠辰 ccaf61e09b test(ast-grep): lock Windows backslash matching for ast_grep dist cli suffix (#4220)
The dist-side bug reported in #4220 (`path.endsWith(\"dist/cli.js\")` failing on
Windows backslash paths) has already been fixed in source by routing through
`hasCliSuffix` in `src/mcp/ast-grep.ts` and `src/mcp/lsp.ts`. The `cli-suffix.test.ts`
covered the lsp-tools-mcp shape but not the ast_grep shape.

Adds a regression case that asserts a Windows-style absolute path containing
`...\\packages\\ast-grep-mcp\\dist\\cli.js` matches both `\"dist/cli.js\"` and the
fully-qualified `\"packages/ast-grep-mcp/dist/cli.js\"` suffix — closing the
exact symptom from the bug report against future regressions.
2026-05-22 14:19:57 +08:00
李冠辰 d788c3d1a9 fix(migration): stop rewriting explicit gpt-5.3-codex to gpt-5.4 (#3777)
`openai/gpt-5.3-codex` is the codex-series powerhouse still recommended
in docs/guide/agent-model-matching.md and listed in the default
fallback chain in docs/reference/configuration.md, not a deprecated
alias for `gpt-5.4`. The migration entry silently rewrote any user
config that picked `gpt-5.3-codex` for its token efficiency, sending
agents to a non-codex model on every startup.

Drop the bogus mapping from MODEL_VERSION_MAP and add a regression
test that explicit `gpt-5.3-codex` selections (including in nested
fallback_models) survive `migrateModelVersions`. Users already
auto-migrated previously can revert to `gpt-5.3-codex` by hand and it
will now stick on subsequent loads regardless of the sidecar history.
2026-05-22 11:36:22 +08:00
YeonGyu-Kim 11c3da752c fix(default-mode,multimodal-looker,delegate-task): preserve user-expected behavior
default-mode (system-transform):
- e5463e2db introduced auto-activation of ultrawork+ralph-loop, and
  dc2e082ac then skipped the ultrawork system prompt whenever ralph_loop
  was also enabled. Net effect: the keyword-detector still showed
  'Default ultrawork mode enabled' to the user, but the first turn had
  none of the ultrawork behavior. Loop continuation kept the ultrawork
  prefix, so the contract was honored only on later iterations.
- Drop the skip so the initial turn matches what the toast advertises.
  New matrix test pins all four (ultrawork, ralph_loop) combinations.

multimodal-looker:
- Prompt claimed 'read' and 'call_omo_agent' were available, but the
  look_at invocation runtime explicitly disables both via READ_ENABLED
  and createAgentToolAllowlist([]). Small VL models trusted the prompt
  and looped on rejected tool calls (#4116).
- Rewrite the agent prompt to describe direct-attachment analysis and
  forbid tool/agent calls. Add a consistency test that extracts the
  prompt's 'available tools' claim and compares it against the
  configured allowlist.

delegate-task (skill-resolver):
- 088693697 filtered per-agent restricted skills at the skill tool and
  builtin agent prompt layers, but delegate-task itself happily injected
  whatever skill name a caller passed. A target agent could be force-fed
  a skill marked agent: oracle just by listing it in load_skills.
- Thread the target agent through resolveSkills and silently filter
  skills whose definition.agent does not include it. Public skills with
  no restriction are unaffected. Regression test pins the bypass.
2026-05-22 00:07:46 +09:00
YeonGyu-Kim 7cce0ad230 fix(notepad-guard,start-work): wire dispatch and match .omo paths
notepad-write-guard:
- The hook was created by create-tool-guard-hooks but tool-execute-before
  never invoked it, so the guard was inert.
- It also only matched .sisyphus/notepads, missing the current
  .omo/notepads layout introduced by the workspace migration.
- Add the dispatch call alongside writeExistingFileGuard, and extend
  NOTEPAD_ROOTS to cover both paths via normalize() + sep. New
  integration test pins the wire and the .omo block; the existing unit
  test now asserts both paths.

start-work session-plan-affinity:
- PLAN_PATH_PATTERN only matched .sisyphus/plans, so sessions referring
  to plans under .omo/plans returned null and start-work missed the
  current session's own plan.
- Extend the regex to .(sisyphus|omo)/plans and add findPrometheusPlans
  in packages/boulder-state to scan both directories during the
  transition. New regression test pins .omo/plans matching; legacy
  .sisyphus/plans coverage preserved.
2026-05-22 00:07:46 +09:00
YeonGyu-Kim 3f44b45fa2 feat(i18n): wire initI18n into production plugin startup
6ffea1bc3 added i18n with en/zh locales and plugin config support, but
the initI18n() call lived in the original src/index.ts. When src/index.ts
became an 18-line wrapper that delegates to
src/testing/create-plugin-module.ts createPluginModule(), the call site
was dropped on the floor. Result: i18n.locale config and LANG env both
ignored at runtime, every toast stayed English regardless of user
setting.

Inject initI18n as a managed dependency and call it in
createPluginModule() immediately after loadPluginConfig(), passing
pluginConfig.i18n?.locale through. Add an integration test that boots
the plugin with i18n.locale='zh' and asserts getLocale() returns 'zh'
and t('toast.task_completed') returns the Chinese string. Regression
locked - subsequent moves of the startup path will fail loudly.
2026-05-22 00:07:46 +09:00
YeonGyu-Kim 2e2e33cfc0 test: fix stale imports after prompt-async-gate and model-core refactors
- prompt-async-gate.test.ts: refactor ced36bffc removed
  promptAsyncAfterSessionIdle in favor of the unified
  dispatchInternalPrompt({ mode: 'async', ... }). One call site at
  line 1441 was left behind. Replace it with the current API and pass
  the explicit dispatchTimeoutMs so the status-timeout semantics are
  preserved. Also switch the surrounding tests to the third-argument
  timeout form so Bun's typings stay happy.
- runtime-model-readers.test.ts: implementation moved to
  packages/model-core during the layering refactor; the orphaned test
  still pointed at './runtime-model-readers'. Switch to the package
  export via getModelCapabilities and keep the modality-reader
  coverage by deriving keys through the package API.
2026-05-22 00:07:46 +09:00
YeonGyu-Kim 9624914c25 test(disabled-providers): drop logger mock to fix global mock-module leakage
mock.restore() in afterAll is global in Bun, so the previous attempt to
satisfy mock-module-lifecycle-audit by pairing mock.module('./logger')
with afterAll(() => mock.restore()) tore down mocks owned by other
tests. Concretely, running this file before src/hooks/runtime-fallback
produced 42 cascading fallback test failures.

The logger mock was decorative - tests do not assert log calls, and the
real logger only writes to oh-my-opencode.log in the OS temp dir. Drop
the mock entirely so the audit has nothing to score and other tests
keep their mocks intact.
2026-05-22 00:07:46 +09:00
YeonGyu-Kim bc0da0fad3 test: fix prometheus-prompt syntax + sync display name casing to lowercase
- prometheus-prompt.test.ts: close missing }) on the OpenSpec expanded
  commands describe block (introduced by d66b6bcbf, parse error).
- agent-sort-shim/agent-config-integration/continuation-injection/
  unstable-agent-babysitter/subagent-resolver/sync-executor/
  resolve-caller-team-lead tests: expect 'Sisyphus - ultraworker'
  (lowercase) to match production after cd39f8858, which lowercased the
  display name to dodge a TUI ZWSP rendering glitch. Legacy uppercase
  inputs that exercise the normalization path are preserved.
- sync-executor.ts + resolve-caller-team-lead.ts: route legacy display
  name inputs through normalizeAgentForPrompt so prompt agent names and
  caller team lead lookups produce the canonical lowercase form.
2026-05-22 00:07:46 +09:00