Visitar URL original
[Bug]: MCP-FOR-UNITY transport lines (write FAIL / Client handler exited) pollute read_console error/warning results · Issue #1434 · CoplayDev/unity-mcp · GitHub
Skip to content

[Bug]: MCP-FOR-UNITY transport lines (write FAIL / Client handler exited) pollute read_console error/warning results #1434

Open

Description

@HivemindMinion

What happened?

MCP for Unity's own diagnostic lines show up in read_console results alongside the project's logs, including when filtering to errors/warnings. In one session, a types: ["error","warning"] read after a long-running operation returned only these:

MCP-FOR-UNITY: [IO] ✗ write FAIL  tag=response reqId=? ObjectDisposedException: Cannot access a disposed object.
MCP-FOR-UNITY: Suppressed duplicate command resent on a new connection; awaiting the in-flight result instead of running it twice.
MCP-FOR-UNITY: Client handler exited (remaining clients: 0)

This makes the common agent pattern "run something, then check the console for errors" unreliable. The agent has to recognise and discount the MCP's own transport noise every time, and real project errors can get crowded out by the count limit.

Reproduction steps

  1. Run any tool call that outlives the frame timeout (e.g. a long execute_code), so the client reconnects.
  2. Call read_console with types: ["error","warning"].
  3. The MCP-FOR-UNITY transport lines appear among the results.

Expected / proposal: exclude MCP-FOR-UNITY-tagged entries from read_console by default, with an opt-in such as include_mcp_logs: true for debugging the bridge itself. Alternatively, log the expected transport-level reconnect/write failures at Log level rather than warning/error.

Environment

  • Unity: 6000.3.8f1 (URP), Android build target
  • MCP for Unity package: 10.2.1-beta.6 (git URL ?path=/MCPForUnity)
  • Python server: mcpforunityserver, latest prerelease via uvx --prerelease explicit
  • MCP client: Claude Code (CLI)
  • Transport: stdio
  • OS: Windows 11 Pro

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions