Skip to content

fix: repo-launched MCP server forces repo mode (D-116)#48

Merged
George-iam merged 1 commit intomainfrom
fix/repo-mode-no-workspace-autodetect-20260407
Apr 7, 2026
Merged

fix: repo-launched MCP server forces repo mode (D-116)#48
George-iam merged 1 commit intomainfrom
fix/repo-mode-no-workspace-autodetect-20260407

Conversation

@George-iam
Copy link
Copy Markdown
Contributor

Summary

  • When MCP server cwd has .git/, force isWorkspace=false — no parent workspace auto-detection
  • Applies to server.ts (startup), cli.ts (setup command), context.ts (storage header)
  • Ensures sessions, audit logs, hooks all write to repo .axme-code/ instead of parent workspace
  • Implements D-116

Context

B-001 E2E test found that sessions/audit-logs/handoff were stored at workspace level even when the MCP server was launched from a repo directory. Root cause: detectWorkspace() would detect the parent workspace, switching to workspace mode. Now, presence of .git/ forces repo mode.

Test plan

  • npm run lint — clean
  • npm run build — clean
  • npm test — 413 tests, 0 failures
  • Run axme-code setup from repo dir → verify repo-level .claude/settings.json and .mcp.json
  • Open new VS Code window from repo → verify sessions go to repo .axme-code/

🤖 Generated with Claude Code

…uto-detection

When cwd has .git/, force isWorkspace=false in server.ts, cli.ts setup,
and context.ts header. Ensures sessions, audit logs, and hooks write to
repo .axme-code/ instead of parent workspace. Implements D-116.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@George-iam George-iam merged commit ae855d1 into main Apr 7, 2026
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