Skip to content

Fix STDIO transport to handle batch messages from Message.decode#242

Open
johns10 wants to merge 2 commits intocloudwalk:mainfrom
johns10:fix/stdio-batch-messages
Open

Fix STDIO transport to handle batch messages from Message.decode#242
johns10 wants to merge 2 commits intocloudwalk:mainfrom
johns10:fix/stdio-batch-messages

Conversation

@johns10
Copy link

@johns10 johns10 commented Jan 26, 2026

Summary

  • Fix BadMapError when receiving messages from MCP clients like Claude Code
  • Message.decode/1 returns {:ok, messages} where messages is always a list, but process_message/2 expects a single map
  • The fix iterates over the messages list instead of passing the list directly

Test plan

  • Tested with Claude Code MCP client - successfully connects and handles initialize message
  • Previous behavior caused immediate crash with BadMapError: expected a map, got: [%{...}]

🤖 Generated with Claude Code

johns10 and others added 2 commits July 26, 2025 01:21
Message.decode/1 returns {:ok, messages} where messages is always a list,
but process_message/2 expects a single map. This caused a BadMapError when
receiving messages from clients like Claude Code.

The fix iterates over the messages list instead of passing the list directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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