LearnNewsExamplesServices
Frontmatter
id9977
titlefix: MCP Infrastructure Stability — Stdout Pollution, Crash Recovery, & Triage Mandate
stateClosed
labels
bugaiarchitecture
assigneestobiu
createdAtApr 13, 2026, 6:22 PM
updatedAtApr 14, 2026, 12:31 AM
githubUrlhttps://github.com/neomjs/neo/issues/9977
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 13, 2026, 6:35 PM

fix: MCP Infrastructure Stability — Stdout Pollution, Crash Recovery, & Triage Mandate

Closed v13.0.0/archive-v13-0-0-chunk-4 bugaiarchitecture
tobiu
tobiu commented on Apr 13, 2026, 6:22 PM

Summary

This ticket formalizes critical infrastructure stability patches discovered during a localized breakdown of the Memory Core and Neural Link MCP servers. The standard JSON-RPC stdio transport was corrupting due to raw console output, and missing class methods were causing hard crashes during tool dispatch.

Architectural Changes

1. The Infrastructure Triage Mandate (AGENTS_STARTUP.md)

Previously, agents were instructed to ignore healthcheck failures and proceed on a degraded Golden Path. This has been explicitly reversed. If core ecosystem servers fail, agents are now strictly mandated to immediately pivot into diagnostic and self-healing workflows. Executing roadmap tasks with a sick framework ecosystem is now forbidden.

2. Eliminating stdout JSON-RPC Corruption

The MCP standard transport relies on pure JSON over stdout. Services logging raw text via console directly break the client parsers:

  • Memory Core / SessionService: Replaced console.log with logger.info inside the asynchronous Map-Reduce summarization pipeline.
  • Neural Link / RecorderService: Imported the centralized logger.mjs and refactored all console.error and console.warn statements to route through the standard logger.

3. Neural Link Runtime Crash Recovery

  • ConnectionService.mjs: Implemented the missing getDefaultSessionId() method. The toolService.mjs dispatch layer implicitly expected this method to exist to support auto-targeting. Its absence caused ConnectionService.getDefaultSessionId is not a function during any Neural Link tool execution where sessionId was omitted.

Acceptance Criteria

  • All MCP servers respond with healthy via the healthcheck tool.
  • Zero invalid character 'R' looking for beginning of value JSON parse errors in MCP client logs.
  • Neural Link Bridge dual-connections (two independent Antigravity nodes) load strictly via logger trace outputs instead of raw stdout.
tobiu added the bug label on Apr 13, 2026, 6:22 PM
tobiu added the ai label on Apr 13, 2026, 6:22 PM
tobiu added the architecture label on Apr 13, 2026, 6:22 PM
tobiu referenced in commit 3351e52 - "fix: MCP Infrastructure Stability — Stdout Pollution & Crash Recovery (#9977)" on Apr 13, 2026, 6:22 PM
tobiu cross-referenced by PR #9978 on Apr 13, 2026, 6:23 PM
tobiu closed this issue on Apr 13, 2026, 6:35 PM
tobiu referenced in commit 4e9227c - "fix: MCP Infrastructure Stability — Stdout Pollution & Crash Recovery (#9977) (#9978)" on Apr 13, 2026, 6:35 PM
tobiu assigned to @tobiu on Apr 14, 2026, 12:31 AM