Skip to content

MCP connection intermittently aborts with 'AbortError: This operation was aborted' #13

@capn-fantastic

Description

@capn-fantastic

Summary

During extended Claude Code sessions using Nexus MCP tools, the connection intermittently fails with AbortError: This operation was aborted. Tool calls hang indefinitely or return the abort error. Restarting the Claude Code CLI resolves the issue temporarily.

Environment

  • OS: Windows 11 (10.0.22631)
  • Obsidian: Recent version
  • Nexus Plugin: Current release
  • MCP Client: Claude Code CLI v2.1.0
  • Shell: Git Bash (MINGW64)

Symptoms

  1. Tool calls hang: MCP tool calls (e.g., contentManager.write, contentManager.update) stop responding mid-operation
  2. Abort error: When the hang resolves or is interrupted, the error shown is:
    MCP error -32001: AbortError: This operation was aborted
    
  3. Unpredictable timing: Happens after variable periods — sometimes after many successful calls, sometimes after just a few
  4. Session continues otherwise: The CLI itself remains responsive; only MCP tool calls are affected

Reproduction

Difficult to reproduce deterministically. The pattern observed:

  1. Start Claude Code session with Nexus MCP connected
  2. Make multiple tool calls over an extended session (30+ minutes)
  3. At some point, a tool call will hang or abort
  4. Subsequent tool calls also fail until CLI is restarted

Workaround

Restarting the Claude Code CLI resolves the issue. The vault data is unaffected — only the MCP connection needs to be re-established.

Observations

  • The issue seems more likely to occur during longer sessions
  • Starting with a simple "warm-up" call (e.g., storageManager.list with empty path) before complex operations may reduce frequency, but doesn't eliminate the issue
  • No obvious correlation with specific tool types — affects reads, writes, and updates

Possible Causes (Speculation)

  • MCP stdio connection timeout or buffer issue
  • Connection state becoming stale over time
  • Resource cleanup not happening properly between calls

Relevant Log

The error appears in Claude Code's output as:

<error>MCP error -32001: AbortError: This operation was aborted</error>

No crash or memory warning — just the connection abort.


Happy to provide more details or test potential fixes. The plugin is otherwise excellent — this is just a rough edge during longer sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions