Commit Graph

4162 Commits

Author SHA1 Message Date
YeonGyu-Kim
9cbcf17dde Merge PR #2913: fix(recovery): ignore empty summary-only assistant messages 2026-03-28 17:15:04 +09:00
Ravi Tharuma
4e214cba4e fix(recovery): ignore empty summary-only assistant messages 2026-03-28 08:57:36 +01:00
YeonGyu-Kim
4a029258a4 fix: resolve 5 remaining pre-publish blockers (14, 15, 17, 21, 25c)
- completion-promise-detector: restrict to assistant text parts only,
  remove tool_result from completion detection (blocker 14)
- ralph-loop tests: flip tool_result completion expectations to negative
  coverage, add false-positive rejection tests (blocker 15)
- skill tools: merge nativeSkills into initial cachedDescription
  synchronously before any execute() call (blocker 17)
- skill tools test: add assertion for initial description including
  native skills before execute() (blocker 25c)
- docs: sync all 4 fallback-chain docs with model-requirements.ts
  runtime source of truth (blocker 21)

Verified: bun test (4599 pass / 0 fail), tsc --noEmit clean
2026-03-28 15:57:27 +09:00
YeonGyu-Kim
d2c576c510 fix: resolve 25 pre-publish blockers
- postinstall.mjs: fix alias package detection
- migrate-legacy-plugin-entry: dedupe + regression tests
- task_system: default consistency across runtime paths
- task() contract: consistent tool behavior
- runtime model selection, tool cap, stale-task cancellation
- recovery sanitization, context-limit gating
- Ralph semantic DONE hardening, Atlas fallback persistence
- native-skill description/content, skill path traversal guard
- publish workflow: platform awaited via reusable workflow job
- release: version edits reapplied before commit/tag
- JSONC plugin migration: top-level plugin key safety
- cold-cache: user fallback models skip disconnected providers
- docs/version/release framing updates

