You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCP tool results (e.g., Playwright take_screenshot) return attachments without id, sessionID, and messageID fields, causing downstream Zod validation failure on MessageV2.FilePart.
Steps to Reproduce
Configure an MCP server (e.g., Playwright MCP)
Use a tool that returns file attachments (e.g., take_screenshot)
The attachment is missing id, sessionID, and messageID fields
Zod parse error occurs and the tool result is lost
Expected Behavior
MCP tool attachments should include id, sessionID, and messageID fields, consistent with built-in tool attachments.
Actual Behavior
The MCP tool path in prompt.ts explicitly omits these fields (Omit<MessageV2.FilePart, "id" | "sessionID" | "messageID"> at L874), while built-in tools correctly map them (L808-814).
Additional Context
Built-in tools already have the correct mapping at packages/opencode/src/session/prompt.ts lines 808-814. The fix is to apply the same .map() to MCP tool attachments.
Activity