Skip to content

fix(codex-channel): resolve package modules via MURMUR_ROOT so synced channel server starts - #95

Closed
aPoWall wants to merge 1 commit into
alexfrmn:mainfrom
aPoWall:fix/codex-channel-mjs-dynamic-imports
Closed

fix(codex-channel): resolve package modules via MURMUR_ROOT so synced channel server starts#95
aPoWall wants to merge 1 commit into
alexfrmn:mainfrom
aPoWall:fix/codex-channel-mjs-dynamic-imports

Conversation

@aPoWall

@aPoWall aPoWall commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Problem

scripts/codex-murmur-channel-autostart.sh syncs murmur-mcp-channel-server.mjs out of the repo into ~/.codex/mcp-channel-server/index.mjs. The server's static relative imports (../packages/broker-nats/dist/..., core, security) then resolve against ~/.codex/, where no packages/ tree exists. MCP initialize closes the connection and Codex refuses to start:

Fatal error: Failed to initialize session: required MCP servers failed to initialize:
murmur-channel: handshaking with MCP server failed: connection closed: initialize response

Fix

  • Resolve broker-nats / core / security through dynamic await import() rooted at MURMUR_ROOT, mirroring the existing lease.mjs pattern — so the file works from any location it's synced to.
  • Use a POSIX date -u +%Y-%m-%dT%H:%M:%SZ timestamp in the autostart log (macOS date has no -Is).

Verified: full MCP handshake (initializetools/list) succeeds from the synced ~/.codex/mcp-channel-server/index.mjs, and the mac-alex ↔ ws-povalyaev channel comes up clean.

🤖 Generated with Claude Code

…imestamp

The channel MCP server is synced out of the repo tree into
~/.codex/mcp-channel-server/index.mjs by the autostart script. Its static
relative imports (../packages/*/dist/...) then resolve against ~/.codex,
where no packages/ exists, so MCP `initialize` closes the connection and
Codex refuses to start (required MCP server failed to initialize).

Switch broker-nats / core / security to dynamic `await import()` resolved
through MURMUR_ROOT, mirroring the existing lease.mjs pattern, so the file
works from any location. Also use a POSIX `date -u +%Y-%m-%dT%H:%M:%SZ`
timestamp in the autostart log (macOS `date` has no `-Is`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aPoWall aPoWall closed this by deleting the head repository Jul 4, 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