Skip to content

fix(pi): detect package server via PI_CODING_AGENT#778

Merged
mksglu merged 1 commit into
mksglu:nextfrom
NgoQuocViet2001:fix/pi-platform-detect-coding-agent
Jun 4, 2026
Merged

fix(pi): detect package server via PI_CODING_AGENT#778
mksglu merged 1 commit into
mksglu:nextfrom
NgoQuocViet2001:fix/pi-platform-detect-coding-agent

Conversation

@NgoQuocViet2001

Copy link
Copy Markdown
Contributor

Fixes #760. Thanks for the clean repro @jetnet.

This treats PI_CODING_AGENT=true as a high-confidence Pi signal, so Pi's package-spawned MCP server does not fall through to the stale ~/.claude directory heuristic.

Validation:

  • npm run typecheck
  • npm run assert-bundle
  • vitest run tests/adapters/detect.test.ts tests/adapters/detect-config-dir.test.ts tests/adapters/pi-adapter.test.ts tests/adapters/pi-mcp-bridge-env-scrub.test.ts tests/adapters/pi-mcp-bridge.test.ts
  • source + bundled MCP e2e on Windows with both ~/.pi and ~/.claude; ctx_index wrote under ~/.pi, not ~/.claude

Note: I also tried full npm test locally. It still has unrelated Windows/Codex-shell failures outside this patch (symlink EPERM, Rust linker, shell env/PWD), so I used the focused Pi/detect path plus e2e here.

cc @mksglu

@mksglu
mksglu merged commit a67c4fb into mksglu:next Jun 4, 2026
5 checks passed
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.

2 participants