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
{{ message }}
Repository navigation
NewSessionRequest silently drops McpServerHttp items (no error) #203
SDK:agent-client-protocol 1.0.0 (same on main today), Python 3.12, Windows 11.
What happens
acp.schema has both McpServerHttp (no type field) and HttpMcpServer(McpServerHttp) with type: Literal["http"]. NewSessionRequest.mcp_servers only accepts the tagged variants, and skip_invalid_items (added in #117 for lenient deserialization) silently drops a McpServerHttp instance. The agent then starts with no MCP servers, and nothing tells the caller why.
We hit this driving codex-acp through conn.new_session(..., mcp_servers=[McpServerHttp(...)]): Codex ran without its MCP server, and the only clue was a missing tool.
Lenient skipping makes sense for wire data from a newer peer. For a model instance built in local code, a ValidationError (or at least a warning) would surface the mistake.
Possible fix
In _deserialize.skip_invalid_items, re-raise when the failing item is already a BaseModel instance; raw dicts from the wire keep today's lenient behaviour. Happy to send a PR with tests.
Activity