Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0400144be4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| calls = event.payload.get("calls") | ||
| if isinstance(calls, list) and calls: | ||
| call = calls[0] | ||
| else: |
There was a problem hiding this comment.
Emit all tool call notifications for multi-call events
When a TOOL_PROCESS payload includes multiple calls (the tool parser can emit payload={"calls": [call1, call2, ...]} when a response contains several tool calls at once), this code only selects calls[0], so _tool_event_notifications emits a notification for the first call and silently drops the rest. That means MCP clients won’t receive tool-call notifications for subsequent calls in the same event, breaking multi-tool responses; this scenario is triggered whenever the model outputs multiple tool calls in a single chunk.
Useful? React with 👍 / 👎.
Summary
_tool_call_event_iteminsrc/avalan/server/routers/mcp.pyto handleEventType.TOOL_PROCESSpayloads that providecallsas a list by extracting the first call so MCP tool-call notifications are emitted for streaming tool calls.tests/server/mcp_router_test.pyfor thepayload={'calls': [call]}variant to ensure the new code path is exercised.Testing
make lint, which reformatted files butmypyfailed due to a missing plugin error:pyproject.toml:1:1: error: Error importing plugin "pydantic.mypy": No module named 'pydantic'.poetry run pytest --verbose -sand the test suite passed:1566 passed, 11 skipped, 5 warnings.Codex Task