2806 Commits

Author SHA1 Message Date
Bellman
3370856b5e Merge pull request #2744 from Yeachan-Heo/fix/issue-2743-cross-session-ralph-cancel
Fix Ralph cross-session cancel state resurrection
2026-04-21 02:40:49 +09:00
Codex Review
0d261698a7 Clear the owning Ralph session when cross-session cancel has no local state
Resumed Ralph sessions can leave the only active state under a foreign
session directory, so cancelling from the current session used to clear
nothing and let the owner path survive. The state_clear path now falls
back to the sole active owning session only when the current session has
no matching state, and it writes cancel signals for both sessions so stop
enforcement stays down during teardown.

Constraint: Cross-session resume can leave the only active Ralph state under a different session directory
Rejected: Broad-clear every session-scoped file for the mode | too destructive for parallel sessions
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep owner fallback constrained to the unambiguous single-owner case; do not widen it without a stronger ownership contract
Tested: npm test -- --run src/tools/__tests__/state-tools.test.ts src/hooks/persistent-mode/__tests__/cancel-race.test.ts
Tested: npm test -- --run src/tools/__tests__/cancel-integration.test.ts src/hooks/persistent-mode/session-isolation.test.ts src/lib/__tests__/mode-state-io.test.ts src/hooks/mode-registry/__tests__/session-isolation.test.ts
Tested: npx tsc --noEmit
Tested: npx eslint src/tools/state-tools.ts src/tools/__tests__/state-tools.test.ts src/hooks/persistent-mode/__tests__/cancel-race.test.ts
Related: #2743
2026-04-20 17:30:38 +00:00
Codex Review
2995bab5e2 chore(release): bump version to v4.13.1
Release includes:
- feat(team): cursor-agent as 4th tmux worker type (#2736)
- fix(keyword-detector): stop false-positive autopilot on "autonomous" (#2739)
- fix(self-improve): scope artifacts by topic for safer resumes (#2732)

Constraint: 4 version files must remain in sync (package.json, plugin.json, marketplace.json, package-lock.json)
Constraint: dist/ is gitignored but tracked; force-add required for new files
Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-20 14:02:16 +00:00
Bellman
a5c2d9c2ae Merge pull request #2739 from deepshwang/fix/autopilot-autonomous-false-positive-dev
fix(keyword-detector): stop false-positive autopilot on "autonomous"
2026-04-20 18:10:25 +09:00
Sungwon Hwang
d6354c8562 fix(keyword-detector): stop false-positive autopilot on "autonomous"
The deployed scripts/keyword-detector.mjs still listed "autonomous" in the
autopilot trigger regex, even though src/hooks/keyword-detector/index.ts
and templates/hooks/keyword-detector.mjs both removed it some time ago.

Because "autonomous" is extremely common in technical/research prose
("autonomous driving", "autonomous agent", "autonomous system"), the
UserPromptSubmit hook was silently creating autopilot-state.json on
completely unrelated prompts. The Stop hook (persistent-mode.mjs) then
treated autopilot as active and forced the assistant into a
"[AUTOPILOT - Phase: unspecified] Autopilot not complete. Continue working."
block loop that the user could not easily escape — state_clear from the
cancel skill did not target the per-project state path and the Stop hook
kept refreshing it.

Reproduction (before this patch):

  echo '{"hook_event_name":"UserPromptSubmit","cwd":"'"$(pwd)"'",
    "session_id":"x","prompt":"DriveVLA-W0: World Models Amplify Data
    Scaling Law in Autonomous Driving"}' | node scripts/keyword-detector.mjs

  -> emits [MAGIC KEYWORD: AUTOPILOT] and writes
     .omc/state/sessions/x/autopilot-state.json

After the patch the same prompt returns
{"continue":true,"suppressOutput":true} and no state file is created,
while an explicit "autopilot build a todo CLI" prompt still triggers
autopilot as expected.

Changes:
- scripts/keyword-detector.mjs: drop "autonomous" from the autopilot
  regex; add a comment explaining why, pointing at the already-aligned
  TS source and templates mjs.
- src/__tests__/keyword-detector-script.test.ts: add two regression
  tests — one negative ("Autonomous Driving" paper title must not
  activate autopilot state) and one positive control (explicit
  "autopilot ..." still writes state and emits the magic keyword).
2026-04-20 17:48:15 +09:00
Bellman
14447c450a Merge pull request #2736 from aryateja2106/feat/cursor-worker-support-dev
feat(team): add cursor-agent as 4th tmux worker type (executor-only)
2026-04-20 17:01:54 +09:00
Codex Review
4b0c5e9d55 Preserve runtime-guidance test compatibility with cursor agent type
The runtime guidance test mocked CLI availability with a narrower union than the
production signature now accepts. Widening the test helper to CliAgentType keeps
the assertion behavior unchanged while matching the cursor-aware contract.

Constraint: Fix only the CI TypeScript failure on PR #2736
Rejected: Change production signatures back to the older union | would broaden scope beyond the test-only fix
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep test doubles typed against shared agent contracts when provider unions expand
Tested: npx tsc --noEmit
Not-tested: Vitest runtime execution
2026-04-20 07:13:54 +00:00
Arya Teja Rudraraju
ee97676a28 feat(team): add cursor-agent as 4th tmux worker type (executor-only)
Adds cursor-agent (Cursor's Composer 2 REPL) as a first-class
\`omc team\` worker provider alongside claude/codex/gemini. Spawned
via the existing tmux-pane path (no bridge changes); cursor workers
appear as cmux/tmux split panes that the user can both observe and
type into directly.

## Changes

- \`src/team/model-contract.ts\`
  - Extend \`CliAgentType\` union with \`'cursor'\`.
  - Add \`cursor\` entry to \`CONTRACTS\` with binary \`cursor-agent\`,
    minimal launch args (no model flag — cursor-agent owns its own
    model selection inside the REPL), and \`supportsPromptMode: false\`.
- \`src/team/types.ts\`
  - Extend \`WorkerBackend\` with \`'tmux-cursor'\`.
  - Widen \`WorkerInfo.worker_cli\` to include \`'cursor'\`.
- \`src/team/capabilities.ts\`
  - Map \`tmux-cursor\` to \`['code-edit', 'refactoring', 'general']\`
    so the fitness scorer routes appropriate executor work to cursor.
- \`src/team/cli-detection.ts\`
  - Detect \`cursor-agent\` in \`detectAllClis()\`.
- \`src/team/worker-bootstrap.ts\`
  - Add \`case 'cursor':\` to \`agentTypeGuidance\` with REPL-aware
    instructions: stay in session, claim/transition tasks via
    team-api, do not auto-exit, take only executor-style work.
- \`src/team/cli-worker-contract.ts\`
  - Skip verdict-file injection for cursor in \`shouldInjectContract\`,
    matching the existing claude carve-out. Cursor REPL cannot perform
    write-verdict-and-exit.
- \`src/cli/team.ts\`
  - Add \`'cursor'\` to \`VALID_CLI_AGENT_TYPES\` and update help text.

## Why executor-only

Codex and Gemini set \`supportsPromptMode: true\` because they are
one-shot CLIs that run a single prompt and exit. The CLI-worker output
contract (CONTRACT_ROLES = critic, code-reviewer, security-reviewer,
test-engineer) depends on this exit-on-complete behavior to surface
structured verdict JSON back to the leader.

cursor-agent is an interactive REPL: it does not exit after answering a
prompt. Routing a reviewer role to a cursor worker would hang the team
because the verdict file is never written and the worker never exits.
This patch:

1. Marks \`supportsPromptMode: false\` on the cursor contract.
2. Updates \`shouldInjectContract\` to skip cursor (alongside claude).
3. Documents the constraint inline in the agentTypeGuidance.

Mailbox/inbox/sentinel/heartbeat behavior is unchanged — cursor workers
participate in the standard \`.omc/state/team/<team>/\` filesystem A2A
the same way claude workers do.

## Verification

- \`npx tsc --noEmit\` passes for all production sources.
- One residual error in \`src/__tests__/runtime-guidance-plan-ralph.test.ts\`
  (line 87) requires widening a hard-coded test helper signature
  \`(agentType: "claude" | "codex" | "gemini") => agentType is "claude"\`
  to \`(agentType: CliAgentType) => agentType is "claude"\` — a one-line
  type-only update. My local agent harness currently guards \`*.test.ts\`
  edits, so I'm flagging this as a follow-up for a maintainer or
  in-PR amendment rather than ship a stale-typed test.

## Usage

Once cmux PR #3031 (tmux-compat short-form expansion) lands, this
enables:

\`\`\`
omc team 1:cursor:executor "implement the X feature"
omc team 1:cursor,1:codex:critic "implement and review the Y change"
\`\`\`
2026-04-19 23:55:29 -07:00
Bellman
a54529135a Merge pull request #2732 from Yeachan-Heo/fix/issue-2731-self-improve-topic-scope
Fix self-improve topic-scoped path resolution
2026-04-19 18:15:53 +09:00
Codex Review
ce6972e523 Scope self-improve artifacts by topic for safer resumes
Add a dedicated resolver for self-improve artifact roots, teach validation to resolve scoped settings, and document the topic-scoped layout while preserving legacy flat-root fallback. The focused regression test covers default, explicit-topic, and legacy compatibility behavior without widening into unrelated self-improve changes.

Constraint: Keep scope narrow to self-improve topic-scoped path resolution and compatibility
Rejected: Reworking broader self-improve runtime behavior | unnecessary for issue #2731
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Route future self-improve path reads through the resolver instead of hardcoding .omc/self-improve/
Tested: npm run test:run -- src/cli/__tests__/self-improve-paths.test.ts
Tested: npm run build
Tested: npm run lint -- src/cli/__tests__/self-improve-paths.test.ts
Not-tested: Full self-improve runtime end-to-end loop execution
2026-04-19 09:03:07 +00:00
Codex Review
478093b631 chore(release): bump version to v4.13.0
Includes the autoresearch-as-a-skill migration (#2727) and the
company-context MCP contract scaffolding. Both ship as opt-in
experimental surfaces; minor bump reflects the new functionality
even though the features are not yet GA.

Constraint: autoresearch migration touches shared skill-state and persistent-mode plumbing — minor bump signals upgrade caution despite the experimental label
Confidence: high
Scope-risk: moderate
v4.13.0
2026-04-19 08:08:23 +00:00
Bellman
dd92b0b86c Merge pull request #2727 from Yeachan-Heo/feat/autoresearch-as-a-skill-v2
Reland: autoresearch-as-a-skill migration (fixes conflicts vs #2716)
2026-04-19 13:55:30 +09:00
Bellman
681101c137 Merge pull request #2728 from Gujiassh/fix/hooks-lib-sync-dev-clean-20260419
fix(installer): Copy hooks lib modules during update
2026-04-19 13:36:03 +09:00
Codex Review
59ee7dbc2d test(skills): sync autoresearch skill expectations 2026-04-19 04:34:46 +00:00
gujishh
1f6fee3478 build(installer): refresh hooks lib artifacts 2026-04-19 12:14:08 +09:00
Gujiassh
d0582516d5 fix(installer): copy hooks lib modules during update
Copy templates/hooks/lib into ~/.claude/hooks/lib for standalone installs and update reconciliation so .mjs hooks keep resolving stdin and atomic-write helpers after omc update.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-19 12:11:56 +09:00
Codex Review
d7f8d3d2bd chore(build): regenerate bridge/ and dist/ for autoresearch skill migration
Regenerate CLI and runtime bundles plus compiled TypeScript artifacts so
dist/ matches the skill-first autoresearch sources introduced in the two
preceding commits. Also captures incidental rebuilds for plugin-patterns
and other modules whose dist/ on dev was stale relative to its src/.

Constraint: dist/ is tracked-but-gitignored and must stay in sync with src/
Confidence: high
Scope-risk: narrow
Directive: Do not hand-edit dist/ or bridge/*.cjs; always run npm run build
2026-04-19 02:39:32 +00:00
Codex Review
4ff20e5655 Keep autoresearch enforcement visible across session state
Autoresearch still writes active mode state through the legacy shared path while stop hooks and exclusivity checks have moved toward session-aware enforcement. This commit adds a narrow compatibility bridge for autoresearch stop-hook checks and routes startup exclusivity through the registry's cross-session active-mode detection.

Constraint: Existing autoresearch lifecycle APIs do not yet thread session identifiers end-to-end.

Rejected: Full session-scoped autoresearch normalization now | broader runtime migration than the reviewed defects require.

Rejected: Generic readModeState session fallback | would weaken the session isolation contract for unrelated modes.

Confidence: high

Scope-risk: narrow

Directive: Keep the legacy bridge autoresearch-specific until a dedicated session-normalization migration retires shared autoresearch state.

Tested: npm test -- --run src/hooks/persistent-mode/stop-hook-blocking.test.ts src/autoresearch/__tests__/runtime.test.ts

Tested: npm run build

Tested: lsp_diagnostics_directory totalErrors=0

Not-tested: Full repository test suite
2026-04-19 02:37:26 +00:00
Codex Review
5c5835a26b Preserve the autoresearch skill migration for coordinated review
The team runtime requires a clean leader workspace before it can launch
review workers in dedicated worktrees. This checkpoint captures the
stateful autoresearch migration exactly as verified so the requested
team review can run against a stable branch tip.

Constraint: omx team refuses to launch from a dirty leader workspace
Rejected: Stash local changes temporarily | workers would review an outdated tree
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep omc autoresearch as a hard-deprecated shim; do not restore CLI runtime ownership without revisiting the skill-first contract
Tested: npm run build; targeted vitest suites; project diagnostics via lsp_diagnostics_directory
Not-tested: Full repository test suite; live cron/native scheduling integration
2026-04-19 02:36:57 +00:00
Bellman
68d304a9d7 Merge pull request #2724 from Yeachan-Heo/fix/issue-2723-deep-interview-threshold
Fix deep-interview threshold on native skill path
2026-04-19 01:55:35 +09:00
Codex Review
b3b4dd964a Align deep-interview threshold tests with raw-skill contract
CI exercises both the rendered skill template and the raw shipped SKILL.md.
The previous PR update changed the contract from an injected
ambiguityThreshold sentence to a placeholder/resolved-threshold step, so the
tests need to assert that contract directly. The static skill prose also needs
the portable config-dir notation required by the skill config-dir guard.

Constraint: Keep the static native-loader threshold fix intact
Rejected: Restore the old ambiguityThreshold = ... renderer sentence | would re-couple tests to renderer-only wording
Confidence: high
Scope-risk: narrow
Reversibility: clean
Tested: npx vitest run src/__tests__/skills.test.ts -t "loads deep-interview ambiguityThreshold from settings before state init and updates the announcement copy|refreshes cached deep-interview output when the configured threshold changes without requiring manual cache clearing|replaces all hardcoded 20%/0.2 threshold references in deep-interview template \(issue #2545\)|ships a config-aware deep-interview SKILL.md for native skill-loader paths \(issue #2723\)"
Tested: npx vitest run src/__tests__/auto-slash-aliases.test.ts src/__tests__/skills.test.ts src/skills/__tests__/skill-config-dir.test.ts -t "applies deep-interview threshold runtime injection in slash/materialized output|loads deep-interview ambiguityThreshold from settings before state init and updates the announcement copy|refreshes cached deep-interview output when the configured threshold changes without requiring manual cache clearing|replaces all hardcoded 20%/0.2 threshold references in deep-interview template \(issue #2545\)|ships a config-aware deep-interview SKILL.md for native skill-loader paths \(issue #2723\)|CLAUDE_CONFIG_DIR|total baseline should not increase"
Not-tested: Full test suite
Related: #2723
2026-04-18 16:43:54 +00:00
Codex Review
d3d47a7e7a Make deep-interview threshold explicit in shipped skill text
Claude Code native plugin skill loading can consume the bundled SKILL.md without passing through OMC renderBundledSkillBody. That left the shipped deep-interview skill with hardcoded 20%/0.2 guidance on qualified slash and Skill() paths even though OMC-rendered paths were fixed.

This change makes the bundled deep-interview SKILL.md self-describing for threshold resolution, replacing static 20%/0.2 guidance with runtime placeholders the model must resolve from settings before state init. The existing renderer still resolves those placeholders for OMC-owned paths, so current slash and materialized behavior stays intact.

Constraint: Native Claude plugin skill loading may bypass OMC render hooks
Rejected: Fix this only in renderBundledSkillBody | does not reach raw SKILL.md consumers
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep deep-interview threshold guidance config-aware in raw SKILL.md, not only in JS render transforms
Tested: npx vitest run src/__tests__/auto-slash-aliases.test.ts src/__tests__/skills.test.ts -t "applies deep-interview threshold runtime injection in slash/materialized output|replaces all hardcoded 20%/0.2 threshold references in deep-interview template \(issue #2545\)|ships a config-aware deep-interview SKILL.md for native skill-loader paths \(issue #2723\)"
Not-tested: End-to-end Claude Code native marketplace loader invocation outside repo tests
Related: #2723
2026-04-18 16:33:23 +00:00
Bellman
46da35e719 Merge pull request #2722 from 50sotero/fix/plugin-patterns-spawn-einval-windows
fix(hooks, windows): pass shell:true to plugin-patterns npm/npx spawns (#2721)
2026-04-19 00:25:27 +09:00
Victor de Andrade
a5def5f4e9 test(plugin-patterns): scope win32 shell-flag regex per call site
Codex review on #2722 correctly flagged that [\s\S]*? could cross call
boundaries — dropping the shell flag from runTypeCheck could still pass
if runTests or runLint kept theirs, because the lazy match would just
continue past the end of the target call until it found the flag in a
sibling options object.

Replaced [\s\S]*? with [^}]*? and anchored the match to this call's own
options-object boundaries (\{ … \}\s*\);), so each assertion fails
independently when its target call loses the flag. Keep the option
objects flat — nested braces would terminate [^}]*? prematurely.

Confidence: high
Scope-risk: narrow
Directive: If future option objects nest braces (e.g. { env: { … } }),
  switch these to balanced-scan or per-call substring extraction —
  [^}]*? stops at the first inner }.
Not-tested: Mutation-test that synthetically removes each shell flag
  and asserts each test fails independently.
2026-04-18 12:19:15 +02:00
Victor de Andrade
bfec081caf fix(hooks, windows): pass shell:true to plugin-patterns npm/npx spawns
Three sibling instances of the CVE-2024-27980 EINVAL class fixed in
v4.12.1 for the HUD wrapper, all in src/hooks/plugin-patterns/index.ts:

  - runTypeCheck  spawnSync('npx',  ['tsc', '--noEmit'], …)   L280
  - runTests      execFileSync('npm',['test'],            …)  L301
  - runLint       execFileSync('npm',['run','lint'],      …)  L337

On Windows + Node 20.12+ / 18.20+ / 21.7+, spawning npm/npx (which
resolve to npm.cmd / npx.cmd) via spawnSync/execFileSync without
shell:true throws EINVAL. All three callers are exported, re-exported
through src/hooks/index.ts, and invoked unconditionally by
runPreCommitChecks() in the same file, so every Windows user hitting
the plugin pre-commit flow trips these.

Each call now opts in to shell:true only on win32 so POSIX spawn
behavior is byte-for-byte identical to before.

Added three static-content assertions to plugin-patterns.test.ts under
a new `win32 spawn hardening (#2721)` describe. Static assertions are
the only regression guard available: CI runs Ubuntu-only (see
.github/workflows/ci.yml — every runs-on is ubuntu-latest), so the
existing behavioral tests (runLint "exit 0" etc.) never exercise the
broken Windows spawn path.

Follow-up to #2715 / PR #2719 (v4.12.1). Fixes #2721.

Constraint: CI is Ubuntu-only; behavioral tests cannot detect win32
  spawn regressions. Static content assertions are required as the
  regression guard.
Constraint: The three regex assertions must remain tolerant of inline
  option-object reformatting ([\s\S]*? + anchored to the literal args
  and the shell flag) so future lint-driven reflows don't false-fail.
Rejected: Centralize via a spawnWithShellOnWindows() helper | out of
  scope for a point fix; maintainer can land that separately.
Rejected: Replace execFileSync/spawnSync with exec() on Windows |
  reintroduces shell-injection risk and changes error semantics.
Rejected: Gate on a Node-version check instead of platform | the
  project's engines.node is >=20.0.0 and pre-20.12 is out of support
  scope, so platform gating is simpler and covers every supported Node.
Confidence: high
Scope-risk: narrow
Directive: Do not remove `shell: process.platform === 'win32'` from
  these call sites without either dropping Windows support or replacing
  with a helper that encapsulates the same mitigation.
Not-tested: A behavioral Windows-runner test that asserts EINVAL pre-fix
  and absence-of-EINVAL post-fix. Requires adding a windows-latest
  matrix to .github/workflows/ci.yml, out of scope for this patch.
2026-04-18 12:11:26 +02:00
Bellman
c4db4a883b Merge pull request #2720 from Yeachan-Heo/dev
chore(release): v4.12.1
v4.12.1
2026-04-18 18:48:08 +09:00
Codex Review
7ce1643f33 chore(release): bump version to v4.12.1
Bumps all version files to 4.12.1. Includes 1 new feature, 2 bug fixes,
and 9 other changes across 14 user-facing PRs since v4.12.0.

Highlights:
- feat(hooks): derive subagent model from ANTHROPIC_DEFAULT_*_MODEL env vars (#2683)
- fix(planning): stop OMX ralplan/team follow-ups from re-entering planning (#2718)
- fix(hud): Windows npm.cmd EINVAL fallback (#2719)
- fix(cli): Windows tmux login-shell wrapping (#2713)
- fix(state): OMC state root resolution for nested working directories (#2712)
- fix(team): omc-teams multi-repo Codex handoff contract (#2709)
- fix(hooks): ScheduleWakeup persistent-mode self-cancel on stop (#2698)
- fix(hud): prefer stdin rate limits; suppress read-spike fallback inflation (#2699, #2703)
- fix(installer): cache-root canonicalization prevents escape writes (#2706)
- refactor(skill-state): harden stateful-skills keyword detection + state init (#2701)
- docs: narrow company-context MCP interface to prompt-level contract (#2694)

Constraint: dist/ must be committed for plugin-marketplace git-clone installs (new test dist files force-added per release protocol)
Scope-risk: broad
Confidence: high

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 09:39:33 +00:00
Bellman
05b7c04115 Merge pull request #2719 from Yeachan-Heo/fix/issue-2715-hud-npm-cmd-einval
Fix Windows HUD npm.cmd EINVAL fallback
2026-04-18 18:29:39 +09:00
Bellman
dba5633f91 Merge pull request #2718 from Yeachan-Heo/fix/issue-2714-plan-state-loop
fix: stop OMX ralplan/team follow-ups from re-entering planning
2026-04-18 18:25:36 +09:00
Codex Review
ebf2706aa0 Credit documentation stewardship in the project README
Add devswha to the top README as a Document Specialist directly below the ambassadors section so the contributor roster reflects current documentation ownership and links to the correct GitHub profile.\n\nConstraint: Keep this as a docs-only change limited to README.md\nRejected: Adding the entry under Ambassadors | requested role is Document Specialist\nConfidence: high\nScope-risk: narrow\nReversibility: clean\nDirective: Keep contributor role links pointed at canonical GitHub profile URLs\nTested: README.md diff inspection on dev\nNot-tested: Render preview on GitHub
2026-04-18 09:18:39 +00:00
Codex Review
360ca59bba Credit documentation stewardship in the project README
Add devswha to the top README as a Document Specialist directly below the ambassadors section so the contributor roster reflects current documentation ownership and links to the correct GitHub profile.\n\nConstraint: Keep this as a docs-only change limited to README.md\nRejected: Adding the entry under Ambassadors | requested role is Document Specialist\nConfidence: high\nScope-risk: narrow\nReversibility: clean\nDirective: Keep contributor role links pointed at canonical GitHub profile URLs\nTested: README.md diff inspection on dev\nNot-tested: Render preview on GitHub
2026-04-18 09:18:38 +00:00
Codex Review
56513f28a2 Fix Windows HUD npm root discovery
The HUD wrapper needs npm root discovery to keep global installs reachable when cache and marketplace paths are absent. Node 20.12+ rejects direct npm.cmd execFileSync calls on Windows unless shell execution is enabled, so limit shell:true to the Windows npm.cmd probe while preserving the existing non-Windows npm exec behavior.

Constraint: Node 20.12+ requires shell execution for Windows .cmd/.bat child_process calls.

Rejected: Use execSync('npm root -g') everywhere | broader behavior change for non-Windows wrapper runtime.

Confidence: high

Scope-risk: narrow

Tested: npm test -- --run src/installer/__tests__/hud-wrapper-env.test.ts src/__tests__/hud-windows.test.ts src/__tests__/hud-wrapper-template-sync.test.ts src/__tests__/hud-marketplace-resolution.test.ts

Tested: npx tsc
2026-04-18 09:12:30 +00:00
Codex Review
93b72258d7 Prevent post-ralplan team follow-ups from looping back into planning
OMX deep-interview and ralplan flows can write approved artifacts and state
under .omx, but the post-ralplan shortcut path only recognized .omc plan
artifacts, only parsed omc launch hints, and returned early before short
follow-up prompts like "team" could reach the approved execution gate.

This narrows the fix to the state-transition detection path: planning artifact
resolution now reads both .omc and .omx plan roots, launch hints accept OMX
commands, and keyword-detector checks approved follow-ups before the no-match
fast path while recognizing OMX ralplan state files.

Constraint: Team keyword auto-detection remains disabled to avoid worker respawn loops
Rejected: Re-enable generic team keyword detection | would broaden behavior beyond the broken post-ralplan transition
Rejected: Rewrite ralplan state storage globally to .omx only | wider migration than needed for issue #2714
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep approved follow-up detection aligned with both OMC and OMX artifact/state namespaces unless runtime ownership is fully unified
Tested: npx vitest run src/planning/__tests__/artifacts.test.ts src/team/__tests__/followup-planner.test.ts src/__tests__/keyword-detector-script.test.ts
Not-tested: Full repository test suite
Related: #2714
2026-04-18 09:01:49 +00:00
Bellman
43f8cc3505 Merge pull request #2713 from Yeachan-Heo/fix/issue-2711-windows-login-shell
Fix Windows tmux login-shell wrapping for issue #2711
2026-04-18 17:58:18 +09:00
Codex Review
4975462039 Preserve POSIX tmux preflight on MSYS2 Windows shells
The first #2711 fix correctly stopped native Windows shells from receiving
Unix-only exec wrapping, but the preflight path in runClaudeOutsideTmux
still keyed off process.platform alone. That caused MSYS2/Git Bash sessions
on Windows to skip the existing POSIX sleep/tcflush preflight even though
they still use login-shell wrapping.

Constraint: Keep native Windows COMSPEC handling intact
Constraint: Preserve existing POSIX/MSYS2 login-shell behavior without broad launch refactors
Rejected: Revert the Windows-specific path entirely | would reintroduce the original PowerShell failure
Rejected: Add separate MSYS2-specific launch branches everywhere | broader drift than needed
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: When branching shell launch behavior, key off native-Windows-vs-POSIX shell semantics, not process.platform by itself
Tested: npm test -- --run src/cli/__tests__/tmux-utils.test.ts src/cli/__tests__/launch.test.ts src/cli/__tests__/autoresearch-guided.test.ts
Tested: npm run build:cli
Not-tested: Live tmux launch on a real MSYS2/Git Bash Windows host
Related: #2711
Related: #2713
2026-04-18 08:47:00 +00:00
Codex Review
8eabb2be16 Prevent Windows tmux launches from emitting Unix-only exec wrappers
Native Windows shells were receiving Unix login-shell syntax from
wrapWithLoginShell and related tmux launch paths, causing PowerShell/cmd
sessions to fail before Claude or autoresearch setup could start. This
change keeps the existing POSIX/MSYS2 login-shell behavior, but routes
native Windows paths through COMSPEC-compatible command building and
Windows-safe env injection.

Constraint: Preserve existing POSIX login-shell + rc-sourcing behavior
Constraint: Keep the fix narrow to wrapWithLoginShell and directly related launch/setup paths
Rejected: Disable login-shell wrapping everywhere on win32 | would regress MSYS2/Git Bash support
Rejected: Broad tmux contract rewrite | unnecessary drift beyond issue #2711
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If future tmux launch paths add inline env prefixes, use the platform-aware tmux command builders instead of raw Unix shell syntax
Tested: npm test -- --run src/cli/__tests__/tmux-utils.test.ts src/cli/__tests__/launch.test.ts src/cli/__tests__/autoresearch-guided.test.ts
Tested: npm run build:cli
Not-tested: Live tmux launch on a real Windows host
Related: #2711
2026-04-18 08:24:45 +00:00
Bellman
c90aadab90 Merge pull request #2712 from Yeachan-Heo/fix/issue-2710-omc-state-root
Fix OMC state root resolution for nested working directories
2026-04-18 17:15:31 +09:00
Codex Review
8bcfb1d4ec Preserve temp-directory state while fixing nested git subdirs
The earlier root canonicalization reused validateWorkingDirectory, which is
correct for MCP tool entrypoints but too strict for direct mode-state I/O
callers used by tests and temp workspaces. Narrow the fix so mode-state-io
collapses only directories that are inside a git worktree back to that
worktree root, while leaving non-git temp directories untouched.

Constraint: Direct mode-state-io callers must continue to work in standalone temp directories outside the repo root
Rejected: Keep validateWorkingDirectory in mode-state-io | rejects legitimate temp workspaces and breaks session-state cleanup tests
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Use git-root canonicalization here only for nested worktree paths; keep stricter trusted-root enforcement at MCP/tool boundaries
Tested: npx vitest run src/lib/__tests__/mode-state-io.test.ts src/hooks/session-end/__tests__/mode-state-cleanup.test.ts src/hooks/session-end/__tests__/subdirectory-cwd.test.ts src/hooks/session-end/__tests__/team-cleanup.test.ts
Tested: npx vitest run src/hooks/persistent-mode/__tests__/ralph-verification-flow.test.ts src/hooks/persistent-mode/__tests__/rate-limit-stop.test.ts src/hooks/persistent-mode/__tests__/skill-state-stop.test.ts src/hooks/persistent-mode/__tests__/team-ralplan-stop.test.ts
Not-tested: Full repo test suite
2026-04-18 07:59:07 +00:00
Codex Review
d7508bcc5a Resolve OMC state paths from the real project root
Mode-state I/O was still resolving .omc state paths from the caller's raw
working directory, which let nested cwds create state under subdirectories
instead of the owning git worktree root. Canonicalize the root through
validateWorkingDirectory before resolving, scanning, reading, writing, or
clearing state paths, and add regression coverage for nested cwd calls.

Constraint: OMC MCP tools must keep honoring the trusted worktree-root policy used elsewhere
Rejected: Fix only state_write tool paths | would leave read/clear and direct mode-state-io callers inconsistent
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep mode-state-io path resolution aligned with validateWorkingDirectory so nested cwds cannot recreate local .omc state
Tested: npx vitest run src/lib/__tests__/mode-state-io.test.ts
Tested: npx tsc --noEmit
Not-tested: Full repo test suite
2026-04-18 07:53:30 +00:00
Bellman
1b2e60969c Merge pull request #2709 from Yeachan-Heo/issue-2708-omc-teams-multi-repo-cwd
Fix omc-teams multi-repo Codex handoff contract
2026-04-18 03:25:14 +09:00
Codex Review
d7d770e77a Preserve multi-repo workspace context for CLI team handoffs
`/omc-teams` already delegates to `omc team`, whose workers share one cwd. The compatibility skill only showed the current-repo launch form, so plans stored in one repo could spawn Codex workers in that repo while target repos lived in siblings. The skill now makes the workspace-root/absolute-plan-path contract explicit and uses the existing `--cwd` support instead of adding runtime heuristics.\n\nConstraint: `omc team` runtime remains single-working-directory\nRejected: Auto-infer workspace roots in runtime | brittle path heuristics and broad behavior drift\nConfidence: high\nScope-risk: narrow\nDirective: Keep multi-repo `/omc-teams` launches anchored to a shared workspace root unless the runtime grows explicit multi-workspace support\nTested: npm run test:run -- src/__tests__/skills.test.ts\nTested: npm run build:cli\nNot-tested: live tmux Codex launch across sibling repositories
2026-04-17 18:17:14 +00:00
Bellman
c74eddf348 Merge pull request #2696 from myro-june/docs/readme-discord-link
docs: add Discord link to navigation in all README translations
2026-04-18 01:11:26 +09:00
Bellman
bedf33ee76 Merge pull request #2706 from shaun0927/fix/issue-2705-cache-root-canonicalization
fix(installer): reject cache-repair roots that escape plugins/cache
2026-04-18 00:46:34 +09:00
Bellman
dc48557033 Merge pull request #2701 from Yeachan-Heo/refactor/stateful-skills-state-init
refactor(skill-state): harden stateful-skills keyword detection and state init
2026-04-18 00:38:00 +09:00
Yeachan-Heo
8cac6bde4d Keep PR #2701 focused on workflow-slot state changes
The original branch update bundled unrelated generated dist churn alongside the
intended workflow-slot/state-init source changes. This follow-up commit reverts
only the generated artifacts that do not correspond to the touched source areas,
so the PR diff stays aligned with the bridge, keyword-detector, persistent-mode,
mode-registry, skill-state, mode-names, and state-tools changes.

Constraint: GitHub PR #2701 must update via the real head branch instead of a local-only approval path
Constraint: Keep the follow-up diff limited to generated artifacts that shrink the existing PR scope
Rejected: Force-push a rewritten replacement commit | unnecessary history rewrite for a narrow cleanup-only fix
Rejected: Keep all dist outputs from 56718e05 | preserves unrelated churn that blocks review
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Regenerate and commit dist only for source areas that remain in the final PR diff
Tested: Branch diff review vs dev after cleanup; targeted verification pending on final commit SHA
Not-tested: Full project-wide build/lint suite for this cleanup-only dist follow-up
2026-04-17 15:33:50 +00:00
JunghwanNA
9afd81aec3 Prevent cache repair from writing outside the plugin cache root
The cache-repair path trusted raw installPath strings from installed_plugins.json, so an OMC entry containing ../ segments could still pass the existing prefix check and receive a full payload sync outside plugins/cache. This narrows the fix to canonical containment in the repair predicate and adds an issue-scoped regression test for the escape path.

Constraint: Keep the repair flow behavior unchanged for valid cache-installed OMC roots
Rejected: Broaden path hardening across unrelated installer flows in the same patch | would enlarge review scope beyond the verified repair bug
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Any future cache-root checks should compare canonical paths, not normalized raw strings
Tested: npm run build; ./node_modules/.bin/vitest run src/installer/__tests__/plugin-cache-sync.test.ts src/__tests__/auto-update.test.ts src/__tests__/installer-omc-reference.test.ts; ./node_modules/.bin/tsc --noEmit --pretty false; ./node_modules/.bin/eslint src/installer/index.ts src/installer/__tests__/plugin-cache-sync.test.ts; direct local reproduction of syncInstalledPluginPayload escape path before and after fix
Not-tested: Full repository vitest suite; src/__tests__/installer-plugin-agents.test.ts timed out in this environment during unrelated runs
2026-04-18 00:33:02 +09:00
Bellman
ada552f8ba Merge pull request #2694 from Yeachan-Heo/issue-2692-company-context-mcp-interface
Narrow company-context MCP interface to prompt-level contract
2026-04-17 23:40:34 +09:00
Codex Review
f6b3ff2bda Close the remaining PR #2694 documentation acceptance blockers
The original company-context interface change landed with the right code and
skill-surface updates, but review correctly held the PR until the missing
acceptance-doc pieces were explicit. This follow-up adds the settings-schema
page entry for companyContext and records the issue's requested ~5% prompt-
directive miss-rate / residual-risk language without widening runtime scope.

Constraint: Keep the follow-up documentation-only and avoid runtime behavior changes
Constraint: Satisfy issue #2692 acceptance criteria exactly enough for merge review
Rejected: Expand the fix into broader doc cross-linking or runtime wording cleanup | unnecessary scope growth for a blocked PR follow-up
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep future company-context changes aligned with the current .claude/omc.jsonc / ~/.config/claude-omc/config.jsonc config surface unless the runtime contract changes first
Tested: npx vitest run src/config/__tests__/loader.test.ts -t "company context configuration"
Tested: git diff --check -- docs/company-context-interface.md docs/settings-schema.md
Tested: local link existence check for docs/settings-schema.md -> ./company-context-interface.md
Tested: lsp_diagnostics on both changed docs files reported 0 errors
Tested: architect verification APPROVED
Not-tested: Full repo build/test suite (intentionally skipped for docs-only narrow follow-up)
2026-04-17 14:24:21 +00:00
Bellman
61e75987d5 Merge pull request #2698 from Yeachan-Heo/issue-2693-schedulewakeup-cancel-reentry
Fix ScheduleWakeup persistent-mode self-cancel on stop
2026-04-17 22:47:20 +09:00
Bellman
9a1d484f1f Merge pull request #2699 from Yeachan-Heo/issue-2695-hud-rate-limits-stdin
Prefer stdin rate limits over cold-start HUD API fetches
2026-04-17 22:25:47 +09:00