Commit Graph

4744 Commits

Author SHA1 Message Date
YeonGyu-Kim 5f0e037dae fix(plugin): cover Anthropic-family prefill guard
Include Vertex Anthropic in the assistant-tail prefill guard after Cubic flagged the strict provider check. Keep the non-Anthropic opencode negative control covered by tests.

Plan: plans/fix-anthropic-assistant-prefill-tail.md
2026-05-19 12:33:22 +09:00
YeonGyu-Kim 45d670a7dc fix(plugin): constrain Anthropic prefill guard
Tighten the assistant-tail repair after review so only the Anthropic provider is treated as prefill-rejecting, and so assistant-tail model metadata is evaluated independently from the last user model.

Add regression coverage for an allowed user model followed by a rejecting Anthropic assistant tail, plus a non-Anthropic provider carrying a Claude-looking model id.

Plan: plans/fix-anthropic-assistant-prefill-tail.md
2026-05-19 12:24:37 +09:00
YeonGyu-Kim 3509bf47ae fix(plugin): guard Anthropic assistant prefill tails
Claude Opus 4.7 rejects requests whose final message is an assistant turn, because Anthropic treats that as unsupported assistant prefill. Add a transform guard that appends the existing synthetic user recovery turn only for Anthropic prefill-rejecting model IDs, while preserving assistant-prefill behavior for supported and unknown models.

Tests cover Opus 4.7, Opus 4.6 assistant metadata fallback, direct Sonnet 4.6 model fields, allowed OpenAI/Sonnet 4.5 tails, missing metadata, and compaction continuation compatibility.

Plan: plans/fix-anthropic-assistant-prefill-tail.md
2026-05-19 12:17:32 +09:00
YeonGyu-Kim 33b66376d7 fix(background-agent): defer live tool-turn wakes
Require the latest assistant tool-wait turn itself to be stale before a shouldReply parent wake can bypass tool-call deferral. This prevents an all-complete background wake from forking a second parent prompt loop when OpenCode has repaired the tail to a synthetic user message.

Tests:

- bun test src/features/background-agent/parent-wake-user-message-race.test.ts src/features/background-agent/task-completion-cleanup.test.ts src/hooks/shared/prompt-async-gate.test.ts src/shared/prompt-async-route-audit.test.ts --bail

- bun run typecheck

- bun test
2026-05-19 10:06:25 +09:00
YeonGyu-Kim 6915f15299 fix(todo-continuation): cancel stale ULW countdown
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-19 09:18:00 +09:00
YeonGyu-Kim d8f6d59dc2 docs: update rules and MCP inventories
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:28:12 +09:00
YeonGyu-Kim 05c09c1d32 fix(doctor): list all built-in MCP servers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:28:12 +09:00
YeonGyu-Kim 90b3f4ac96 test: harden workspace package assumptions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:28:12 +09:00
YeonGyu-Kim a86cc6af18 refactor(tools): remove native ast-grep tool
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:27:36 +09:00
YeonGyu-Kim ef09880e26 feat(mcp): register ast-grep as built-in MCP
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:27:36 +09:00
YeonGyu-Kim 4ea29e2c94 refactor(rules): delegate injectors to rules-core
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 21:27:36 +09:00
YeonGyu-Kim c9a3c34a29 test: stabilize dependency verification
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 20:55:33 +09:00
YeonGyu-Kim f925d13049 chore(deps): update root dependencies
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 20:55:17 +09:00
YeonGyu-Kim 6fe2f72c76 fix(mcp): bootstrap lsp when cli is unavailable
Keep the built-in lsp MCP registered even when the submodule CLI artifact is missing.

The fallback command initializes the lsp-tools-mcp submodule, prefers the source CLI without dirtying the checkout with dist output, and keeps npm build as a last resort when Bun cannot run the source entrypoint.

Plan: plans/fix-lsp-mcp-missing-cli.md
2026-05-18 20:48:24 +09:00
YeonGyu-Kim 450c1f9e50 fix(runtime-fallback): ignore stale assistant errors during fallback wait
When OpenCode reports the original assistant error after a fallback retry has already been accepted, keep waiting for the pending fallback model instead of clearing the awaiting flag.

This prevents a duplicate stale session.error from advancing the fallback chain and dispatching a second assistant retry prompt.
2026-05-18 17:48:04 +09:00
YeonGyu-Kim b9707b8469 Fix paused boulder session resolution 2026-05-18 17:18:46 +09:00
YeonGyu-Kim 881e990c42 fix(test/session-recovery): replace mock.calls[0][0] with typed accessor
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:53:43 +09:00
YeonGyu-Kim 9ddf13107d fix(test/runtime-fallback): add git_master to config fixture
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:53:13 +09:00
YeonGyu-Kim ae278eb9f2 fix(mcp): always register lsp server 2026-05-18 16:45:02 +09:00
YeonGyu-Kim e9061731c6 fix(ralph-loop): guard verification retry ownership
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:05:36 +09:00
YeonGyu-Kim 9c19bd8c51 fix(ralph-loop): defer during fresh user prompts
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 16:05:36 +09:00
YeonGyu-Kim 7187db6ede chore(mcp): move lsp submodule under packages 2026-05-18 16:00:40 +09:00
YeonGyu-Kim bcbab0555d fix(todo-continuation-enforcer): preserve countdown across compaction
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 15:59:16 +09:00
YeonGyu-Kim f898116be1 test(todo-continuation-enforcer): lock compaction countdown state
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 15:51:53 +09:00
YeonGyu-Kim ca3ea0bbe2 fix(messages-transform): narrow assistant-tail recovery trigger
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 15:50:23 +09:00
YeonGyu-Kim 44ee5e6ae7 test(messages-transform): lock assistant-tail continuation guard
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 15:49:09 +09:00
YeonGyu-Kim f20294a702 fix(unstable-agent-babysitter): normalize reminder agent names
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 15:48:43 +09:00
YeonGyu-Kim 0ee45aa6ab fix(unstable-agent-babysitter): respect active sessions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 15:48:43 +09:00
YeonGyu-Kim af1ad4d04b fix(background-agent): coalesce parent wake races
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 15:38:52 +09:00
YeonGyu-Kim c712b71d9a test(tmux): isolate pane close logic tests 2026-05-18 14:46:10 +09:00
YeonGyu-Kim 3b54d587bf Merge pull request #4132 from code-yeongyu/fix/3446-atlas-runaway-loop
fix(atlas): stop runaway boulder continuation loops
2026-05-18 14:43:03 +09:00
YeonGyu-Kim 6dc31b2c4f fix(atlas): scope no-tool-progress counter to active plan path before stall
Oracle review on PR #4132 flagged that resetStallStateForPlanChange only
reset state when stalledContinuationReason was already set, so partial
in-progress counts from plan A could carry to plan B and abort the new
plan on its first idle.

Adds activeContinuationPlanPath to SessionState and resets the
no-tool-progress counter + awaiting state whenever the active plan path
changes, even when no stall has occurred yet. The existing stalled-plan
reset still fires when the previously stalled plan path differs from
the new one.
2026-05-18 14:34:00 +09:00
YeonGyu-Kim 428a18c748 test(prompt-gate): tighten dispatch route regressions 2026-05-18 14:22:58 +09:00
YeonGyu-Kim e1554c088e fix(ralph-loop): preserve prompt dispatch holds through activity 2026-05-18 14:22:58 +09:00
YeonGyu-Kim 66cb72b831 fix(prompt-gate): bind session messages receiver 2026-05-18 14:22:58 +09:00
YeonGyu-Kim 1a66b96bb8 docs: note Atlas stalled continuation fix
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 14:18:33 +09:00
YeonGyu-Kim d3b4c022d2 fix(atlas): stop stalled boulder continuations
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 14:17:54 +09:00
YeonGyu-Kim fff99aeb29 fix(atlas): track no-tool-progress state
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 14:17:54 +09:00
YeonGyu-Kim 0994c107d2 fix(atlas): require blocked plan checkbox edits
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 14:17:54 +09:00
YeonGyu-Kim d44cd1c1a0 fix(background-agent): preserve parent agent on retry wakes
Background fallback retry notifications were queued as bare internal user messages, so OpenCode could treat the notification as a new default-agent turn. Reuse the same parent prompt context resolver used by completion notifications for retrying and retry-ready wakes, and pin regression coverage for Hephaestus parent sessions plus missing-context fallbacks.
2026-05-18 14:17:33 +09:00
YeonGyu-Kim 82b0672c05 fix(git-master): emit csh-compatible setenv syntax for csh/tcsh shells
buildShellAwareGitPrefix incorrectly returned raw bash VAR=value prefix for csh, which does not support inline env assignment. Now routes csh through buildEnvPrefix() to emit setenv syntax. Also sets code block lang to csh and skips bash block regex prefixing for csh.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 14:04:43 +09:00
YeonGyu-Kim b2961409b7 test(shell-env): add csh/tcsh detection and buildEnvPrefix coverage
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 14:04:17 +09:00
YeonGyu-Kim bc2ed016e4 Merge pull request #4141 from code-yeongyu/fix/3396-config-skills-paths-discovery
fix: discover skills from host config.skills.paths set by other plugins
2026-05-18 13:50:34 +09:00
YeonGyu-Kim b0f432dbe5 Merge pull request #4136 from code-yeongyu/fix/4059-blocker4-reland
fix(runtime-fallback): reland BLOCKER-4 delegated empty-history fallback (#4059)
2026-05-18 13:50:03 +09:00
YeonGyu-Kim c8c06d601c Merge pull request #4020 from scw1109/fix/default-agent-sort-order
fix: respect default_agent in sort shim ordering
2026-05-18 13:48:58 +09:00
YeonGyu-Kim c37725bb7f Merge pull request #4139 from code-yeongyu/fix/3450-anthropic-context-limit-revisited
fix(shared): return GA 1M context limit for Anthropic 4.6/4.7 models without cached entry
2026-05-18 13:44:56 +09:00
YeonGyu-Kim ecb87608e6 fix: wire host config.skills.paths into command skill discovery
Mirrors the agent-config-handler change: command-config-handler now also discovers skills from host config.skills.paths set by other plugins, making them available as slash commands.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:43:56 +09:00
YeonGyu-Kim 1412795825 fix: wire host config.skills.paths into agent skill discovery
When another plugin (e.g. superpowers) injects skill directories via config.skills.paths in the config hook, the agent-config-handler now discovers those skills via a second discoverConfigSourceSkills call using the adapted host config. Fixes #3396.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:43:38 +09:00
YeonGyu-Kim 043e84be56 fix: add adaptHostSkillConfig utility for host config.skills.paths
Converts the host OpenCode config.skills object (with paths/urls arrays set by other plugins like superpowers) into the SkillsConfig format used by discoverConfigSourceSkills. Filters blank/whitespace entries and non-string values.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:43:08 +09:00
YeonGyu-Kim f5e063b00a fix: only call setDefaultAgentForSort when user explicitly sets default_agent
The previous code read params.config.default_agent which is always populated to
"Sisyphus - Ultraworker" by existing logic (lines 196-204) even when the user
never configured default_agent. This silently overrode any custom agent_order.

Now we gate on configuredDefaultAgent (the user's explicit value) so the sort
shim rank map is only mutated when the user actually set default_agent.

Add regression test: agent_order without default_agent must preserve order.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-18 13:42:59 +09:00