Calling emit() in the execute tool reports a non-zero emitted count, but no content blocks are delivered to the MCP client. Only console.log output (via logs) and the return value come through.
Repro
emit("plain string emit");
emit({ type: "text", text: "mcp text block emit" });
emit({ hello: "object emit" });
return { returnedValue: "this is the return" };
Actual
{"status":"completed","result":{"returnedValue":"this is the return"},"emitted":3,"logs":[]}
The returned value arrives. All three emitted items are counted but never appear as content.
Expected
Three content items alongside the returned value, per the execute skill: "emitted items come first in the tool result, the returned value follows, and the envelope reports an emitted count so you can confirm the items landed."
Notes
- Affects plain strings, MCP text content blocks (
{ type: "text", text }), and plain objects alike.
- Workaround is to use
console.log, which does reach the client via logs.
- Client: Claude Code, via self-hosted
executor MCP server.
Calling
emit()in theexecutetool reports a non-zeroemittedcount, but no content blocks are delivered to the MCP client. Onlyconsole.logoutput (vialogs) and thereturnvalue come through.Repro
Actual
{"status":"completed","result":{"returnedValue":"this is the return"},"emitted":3,"logs":[]}The returned value arrives. All three emitted items are counted but never appear as content.
Expected
Three content items alongside the returned value, per the
executeskill: "emitted items come first in the tool result, the returned value follows, and the envelope reports anemittedcount so you can confirm the items landed."Notes
{ type: "text", text }), and plain objects alike.console.log, which does reach the client vialogs.executorMCP server.