Skip to content

fix(detect): wait for MCP initialize before platform detect - #1070

Open
tahsinrahman wants to merge 1 commit into
mksglu:nextfrom
tahsinrahman:fix/omp-detect-handshake
Open

fix(detect): wait for MCP initialize before platform detect#1070
tahsinrahman wants to merge 1 commit into
mksglu:nextfrom
tahsinrahman:fix/omp-detect-handshake

Conversation

@tahsinrahman

Copy link
Copy Markdown

What / Why / How

OMP MCP was mis-detected as Claude Code. server.connect() returns before initialize, so getClientVersion() is empty and ~/.claude beat ~/.omp in the config-dir fallback.

Detect on server.server.oninitialized so omp-coding-agent clientInfo wins. Probe dedicated CLI agent dirs (.kiro / .omp / .pi / .qwen / .kimi / .openclaw / .codex) before ~/.claude, same #542/#774 pattern as Cursor. Honest OMP adapter comments: hooks exist, this adapter is MCP-only.

Affected platforms

  • Claude Code
  • Cursor
  • VS Code Copilot (GitHub Copilot)
  • JetBrains Copilot
  • Gemini CLI
  • Qwen Code
  • OpenCode
  • KiloCode
  • Codex CLI
  • OpenClaw (Pi Agent)
  • Pi
  • Kiro
  • Antigravity
  • Zed
  • All platforms

Also: OMP, Qwen, Kimi (CLI agent dirs now outrank ~/.claude).

Test plan

  • tests/adapters/detect-config-dir.test.ts: ~/.omp beats ~/.claude
  • tests/adapters/detect-after-initialize.test.ts: detect waits for oninitialized
  • npx vitest run tests/adapters/detect-config-dir.test.ts tests/adapters/detect-after-initialize.test.ts tests/adapters/omp.test.ts — 70 passed
  • npx tsc -b --noEmit — clean

Checklist

  • Tests added/updated (TDD: red → green)
  • Targeted tests pass
  • npx tsc -b --noEmit passes
  • Docs updated if needed (README, platform-support.md)
  • No Windows path regressions (forward slashes only)
  • Targets next branch (unless hotfix)

OMP MCP was mis-detected as Claude Code: getClientVersion() is empty
right after connect(), and ~/.claude beat ~/.omp in the config-dir
fallback. Detect on oninitialized; probe CLI agent dirs first.
@tahsinrahman
tahsinrahman force-pushed the fix/omp-detect-handshake branch from 9e7bf2b to 6cdd60c Compare August 21, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant