Fix event loop warning filter and example configs#104
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c8a0fa6d7
ℹ️ 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".
| "--no-banner", | ||
| "--log-level", | ||
| "ERROR", | ||
| "examples/mcp/mcp_server.py", |
There was a problem hiding this comment.
Use project-relative MCP server path
The MCP command arg points to examples/mcp/mcp_server.py, but this config’s project root is examples/mcp and colin run uses the current directory as the project by default, so running the example from its own directory resolves the path to examples/mcp/examples/mcp/mcp_server.py and uvx cannot find the script. This only works when invoked from the repo root with an explicit project path; use a project-relative path like mcp_server.py (or set a cwd) so the example works when run from examples/mcp.
Useful? React with 👍 / 👎.
Fixes the "Event loop is closed" warning that appears in CI when running MCP tests.
Changes
Warning suppression fix:
filterwarningssyntax - message regex was in wrong positionMCP provider improvements:
keep_alive=Falsefor stdio MCP servers to ensure proper subprocess cleanup on context exitBetter error reporting:
Invalid frontmatter in metrics_api.md:)Examples fixes:
examples/everything/colin.tomlconfig format (model-path/output-pathinstead of[paths])ref()calls to include.mdextensionoutput: json→output: {format: json}in metrics_api.mdexamples/mcp/for isolated MCP testingRoot cause
The warning occurs because asyncio's
BaseSubprocessTransport.__del__runs after the event loop closes on Linux. The subprocess IS properly terminated, but the Python transport object's cleanup is deferred to GC. This is a timing issue in the asyncio/anyio/MCP SDK interaction that can't be fully fixed from colin's side - the filter is the pragmatic solution.