Commit Graph

1088 Commits

Author SHA1 Message Date
YeonGyu-Kim 2a4f5f2877 Merge pull request #2958 from kui123456789/fix/context-injector-prt-prefix
fix(context-injector): prefix synthetic part ids with prt_
2026-05-21 00:56:26 +09:00
YeonGyu-Kim ace15a6afe Merge pull request #3785 from Biemmmmm/fix/resolve-plugin-root-in-commands
fix: resolve ${CLAUDE_PLUGIN_ROOT} in plugin commands, agents, and skills
2026-05-21 00:48:33 +09:00
YeonGyu-Kim d0719ff7b7 Merge pull request #3875 from jollyxenon/fix/3846-opencode-config-dir-additive
fix(config): align OPENCODE_CONFIG_DIR with additive OpenCode semantics
2026-05-21 00:48:00 +09:00
YeonGyu-Kim 6dcb2afd41 Merge pull request #3838 from NICxKMS/fix/team-mode-windows-atomic-write
fix(team-mode): sync atomic writes through writable handle
2026-05-21 00:46:24 +09:00
YeonGyu-Kim 2185babd28 Merge pull request #3936 from wjiuxing/fix/flaky-spawner-test-polling
fix: replace brittle setTimeout(50) with polling waitForCondition in spawner tests
2026-05-21 00:46:06 +09:00
YeonGyu-Kim cad63c97bd Merge pull request #4052 from PeterPonyu/fix/3505-attach-retry-until-session-ready
fix(tmux-subagent): wait for session readiness before spawning attach pane
2026-05-21 00:45:15 +09:00
YeonGyu-Kim 0e49767a3e Merge pull request #4026 from dihak/fix/graceful-shutdown-exit
fix(process-cleanup): call process.exit() after SIGTERM cleanup
2026-05-21 00:43:32 +09:00
YeonGyu-Kim e824115a2f Merge pull request #4063 from PeterPonyu/fix/3963-server-url-port-zero
fix(team-mode): surface port-0 fallback and silent layout skip (#3963)
2026-05-21 00:42:20 +09:00
YeonGyu-Kim cb124f75a5 Merge pull request #4065 from PeterPonyu/fix/3987-team-create-hard-reject-validation
fix(team-mode): reject team_create from hard-reject agents (#3987)
2026-05-21 00:42:04 +09:00
YeonGyu-Kim a1f03c8461 Merge pull request #4066 from PeterPonyu/fix/2887-filter-terminal-probe-replies
fix(tmux-subagent): drain terminal probe replies during delegated pane startup (#2887)
2026-05-21 00:41:57 +09:00
YeonGyu-Kim 6637a18450 Merge pull request #4067 from PeterPonyu/fix/3898-fallback-preserve-team-context
fix(team-mode): preserve team membership across model fallback (#3898)
2026-05-21 00:41:11 +09:00
YeonGyu-Kim 343d9ed2fe Merge pull request #4099 from sjawhar/fix/mcp-reload-survival
fix(skill-mcp): allow MCP manager to accept connections after disconnectAll
2026-05-21 00:13:29 +09:00
YeonGyu-Kim 7a5b8d831e Merge pull request #4100 from sjawhar/fix/tmux-isolated-close-no-layout
fix(tmux): skip layout enforcement when closing isolated container pane
2026-05-21 00:11:55 +09:00
YeonGyu-Kim aa5eeaf892 Merge pull request #4102 from sjawhar/fix/skill-directory-param
fix(skill): pass directory to getAllSkills + fix async test timing
2026-05-21 00:08:40 +09:00
YeonGyu-Kim 3e9c3f8ada Merge pull request #4146 from LYY/fix/skill-shortname-fallback
fix: support unambiguous short skill names in delegated skill loading
2026-05-20 23:42:44 +09:00
YeonGyu-Kim 791825fc20 Merge pull request #4153 from MoerAI/fix/fallback-model-string-guard
fix(shared,delegate-task,claude-code-agent-loader): guard model parsers against non-string input (fixes #4145)
2026-05-20 23:40:33 +09:00
YeonGyu-Kim fd6a7aed17 Merge pull request #4176 from jangByeongHui/fix/skill-mcp-env-allowlist-bypass-3995
fix(skill-mcp-manager): trust explicit skill MCP env vars (#3995)
2026-05-20 23:09:12 +09:00
YeonGyu-Kim 4611856176 Merge pull request #4172 from MoerAI/fix/team-mode-base-dir-chmod-eperm 2026-05-20 18:59:59 +09:00
YeonGyu-Kim 330e437f08 docs(agents): regenerate hierarchical AGENTS.md for 2026-05-20
Sync the AGENTS.md hierarchy to current code state:

Drift fixes in 11 existing files
- Root: 2026-05-20 commit 39aadbf9f, ~2167 TS files, 120 barrel index.ts,
  57 src/hooks dirs, 297 (179 non-test) src/shared files, 11 OpenCode hook
  handlers in plugin-interface.ts, packages list adds ast-grep-mcp + rules-core,
  first-prompt-watchdog 206 LOC, parent-wake-notifier 587 LOC
- src/AGENTS.md: file counts, plugin-interface handler count
- src/shared/AGENTS.md: title + counts 278/170 -> 297/179
- src/hooks/AGENTS.md: 57 dirs, note unwired WIP (task-reminder,
  hashline-edit-diff-enhancer)
- src/features/AGENTS.md: module map with NON-TEST counts + sub-AGENTS.md
  column, 7 modules without sub-doc
- src/features/background-agent/AGENTS.md: add 12 newer files (parent-wake-
  notifier 587 LOC, loop-detector, error-classifier, fallback-retry-handler,
  process-cleanup, subagent-spawn-limits, session-status-classifier,
  compaction-aware-message-resolver, etc.)
- src/plugin/AGENTS.md: 11 handlers, add system-transform.ts + command-
  execute-before.ts + build-team-idle-wake-hint-client.ts
- src/config/AGENTS.md: note schema/internal/permission.ts
- src/cli/AGENTS.md: 8 commands including 'version'
- src/plugin-handlers/AGENTS.md, packages/web/AGENTS.md: date bump

New AGENTS.md in 4 directories
- packages/AGENTS.md: index of 15 packages (11 platform binaries + 2 MCP
  packages + rules-core + web), role map, conventions
- docs/AGENTS.md: WHERE TO LOOK table for 19 docs across 6 subdirs
- .opencode/AGENTS.md: 5 skills + 4 slash commands + relationship to .agents/
- .agents/AGENTS.md: superset migration target (9 skills + 4 commands)
2026-05-20 17:18:44 +09:00
YeonGyu-Kim 11d2cfb8a8 fix(background-agent): re-enqueue parent wake on same-source reservation instead of dropping
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-20 13:24:08 +09:00
YeonGyu-Kim ee8b80a5e2 test(background-agent): add red test for parent-wake drop on same-source reservation hold (BUG-E)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-20 13:24:08 +09:00
YeonGyu-Kim da5aa7f32e test(team-mode): allow reclaimed reservations to stay readable
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-20 13:05:57 +09:00
YeonGyu-Kim f79da77fe0 test(team-mode): decouple resume history fixture from session routing
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-20 13:00:48 +09:00
YeonGyu-Kim af42f0ac70 test(team-mode): stabilize resume stale reservation history check
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-20 12:52:00 +09:00
YeonGyu-Kim 655dffbc2a fix(team-mode): release reservation on ambiguous failure, commit on success-path mark failure
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-20 12:30:02 +09:00
YeonGyu-Kim 7adb833609 test(team-mode): add red tests for ambiguous delivery loss (BUG-A + BUG-B)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-20 12:28:40 +09:00
YeonGyu-Kim 6df148f0f6 fix(team-mode): close peer message delivery races 2026-05-20 11:42:38 +09:00
YeonGyu-Kim d3e218f912 fix(prompt): treat post-dispatch failures as accepted 2026-05-20 11:42:32 +09:00
Sami Jawhar 824cd1a8a4 fix(skill-mcp): allow MCP manager to accept connections after disconnectAll
Also fix CI test isolation: run each test file in its own bun process to prevent
mock.module() leaks across files that were introduced by upstream commit 6acca09b.
2026-05-19 12:24:59 +00:00
Sami Jawhar e8a7e2a94d fix(tmux): skip layout enforcement when closing isolated container pane 2026-05-19 12:24:59 +00:00
Sami Jawhar d2d1541377 fix(skill): pass directory to getAllSkills and fix async test timing 2026-05-19 12:24:59 +00:00
YeonGyu-Kim b2918fd4db fix(team-mode): close peer message delivery races 2026-05-19 19:18:13 +09:00
YeonGyu-Kim bcea4a9d28 fix(prompt-gate): harden sync and team prompt dispatch 2026-05-19 19:18:13 +09:00
YeonGyu-Kim 1492bffd20 fix(prompt-gate): harden internal prompt dispatch 2026-05-19 19:18:13 +09:00
YeonGyu-Kim 7db3a7f933 fix(team-mode): preserve live delivery holds after ambiguous prompt failure 2026-05-19 13:49:01 +09:00
YeonGyu-Kim e57bac3b6b fix(prompt-retry): preserve async holds without blocking validation fallbacks 2026-05-19 13:48:33 +09:00
YeonGyu-Kim 5f733f471c fix(parent-wake): recognize sdk tool progress 2026-05-19 13:48:26 +09:00
YeonGyu-Kim d3d2d4913b fix(parent-wake): preserve stale tool-call wake escape 2026-05-19 13:16:39 +09:00
YeonGyu-Kim dfc2e8e4ae fix(prompt-retry): preserve peer prompt reservations 2026-05-19 13:16:39 +09:00
YeonGyu-Kim b53a8b5e09 fix(parent-wake): close duplicate wake races 2026-05-19 13:16:39 +09:00
jangByeongHui 22aadd6863 fix(skill-mcp-manager): trust explicit skill MCP env vars (#3995)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-19 12:35:12 +09:00
MoerAI 688d7395e0 fix(team-mode): swallow EPERM/ENOTSUP/EINVAL from chmod on base dir to keep init alive (fixes #4023)
ensureBaseDirs unconditionally called chmod(baseDir, 0o700) on every startup
and on every team_create. On filesystems where the OS rejects chmod for the
directory (network mounts, SIP-protected locations, non-owner cases on macOS
shared by multiple GUI users), the call raises EPERM and the entire team-mode
init aborts:

  [team-mode] init failed: EPERM: operation not permitted, chmod '/Users/<u>/.omo'

Wrap chmod through a small safeChmod helper that converts EPERM, ENOTSUP, and
EINVAL into a single warning log and continues. mkdir already creates new
directories with mode 0o700, and the existing post-creation stat-guard remains
in place for the case where the directory pre-exists with a different mode and
chmod is permitted, so the security envelope on supported filesystems is
unchanged. All other error codes (ENOENT, EACCES, etc.) still propagate.

Regression test mocks node:fs/promises.chmod to throw EPERM and asserts that
ensureBaseDirs completes successfully and emits exactly the documented warning.
2026-05-19 10:19:46 +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 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
MoerAI ae0c106ed4 fix(shared,delegate-task,claude-code-agent-loader): guard model parsers against non-string input (fixes #4145)
After the 4.2.0 unified-dispatch refactor (a42f894f / df198d8b / fee515c5 / 989ab717 / dd3fecaf / 1bbe065c / 12bd6580), at least one caller in the new prompt-async-gate path forwards a FallbackModelObject (or some other non-string shape) into parsers that statically claim 'model: string'. The downstream .trim() call then throws 'model.trim is not a function', which rejects the session.processor promise and surfaces as 'Aborted process' + UI 'interrupted'. The issue (#4145) reports this aborts 90% of subagent dispatches across every provider on 4.2.0 + opencode 1.15.4.

This patch adds a 'typeof x !== "string"' runtime guard at the four parser entrypoints called from the dispatch path:

- src/shared/fallback-chain-from-models.ts :: parseVariantFromModel, parseFallbackModelEntry

- src/tools/delegate-task/model-string-parser.ts :: parseVariantFromModelID, parseModelString

- src/shared/model-string-parser.ts (duplicate file with same API) :: parseVariantFromModelID, parseModelString

- src/features/claude-code-agent-loader/claude-model-mapper.ts :: mapClaudeModelString

Each parser now returns undefined / { modelID: "" } for non-string input instead of throwing. This unblocks subagent dispatch and leaves the underlying caller bug for a follow-up.

Regression coverage: three new tests in src/shared/fallback-chain-from-models.test.ts pin the non-string behavior (object, null/undefined, number). Existing 38 tests still pass. Total: 41/41 green, typecheck clean.
2026-05-18 19:22:33 +09:00
LYY 47fced7473 fix: address review findings - git-master identity check, test fixtures, regression strength 2026-05-18 17:17:31 +08:00
LYY 77997d8e74 fix(skill-loader): support unambiguous short skill names 2026-05-18 17:17:31 +08: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 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