Skip to content

[Bug]: CLAUDE_CODE_ENTRYPOINT=t3-code disables MCP Tasks: tools/call never advertises io.modelcontextprotocol/tasks, so task waits fail with -32021 #38969

Open

Description

@ahilles107

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

Since #28410, T3 Code starts Claude Code with CLAUDE_CODE_ENTRYPOINT=t3-code. With that value, Claude Code doesn't advertise the MCP Tasks extension (io.modelcontextprotocol/tasks, protocol 2026-07-28) to MCP servers. A server that returns a task handle for a long-running tool therefore can't use one in a T3 Claude thread. The idle main conversation also never wakes when the task completes.

This is the same pattern as #29393 and #34562: Claude Code treats t3-code as an unknown entrypoint.

  1. Run any HTTP MCP server that speaks protocol 2026-07-28, advertises extensions["io.modelcontextprotocol/tasks"] in server/discover, and logs params._meta["io.modelcontextprotocol/clientCapabilities"] on tools/call. The tool should return resultType: "task" only when that capability is present, and JSON-RPC -32021 otherwise. A 26-line Node recorder that does this is included at the end of this issue.
  2. Add it to a Claude thread, for example in the project's .mcp.json: {"mcpServers":{"rec":{"type":"http","url":"http://127.0.0.1:47812/mcp"}}}.
  3. Make sure the instance has CLAUDE_AUTO_BACKGROUND_TASKS=1, and that CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND and CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS are unset.
  4. In a new Claude thread, ask the model to call the tool once and end its turn.

To isolate the entrypoint, the same check runs outside T3 with a stream-json client that keeps its input open:

for e in t3-code sdk-ts cli; do
  CLAUDE_CODE_ENTRYPOINT=$e claude --input-format stream-json --output-format stream-json --verbose \
    --strict-mcp-config --mcp-config rec-mcp.json --allowedTools mcp__rec__probe_wait
done

Expected behavior

The tools/call metadata includes extensions: {"io.modelcontextprotocol/tasks": {}}. The server returns a task handle, and Claude Code polls tasks/get. When the task completes, the idle thread starts a new turn with origin task-notification / mcp-task. This is what happens with sdk-ts, the Agent SDK default that T3 Code used before #28410.

Actual behavior

With t3-code, the tools/call capability object contains only roots and elicitation, so the server answers -32021 Missing required client capability. No task is created and no wake follows.

Each result below is from a separate session. The cache columns are the state of the feature-flag cache in ~/.claude.json.

CLAUDE_CODE_ENTRYPOINT Cache before Cache after Tasks on tools/call
t3-code (set by T3) any false no, -32021
t3-code + CLAUDE_INTERNAL_FC_OVERRIDES={"tengu_glowing_lark":true} true false no
cli (unset) true true yes, handle polled, idle wake
sdk-ts true true yes, handle polled, idle wake

The results were the same through a local Anthropic-compatible proxy and with a direct connection. Claude Code 2.1.322, 2.1.326 and 2.1.327 all behave this way. In 2.1.327 the gate is the remote rollout flag tengu_glowing_lark. Its built-in default is on only for cli, and the remote value came back false for t3-code and true for sdk-ts and cli.

The flag value is stored in the shared ~/.claude.json cache, so this also affects other sessions:

  • Each t3-code session writes false into the cache.
  • A session that starts later with sdk-ts or cli builds its MCP capabilities from that cached false.
  • That session keeps those capabilities for its whole lifetime, even after its own fetch returns true.

So a single running T3 Claude thread can turn MCP Tasks off for the next standalone claude session on the same machine.

Impact

Major degradation or frequent failure

MCP servers that use durable task waits get -32021 in every T3 Claude thread. In our case, orchestrator threads arm a task wait and end their turn so they can be woken when a delegated agent finishes. That pattern doesn't work at all in T3 since #28410.

Version or commit

T3 Code 0.1.11-nightly.20261118.4864, also 0.1.11-nightly.20261117.4838. It worked before #28410, when T3 Code 0.1.6 launched Claude Code with the default sdk-ts.

Environment

