[Bug] Tool invocation XML namespace dropped causing malformed tool calls in Opus 4.8

Open 💬 0 comments Opened Jun 24, 2026 by takufukagawa

Bug Description

  • Symptom: A stray token court is inserted immediately before a tool-call invocation, and the antml: namespace prefix on the

<invoke> tag is dropped. As a result, the tool call is rendered as plain text instead of being executed.

  • Reproducibility: Recurs intermittently within the same session; rarely appears in a fresh session.
  • Model: Opus 4.8 [1m] (claude-opus-4-8[1m])
  • Impact: Tool calls repeatedly fail to execute, which blocks and halts work.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.186
  • Feedback ID: c81c6d84-980a-483a-b4b6-73887e138de7

Errors

[{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLLHnQBoYkHoAbDocLmP\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:12:69548)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:16:18.701Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLLMHZi9CAzkr4AnF9oD\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:12:69548)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:17:05.550Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLLaiAus6MHCTz4x6rRm\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:12:69548)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:20:07.704Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLLxTx1i4SfEY96sgtFY\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:12:69548)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:25:02.970Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLMBw52oAWWpjYfGiQF3\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:12:69548)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:28:07.551Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLML2jKcrF6bBNFepbNP\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:12:69548)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:29:55.453Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLMaK3jHUA4Yp24TPknS\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:12:69548)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:33:09.169Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011CcLMgeNVgW1a37wcBYvGx\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:12:69548)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7688)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-23T14:34:35.421Z"}]

View original on GitHub ↗