Which area does this relate to?
What happened?
When an agent doesn't support streaming, send --stream falls back to polling. If polling fails, the error has no cause, so it returns A2ACLI_ERR_INTERNAL with no a2aCode. task get --wait on the same task returns A2ACLI_ERR_PROTOCOL with a2aCode: TASK_NOT_FOUND.
internal/polling/polling.go:113 builds the error without %w err. The same check in WaitForTask (line 48) includes it.
Steps to reproduce
- Start a stub agent:
python3 - <<'PY'
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
CARD={"name":"stub","description":"stub","version":"1","capabilities":{"streaming":False},
"defaultInputModes":["text/plain"],"defaultOutputModes":["text/plain"],"skills":[],
"supportedInterfaces":[{"url":"http://127.0.0.1:18082/rpc","protocolBinding":"JSONRPC","protocolVersion":"1.0"}]}
class H(BaseHTTPRequestHandler):
def reply(self,o):
b=json.dumps(o).encode(); self.send_response(200); self.send_header("Content-Type","application/json")
self.send_header("Content-Length",str(len(b))); self.end_headers(); self.wfile.write(b)
def do_GET(self): self.reply(CARD)
def do_POST(self):
r=json.loads(self.rfile.read(int(self.headers["Content-Length"])))
if r["method"]=="SendMessage":
return self.reply({"jsonrpc":"2.0","id":r["id"],"result":{"task":{"id":"t-1","contextId":"c-1","status":{"state":"TASK_STATE_WORKING"}}}})
self.reply({"jsonrpc":"2.0","id":r["id"],"error":{"code":-32001,"message":"task not found"}})
HTTPServer(("127.0.0.1",18082),H).serve_forever()
PY
a2a task get -a http://127.0.0.1:18082 -o json --wait t-1 returns A2ACLI_ERR_PROTOCOL, a2aCode: TASK_NOT_FOUND.
a2a send -a http://127.0.0.1:18082 -o json --stream hi returns:
{"error":{"code":"A2ACLI_ERR_INTERNAL","message":"streaming error: successive polling failure threshold exceeded for task \"t-1\""}}
CLI version
main @ f510ea4
Operating system & environment
macOS (Darwin 25.6.0), arm64
Which area does this relate to?
What happened?
When an agent doesn't support streaming,
send --streamfalls back to polling. If polling fails, the error has no cause, so it returnsA2ACLI_ERR_INTERNALwith noa2aCode.task get --waiton the same task returnsA2ACLI_ERR_PROTOCOLwitha2aCode: TASK_NOT_FOUND.internal/polling/polling.go:113builds the error without%w err. The same check inWaitForTask(line 48) includes it.Steps to reproduce
a2a task get -a http://127.0.0.1:18082 -o json --wait t-1returnsA2ACLI_ERR_PROTOCOL,a2aCode: TASK_NOT_FOUND.a2a send -a http://127.0.0.1:18082 -o json --stream hireturns:CLI version
main @ f510ea4
Operating system & environment
macOS (Darwin 25.6.0), arm64