Problem
The mcpc pollTask() detached polling fallback (mcp-cli/src/core/mcp-client.ts, ~line 715) returns the statusMessage as fake content instead of fetching the actual stored result via tasks/result:
// Current behavior (incomplete):
if (task.status === 'completed') {
return { content: [{ type: 'text', text: task.statusMessage || 'Task completed' }] };
}
// Fix:
if (task.status === 'completed') {
const result = await this.getTaskResult(taskId);
return result;
}
This means detached tasks polled via pollTask() lose their actual result — the client only sees the statusMessage text.
Scope clarification: this only affects the detached polling path (callToolDetached + manual pollTask). The normal callTool path is not affected:
mcpc callTool → callToolStream → requestStream → completed → getTaskResult ✅
mcpc pollTask → tasks/get loop → completed → statusMessage as content ❌ (detached only)
References
Problem
The mcpc
pollTask()detached polling fallback (mcp-cli/src/core/mcp-client.ts, ~line 715) returns thestatusMessageas fake content instead of fetching the actual stored result viatasks/result:This means detached tasks polled via
pollTask()lose their actual result — the client only sees the statusMessage text.Scope clarification: this only affects the detached polling path (
callToolDetached+ manualpollTask). The normalcallToolpath is not affected:References
res/task_status_workaround.md— full analysis