---
id: 10187
title: Diagnose MCP concurrency with lsof/fuser
state: CLOSED
labels:
  - enhancement
  - ai
  - architecture
assignees:
  - neo-opus-ada
createdAt: '2026-04-22T18:32:21Z'
updatedAt: '2026-04-22T19:41:56Z'
githubUrl: 'https://github.com/neomjs/neo/issues/10187'
author: neo-gemini-pro
commentsCount: 0
parentIssue: 10186
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy: []
blocking: []
closedAt: '2026-04-22T19:41:56Z'
---
# Diagnose MCP concurrency with lsof/fuser

# Context
The memory-core shared SQLite WAL database is accessed by up to 20 concurrent Node processes across Claude Desktop, Claude Code, and Antigravity. We need empirical tooling to prove this concurrency and count the PIDs holding the file open.

# The Problem
We lack a simple, scriptable way to diagnose cross-harness SQLite file handles.

# The Architectural Reality
The SQLite file resides at `.neo-ai-data/sqlite/memory-core-graph.sqlite`.

# The Fix
Add a `diagnoseMcpConcurrency.mjs` script under `ai/scripts/` using `lsof` or `fuser` to list all processes holding `memory-core-graph.sqlite` open (including count, PIDs, and parent harnesses). The script should be read-only and not attempt to kill processes.

# Acceptance Criteria
- [ ] Create `ai/scripts/diagnoseMcpConcurrency.mjs`
- [ ] Running the script with multiple agents active reports N≥2 Node processes holding the SQLite file open.

# Out of Scope
- Automatically killing or managing the external processes.

# Related
- Parent Epic: #10186

# Handoff Retrieval Hints
- `query_raw_memories(query="cross-harness MCP singleton cache divergence")`
- `query_summaries(query="MCP concurrency Claude Code Antigravity")`
- Commit range anchor: PR #10185 merged

## Timeline

- 2026-04-22T18:32:22Z @neo-gemini-pro added the `enhancement` label
- 2026-04-22T18:32:23Z @neo-gemini-pro added the `ai` label
- 2026-04-22T18:32:23Z @neo-gemini-pro added the `architecture` label
- 2026-04-22T18:32:31Z @neo-gemini-pro added parent issue #10186
- 2026-04-22T19:20:18Z @neo-opus-ada assigned to @neo-opus-ada
- 2026-04-22T19:26:51Z @neo-opus-ada cross-referenced by PR #10197
- 2026-04-22T19:41:57Z @tobiu referenced in commit `68a091a` - "feat(memory-core): add diagnoseMcpConcurrency script (#10187) (#10197)

Co-authored-by: tobiu <tobiasuhlig78@gmail.com>"
- 2026-04-22T19:41:57Z @tobiu closed this issue
- 2026-04-22T20:04:50Z @neo-gemini-pro cross-referenced by PR #10201
- 2026-04-22T20:07:11Z @neo-gemini-pro cross-referenced by PR #10202
- 2026-04-22T20:36:32Z @neo-opus-ada cross-referenced by PR #10204
- 2026-04-22T20:45:05Z @neo-gemini-pro cross-referenced by #10206
- 2026-04-23T15:15:17Z @neo-opus-ada cross-referenced by PR #10242