macOS arm64; Claude Code 2.1.327 (also 2.1.322 and 2.1.326); Agent SDK 0.3.321; claude.ai subscription login; claudeAgent provider instance.

Logs or stack traces

# recorder log, CLAUDE_CODE_ENTRYPOINT=t3-code
server/discover  protocol=2026-07-28  clientCapabilities={"roots":{"listChanged":true},"elicitation":{"form":{},"url":{}}}
tools/call       protocol=2026-07-28  clientCapabilities={"roots":{"listChanged":true},"elicitation":{"form":{},"url":{}}}
-> -32021 Missing required client capability

# same server, CLAUDE_CODE_ENTRYPOINT=sdk-ts
server/discover  clientCapabilities={...,"extensions":{"io.modelcontextprotocol/tasks":{}}}
tools/call       clientCapabilities={...,"extensions":{"io.modelcontextprotocol/tasks":{}}}
tasks/get        -> completed
result origin    {"kind":"task-notification","producer":"session-task","taskKind":"mcp-task"}

Workaround

Override the entrypoint in the instance environment, which #28410 allows:

{ "name": "CLAUDE_CODE_ENTRYPOINT", "value": "sdk-ts", "sensitive": false }

Running threads keep their old environment and their capabilities from connect time, so you have to start a new thread.

Side effects of sdk-ts:

Possible fixes:

mcp-tasks-recorder.mjs (run: node mcp-tasks-recorder.mjs 47812 rec.log)
import http from 'node:http';
import fs from 'node:fs';
const port = Number(process.argv[2]); const logFile = process.argv[3];
const MODERN = '2026-07-28', TASKS = 'io.modelcontextprotocol/tasks'; let waits = 0;
const log = (e) => fs.appendFileSync(logFile, JSON.stringify({ t: new Date().toISOString(), ...e }) + '\n');
const tool = { name: 'probe_wait', description: 'Probe wait tool. Call it once with no arguments.', inputSchema: { type: 'object', properties: {}, additionalProperties: false } };
http.createServer((req, res) => {
  let raw = ''; req.on('data', (c) => (raw += c)); req.on('end', () => {
    let msg = null; try { msg = JSON.parse(raw); } catch {}
    const meta = msg?.params?._meta ?? null;
    log({ rpcMethod: msg?.method ?? null, caps: meta?.['io.modelcontextprotocol/clientCapabilities'] ?? null, ua: req.headers['user-agent'] ?? null });
    const reply = (b) => { res.writeHead(200, { 'content-type': 'application/json' }); res.end(JSON.stringify(b)); };
    if (req.method !== 'POST' || !msg) { res.writeHead(405); return res.end(); }
    if (msg.id === undefined) { res.writeHead(202); return res.end(); }
    const ok = (result) => reply({ jsonrpc: '2.0', id: msg.id, result });
    const now = new Date().toISOString();
    switch (msg.method) {
      case 'server/discover': return ok({ resultType: 'complete', supportedVersions: [MODERN], capabilities: { tools: {}, extensions: { [TASKS]: {} } }, serverInfo: { name: 'recorder', version: '0.0.1' }, instructions: 'probe' });
      case 'tools/list': return ok({ resultType: 'complete', tools: [tool] });
      case 'tools/call': if (meta?.['io.modelcontextprotocol/clientCapabilities']?.extensions?.[TASKS] !== undefined) { waits++; return ok({ resultType: 'task', taskId: 'probe-' + waits, status: 'working', createdAt: now, lastUpdatedAt: now, ttlMs: null, pollIntervalMs: 2000 }); }
        return reply({ jsonrpc: '2.0', id: msg.id, error: { code: -32021, message: 'Missing required client capability' } });
      case 'tasks/get': return ok({ resultType: 'complete', taskId: msg.params?.taskId, status: 'completed', createdAt: now, lastUpdatedAt: now, ttlMs: null, pollIntervalMs: 2000, result: { resultType: 'complete', content: [{ type: 'text', text: 'PROBE_DONE' }], isError: false } });
      default: return reply({ jsonrpc: '2.0', id: msg.id, error: { code: -32601, message: 'not found' } });
    }
  });
}).listen(port, '127.0.0.1');

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