File: src/entrabot/mcp_server.py
Location: L3683-L3693 _run_stdio_with_write_stream shutdown
Category: bug
Priority: low
Description
On shutdown init_task.cancel() is called but never awaited. If _eager_init is mid-Graph-call when the host disconnects, the task is destroyed pending; this produces stderr warnings that AGENTS.md keeps visible (never redirect stderr to /dev/null), and can interact with the open dropout bug.
Suggested fix
init_task.cancel(); with contextlib.suppress(asyncio.CancelledError, Exception): await asyncio.wait_for(init_task, timeout=2) before _flush_chat_cursors.
Filed automatically by a thorough code-review pass over src/entrabot/ on 2026-06-13. Internal review id: #48.
File:
src/entrabot/mcp_server.pyLocation: L3683-L3693 _run_stdio_with_write_stream shutdown
Category: bug
Priority: low
Description
On shutdown init_task.cancel() is called but never awaited. If _eager_init is mid-Graph-call when the host disconnects, the task is destroyed pending; this produces stderr warnings that AGENTS.md keeps visible (never redirect stderr to /dev/null), and can interact with the open dropout bug.
Suggested fix
init_task.cancel(); with contextlib.suppress(asyncio.CancelledError, Exception): await asyncio.wait_for(init_task, timeout=2) before _flush_chat_cursors.
Filed automatically by a thorough code-review pass over
src/entrabot/on 2026-06-13. Internal review id: #48.