Verified: bun test (4599 pass), tsc --noEmit clean, bun run build clean
2026-03-28 15:24:18 +09:00
YeonGyu-Kim
44b039bef6 Merge pull request #2705 from MoerAI/fix/sisyphus-premature-implementation
fix(sisyphus): block premature implementation before context is complete (fixes #2274)
2026-03-28 01:46:31 +09:00
YeonGyu-Kim
aeec5ef98d Merge pull request #2773 from MoerAI/fix/ralph-loop-fuzzy-completion
fix(ralph-loop): add semantic completion detection as fallback for natural language (fixes #2489)
2026-03-28 01:44:56 +09:00
YeonGyu-Kim
7b2b8be181 Merge pull request #2771 from MoerAI/fix/bash-file-read-guard
fix(hooks): add bash-file-read-guard to warn agents against cat/head/tail (fixes #2096)
2026-03-28 01:44:44 +09:00
YeonGyu-Kim
adc55138c8 Merge pull request #2850 from octo-patch/feature/upgrade-minimax-m2.7
feat: upgrade remaining MiniMax M2.5 fallbacks to M2.7-highspeed
2026-03-28 01:42:25 +09:00
YeonGyu-Kim
3715fb79b9 Merge pull request #2871 from Jholly2008/kkk/fix-on-complete-hook-shell
fix(cli): respect platform shell for --on-complete
2026-03-28 01:42:13 +09:00
YeonGyu-Kim
b9ed0ca30b Merge pull request #2877 from WhiteGiverMa/fix/atlas-agent-not-found
fix: use getAgentDisplayName in injectBoulderContinuation
2026-03-28 01:40:38 +09:00
YeonGyu-Kim
45e9fcd776 Merge pull request #2894 from codivedev/fix/issue-2881
fix: detect and warn about opencode-skills conflict
2026-03-28 01:40:04 +09:00
YeonGyu-Kim
49687a654a Merge pull request #2895 from MoerAI/fix/session-recovery-missing-messageid
fix(session-recovery): fallback to fetching messageID from session messages (fixes #2046)
2026-03-28 01:39:44 +09:00
YeonGyu-Kim
364550038a Merge pull request #2892 from MoerAI/fix/subagent-model-config-ignored
fix(delegate-task): honor user model override in category-resolver cold cache (fixes #2712)
2026-03-28 01:39:33 +09:00
YeonGyu-Kim
9e6f2d9977 Merge pull request #2893 from MoerAI/fix/keyword-detector-silent-skips
fix(keyword-detector): add logging for silent skip paths (fixes #2058)
2026-03-28 01:39:20 +09:00
YeonGyu-Kim
4fa7d48c04 Merge pull request #2890 from MoerAI/fix/start-work-atlas-not-found
fix(start-work): gracefully handle missing Atlas agent (fixes #2132)
2026-03-28 01:38:53 +09:00
YeonGyu-Kim
b4a5189a07 Merge pull request #2889 from MoerAI/fix/git-master-config-ignored
fix(config): apply git_master defaults when section is missing (fixes #2040)
2026-03-28 01:38:38 +09:00
YeonGyu-Kim
631092461c Merge pull request #2891 from codivedev/fix/issue-2882
fix: use display name in runtime-fallback retry
2026-03-28 01:38:14 +09:00
YeonGyu-Kim
c5068d37d2 fix(#2885): add model_not_supported to RETRYABLE error patterns
model_not_supported errors from providers (e.g. OpenAI returning
{"error": {"code": "model_not_supported"}}) were not recognized as
retryable. Subagents would silently fail with no response, hanging the
parent session.

Fix:
- Add "model_not_supported", "model not supported", "model is not
  supported" to RETRYABLE_MESSAGE_PATTERNS in model-error-classifier.ts
- Add regex patterns to RETRYABLE_ERROR_PATTERNS in
  runtime-fallback/constants.ts to match "model ... is ... not ...
  supported" with flexible spacing
- Add regression test covering all three variations

Now model_not_supported errors trigger the normal fallback chain instead
of silent failure.
2026-03-28 00:42:52 +09:00
YeonGyu-Kim
1434313bd7 Merge pull request #2717 from gtg7784/fix/analyze-mode-load-skills-hint
Verified: tsc clean, 27/27 keyword-detector tests pass. Fix is correct — analyze-mode message was missing delegate_task required params which caused load_skills validation errors.
2026-03-28 00:29:53 +09:00
codivedev
38347a396e fix: address review comments - remove duplicates and respect skills config 2026-03-27 13:49:58 +01:00
codivedev
885d3a2462 fix: detect and warn about opencode-skills conflict 2026-03-27 13:40:00 +01:00
codivedev
b4d4d30fa8 fix: use display name in runtime-fallback retry 2026-03-27 13:39:50 +01:00
github-actions[bot]
9d9365901b @codivedev has signed the CLA in code-yeongyu/oh-my-openagent#2888 2026-03-27 12:39:50 +00:00
MoerAI
2b2b280895 fix: apply Zod defaults to empty config fallback 2026-03-27 21:30:56 +09:00
MoerAI
fee60d2def fix(session-recovery): fallback to fetching messageID from session messages (fixes #2046) 2026-03-27 21:26:09 +09:00
MoerAI
f030e0d78d fix(keyword-detector): add logging for silent skip paths (fixes #2058) 2026-03-27 21:24:03 +09:00
MoerAI
5d5eb46f19 fix(delegate-task): honor user model override in category-resolver cold cache (fixes #2712) 2026-03-27 21:21:17 +09:00
User
787ce99eda fix: detect and warn about opencode-skills conflict
When opencode-skills plugin is registered alongside oh-my-openagent,
all user skills are loaded twice, causing 'Duplicate tool names detected'
warnings and HTTP 400 errors.

This fix:
1. Detects if opencode-skills plugin is loaded in opencode.json
2. Emits a startup warning explaining the conflict
3. Suggests fixes: either remove opencode-skills or disable skills in oh-my-openagent

Fixes #2881
2026-03-27 13:21:08 +01:00
MoerAI
d09af86ea7 fix(start-work): gracefully handle missing Atlas agent (fixes #2132) 2026-03-27 21:13:44 +09:00
MoerAI
5b9b6eb0b8 fix(config): apply git_master defaults when section is missing (fixes #2040) 2026-03-27 21:00:01 +09:00
YeonGyu-Kim
324dbb119c fix(#2791): await session.abort() in all subagent completion/cancel paths
Fire-and-forget session.abort() calls during subagent completion left
dangling promises that raced with parent session teardown. In Bun on
WSL2/Linux, this triggered a StringImplShape assertion (SIGABRT) as
WebKit GC collected string data still referenced by the inflight request.

Fix: await session.abort() in all four completion/error paths:
- startTask promptAsync error handler (launch path)
- resume promptAsync error handler (resume path)
- cancelTask (explicit cancel path)
- tryCompleteTask (normal completion path)

Also marks the two .catch() error callbacks as async so the await is
valid.

Test: update session.deleted cascade test to flush two microtask rounds
since cancelTask now awaits abort before cleanupPendingByParent.
2026-03-27 19:57:57 +09:00
YeonGyu-Kim
ab0b084199 Merge pull request #2884 from RaviTharuma/fix/runtime-fallback-hook-isolation
Verified: bun test src/plugin/event.test.ts src/hooks/runtime-fallback/index.test.ts -- 68/68 pass. tsc clean.
2026-03-27 19:10:06 +09:00
YeonGyu-Kim
f1f099fde9 fix(#2849): resolve platform binaries using current package name
The installer wrapper and postinstall script still hardcoded the old
oh-my-opencode-* platform package family. When users installed the renamed
npm package oh-my-openagent (for example via npx oh-my-openagent install on
WSL2/Linux), the main package installed correctly but the wrapper looked for
nonexistent optional binaries like oh-my-opencode-linux-x64.

Fix:
- derive packageBaseName from package.json at runtime in wrapper/postinstall
- thread packageBaseName through platform package candidate resolution
- keep legacy oh-my-opencode default as fallback
- add regression test for renamed package family
2026-03-27 18:29:36 +09:00
YeonGyu-Kim
6662205646 fix(#2748): pass browserProvider into skill() discovery
skill-context already filtered browser-related skills using the configured
browser provider, but the skill tool rebuilt discovery without forwarding
browserProvider. That caused skills like agent-browser to be prompt-visible
while skill() could still fail to resolve them unless browser_automation_engine.provider
was explicitly threaded through both paths.

Fix:
- pass skillContext.browserProvider from tool-registry into createSkillTool
- extend SkillLoadOptions with browserProvider
- forward browserProvider to getAllSkills()
- add regression tests for execution and description visibility
2026-03-27 17:58:38 +09:00
YeonGyu-Kim
76bf269b39 fix(#2754): include native PluginInput skills in skill() discovery
The skill tool previously only merged disk-discovered skills and preloaded
options.skills, so skills registered natively via ctx.skills (for example
from config.skills.paths or other plugins) were prompt-visible but not
discoverable by skill().

Fix:
- pass ctx.skills from tool-registry into createSkillTool
- extend SkillLoadOptions with nativeSkills accessor
- merge nativeSkills.all() results into getSkills()
- add test covering native PluginInput skill discovery
2026-03-27 17:42:43 +09:00
Ravi Tharuma
3e4b988860 fix: isolate event hook failures during dispatch 2026-03-27 09:30:43 +01:00
YeonGyu-Kim
d3dbb4976e fix(#2854): enable task system by default (oracle/subagent delegation)
task_system now defaults to true instead of false. Users on opencode-go
or other plans were unable to invoke oracle or use subagent delegation
because experimental.task_system defaulted off.

The task system is the primary mechanism for oracle, explore, and other
subagent invocations — it should not be behind an experimental flag.

Users can still explicitly set experimental.task_system: false to opt out.
2026-03-27 17:03:33 +09:00
YeonGyu-Kim
ec7a2e3eae fix(#2857): prevent npm scoped package paths from being resolved as skill paths
resolveSkillPathReferences: add looksLikeFilePath() guard that requires
a file extension or trailing slash before resolving @scope/package
references. npm packages like @mycom/my_mcp_tools@beta were incorrectly
being rewritten to absolute paths in skill templates.

2 new tests.
2026-03-27 16:59:04 +09:00
YeonGyu-Kim
c41e59e9ab fix(#2825): secondary agents no longer pruned after 30 min of total runtime
TTL (pruneStaleTasksAndNotifications) now resets on last activity:
- Uses task.progress.lastUpdate as TTL anchor for running tasks
  (was always using startedAt, causing 30-min hard deadline)
- Added taskTtlMs config option for user-adjustable TTL
- Error message shows actual TTL duration, not hardcoded '30 minutes'
- 3 new tests for the new behavior
2026-03-27 16:06:38 +09:00
YeonGyu-Kim
3b4420bc23 fix(#2735): check model availability before using custom subagent default model
subagent-resolver: when falling back to matchedAgent.model for custom
subagents, verify the model is actually available via fuzzyMatchModel
before setting it as categoryModel. Prevents delegate_task from using
an unavailable model when the user's custom agent config references
a model they don't have access to.

Test updated to include the target model in available models mock.
2026-03-27 15:50:16 +09:00
YeonGyu-Kim
3be26cb97f fix(#2732): enhance notification for failed/crashed subagent tasks
- completedTaskSummaries now includes status and error info
- notifyParentSession: noReply=false for failed tasks so parent reacts
- Batch notification distinguishes successful vs failed/cancelled tasks
- notification-template updated to show task errors
- task-poller: session-gone tests (85 new lines)
- CI: add Bun shim to PATH for legacy plugin migration tests
2026-03-27 15:48:07 +09:00
YeonGyu-Kim
e22e13cd29 fix(#2732): detect crashed subagent sessions with shorter timeout
When a subagent session disappears from the status registry (process
crashed), the main agent was waiting the full stale timeout before
acting. Fix:

- Add sessionGoneTimeoutMs config option (default 60s, vs 30min normal)
- task-poller: use shorter timeout when session is gone from status
- manager: verify session existence when gone, fail crashed tasks
  immediately with descriptive error
- Add legacy-plugin-toast hook for #2823 migration warnings
- Update schema with new config option
2026-03-27 15:43:01 +09:00
YeonGyu-Kim
6a733c9dde fix(#2823): auto-migrate legacy plugin name and warn users at startup
- logLegacyPluginStartupWarning now emits console.warn (visible to user,
  not just log file) when oh-my-opencode is detected in opencode.json
- Auto-migrates opencode.json plugin entry from oh-my-opencode to
  oh-my-openagent (with backup)
- plugin-config.ts: add console.warn when loading legacy config filename
- test: 10 tests covering migration, console output, edge cases
2026-03-27 15:40:04 +09:00
YeonGyu-Kim
127626a122 fix(#2822): properly cleanup tmux sessions on process shutdown
Two issues fixed:
1. process-cleanup.ts used fire-and-forget void Promise for shutdown
   handlers — now properly collects and awaits all cleanup promises
   via Promise.allSettled, with dedup guard to prevent double cleanup
2. TmuxSessionManager was never registered for process cleanup —
   now registered in create-managers.ts via registerManagerForCleanup

Also fixed setTimeout().unref() which could let the process exit
before cleanup completes.
2026-03-27 15:23:48 +09:00
YeonGyu-Kim
5765168af4 fix(#2731): skip unauthenticated providers when resolving subagent model
Background subagents (explore/librarian) failed with auth errors because
resolveModelForDelegateTask() always picked the first fallback entry when
availableModels was empty — often an unauthenticated provider like xai
or opencode-go.

Fix: when connectedProvidersCache is populated, iterate fallback chain
and pick the first entry whose provider is in the connected set.
Legacy behavior preserved when cache is null (not yet populated).

- model-selection.ts: use readConnectedProvidersCache to filter fallback chain
- test: 4 new tests for connected-provider-aware resolution
2026-03-27 14:38:02 +09:00
github-actions[bot]
e65a0ed10d @WhiteGiverMa has signed the CLA in code-yeongyu/oh-my-openagent#2877 2026-03-27 05:26:49 +00:00
YeonGyu-Kim
041770ff42 fix(#2736): prevent infinite compaction loop by setting cooldown before try
lastCompactionTime was only set on successful compaction. When compaction
failed (rate limit, timeout, etc.), no cooldown was recorded, causing
immediate retries in an infinite loop.

Fix: set lastCompactionTime before the try block so both success and
failure respect the cooldown window.

- test: add failed-compaction cooldown enforcement test
- test: fix timeout retry test to advance past cooldown
2026-03-27 14:25:38 +09:00
WhiteGiverMa
a3b84ec5f9 fix: use getAgentDisplayName in injectBoulderContinuation
The agent parameter was using raw config key "atlas" but the SDK
expects the display name "Atlas (Plan Executor)". This caused
"Agent not found: 'atlas'" errors when auto-compact tried to
continue boulder execution.

Root cause: injectBoulderContinuation passed raw agent key to
session.promptAsync, but SDK's agent matching logic compares
against display names registered in the system.

Fix: Use getAgentDisplayName() to convert the config key to
the expected display name before passing to the SDK.
2026-03-27 13:22:58 +08:00
YeonGyu-Kim
7ce7a85768 fix(#2855): tmux health check fails across module instances in same process
The server-health module used module-level state for inProcessServerRunning,
which doesn't survive when Bun loads separate module instances in the same
process. Fix: use globalThis with Symbol.for key so the flag is truly
process-global.

- server-health.ts: replace module-level boolean with globalThis[Symbol.for()]
- export markServerRunningInProcess from tmux-utils barrel
- test: verify flag skips HTTP fetch, verify globalThis persistence
2026-03-27 14:17:06 +09:00
YeonGyu-Kim
19ab3b5656 fix(#2853): sync .sisyphus state from worktree to main repo before removal
When .sisyphus/ is gitignored, task state written during worktree execution
is lost when the worktree is removed. Fix:

- add worktree-sync.ts: syncSisyphusStateFromWorktree() copies .sisyphus/
  contents from worktree to main repo directory
- update start-work.ts template: documents the sync step as CRITICAL when
  worktree_path is set in boulder.json
- update work-with-pr/SKILL.md: adds explicit sync step before worktree removal
- export from boulder-state index
- test: 5 scenarios covering no-.sisyphus, nested dirs, overwrite stale state
2026-03-27 14:11:45 +09:00