{
  "format": "agent-article-v0",
  "article_id": "GX-0017",
  "content_family": "GX",
  "public_kind": "ARTICLE_PRODUCT",
  "revision_id": "GX-0017-R20261028-02",
  "canonical_url": "/providers/gx-0017-claude-code-mcp",
  "page_type": "reference",
  "claim_ids": [],
  "evidence_ids": [
    "EV-XPL-20261016-R159-01",
    "EV-XPL-20261016-R159-02",
    "EV-GX0017-22658-20261118-01",
    "EV-GX0017-83457-20261118-01"
  ],
  "unknown_ids": [
    "GX-0017-UNKNOWN-01"
  ],
  "operational_object_ids": [],
  "provider": [
    "Anthropic"
  ],
  "models": [
    "MCP tool calls"
  ],
  "plans": [],
  "surfaces": [
    "idempotency"
  ],
  "regions": [],
  "current_status": "CURRENT",
  "observation_status": "UNOBSERVED",
  "freshness": "CURRENT",
  "last_verified": "2026-10-28",
  "supersedes": [],
  "superseded_by": [],
  "provenance": [
    "SRC-EVID-000078",
    "SRC-EVID-GX0017-ISSUE-22658-20261118",
    "SRC-EVID-GX0017-ISSUE-83457-20261118"
  ],
  "article_sources": [
    {
      "id": "EV-XPL-20261016-R159-01",
      "evidence_class": "FAILURE",
      "title": "Issue #36149：MCPツールの二重呼出し",
      "href": "https://github.com/anthropics/claude-code/issues/36149",
      "supports": [
        "A concrete Claude Code 2.1.79 / Windows 11 / stdio MCP environment exhibited duplicate dispatch at the application boundary."
      ],
      "checked_at": "2026-11-18",
      "limit": "Does not establish universal Claude Code/MCP behavior, root cause, incidence, or persistence in current releases."
    },
    {
      "id": "EV-XPL-20261016-R159-02",
      "evidence_class": "OPS",
      "title": "Issue #36149：tool_use_idだけでは防げない重複副作用",
      "href": "https://github.com/anthropics/claude-code/issues/36149",
      "supports": [
        "The report demonstrates one concrete failure mode where transport/call identity is not a sufficient idempotency key and an effect-boundary uniqueness guard prevented duplicate records."
      ],
      "checked_at": "2026-11-18",
      "limit": "Does not establish that the reporter's DedupHash scheme is universally correct, nor exactly-once execution."
    },
    {
      "id": "EV-GX0017-22658-20261118-01",
      "evidence_class": "FAILURE",
      "title": "Issue #22658：並列subagentの重複実行",
      "href": "https://github.com/anthropics/claude-code/issues/22658",
      "supports": [
        "A specific reporter observed replay of the same tool-use identity across several assistant messages, with multiple downstream MCP side effects."
      ],
      "checked_at": "2026-11-18",
      "limit": "Does not prove universal Claude Code/MCP behavior, exact root cause, present-day recurrence, or any provider-confirmed fix."
    },
    {
      "id": "EV-GX0017-83457-20261118-01",
      "evidence_class": "FAILURE",
      "title": "Issue #83457：並行MCP応答の誤配送報告",
      "href": "https://github.com/anthropics/claude-code/issues/83457",
      "supports": [
        "The reporter correlates mismatched remote MCP output with a simultaneously in-flight sibling request and the expected caller's later timeout/retry."
      ],
      "checked_at": "2026-11-18",
      "limit": "Does not determine whether misrouting occurred in harness, gateway, or hosted MCP server; does not establish cross-session/cross-tenant effect or latest-version incidence."
    }
  ],
  "research_sections": [
    {
      "heading": "結論",
      "text": "Claude CodeからMCPツールを呼ぶ運用では、クライアント側の1回の意図が外部副作用の1回だけの実行になると仮定しない。2026年3月のClaude Code 2.1.79 / Windows 11 / stdio MCPの報告では、同一パラメータの呼び出しが数ms差で二重送信され、重複側は異なるtool_use_idを持つ事例が記録された。issueのcloseは修正証拠ではない。2026年8月には同一session内の並行subagentがremote MCP connectorを利用した際、別のpending call向け応答が誤配送されたとする報告もある。tool_use_idやcall identityだけをexactly-once保証として扱わず、不可逆な副作用の直前に業務キーによる冪等性制御を置く。"
    },
    {
      "heading": "適用範囲",
      "text": "対象はClaude CodeからMCP経由で外部システムへ書き込み、副作用を発生させる処理である。チケット作成、コメント投稿、レコード作成・更新・削除、通知、ジョブ起動などを含む。これはMCP仕様自体が常に重複送信するという主張ではない。"
    },
    {
      "heading": "確認できたclaim",
      "text": "- anthropics/claude-code issue #36149ではClaude Code 2.1.79、Windows 11、stdio MCPで同一パラメータのtool callが2〜4ms程度の差で二重実行されたと報告された。CREATEでは重複レコード、UPDATE/DELETEでは競合が発生した。\n- #36149では初回の二重dispatchが異なるtool_use_idを持ち、tool_use_idだけのserver-side dedupでは防げなかったと報告された。\n- #22658ではparallel subagents利用時に同一MCP tool callが複数回実行された別事例があり、こちらは同一tool_use.idが観測された。重複時のidentity形状は一定とは限らない。\n- #83457では2026年8月、同一session内の複数subagentが同じremote MCP connectorへ並行callした際、別call向け応答が誤ったcallerへ渡り、本来のcallerが180秒timeout後に再要求する事例が4件対応付けられた。client-side logsだけではroot cause層は確定していない。"
    },
    {
      "heading": "運用上の意味",
      "text": "MCP callのtransport identityと業務上の副作用identityを分離する。tool_use_idやJSON-RPC request idは相関には使えるが、業務処理が一度しか実行されない根拠にしない。書き込み系ツールでは安定したidempotency keyを定義し、DBのUNIQUE制約、conditional write、compare-and-set、既存effect照合などをside-effect boundaryで原子的に行う。timeout後に新規実行する前には既存effectを照合し、応答が無いことと副作用が無かったことを同一視しない。"
    },
    {
      "heading": "失敗経路・反証・例外",
      "text": "#36149は特定version・OS・stdio構成の報告であり、全環境で再現する証拠ではない。closed as not plannedも現行versionで残存する証拠ではない。一方、#83457は別形態の並行相関障害を示す。読み取り専用操作では副作用リスクは低いが、コストとrate limitは残る。冪等性制御はroot cause修正の代替ではなく防御層である。"
    },
    {
      "heading": "Availability Gate",
      "text": "使用中のClaude Code version、MCP transport、並行subagent有無、接続先のidempotency機構を確認する。"
    },
    {
      "heading": "Unconfirmed",
      "text": "- #36149のroot causeと現行Claude Codeでの発生率。\n- #36149を直接解消した修正commit/releaseの有無。\n- #83457の誤配送がharness、connector gateway、hosted MCP serverのどの層で発生したか。\n- cross-session / cross-tenant影響。報告範囲は同一user/session内である。"
    },
    {
      "heading": "実務チェックポイント",
      "text": "1. 書き込みtoolごとに業務idempotency keyを定義する。\n2. key重複判定をside-effect直前の永続境界で原子的に行う。\n3. request、effect、resultを相互参照可能に記録する。\n4. timeout・接続断・再試行時はeffect照合を先に行う。\n5. tool_use_idだけをdedup keyにしない。\n6. 並行subagentでは戻り値が要求対象と一致するか検証する。"
    },
    {
      "heading": "証拠・更新情報",
      "text": "Evidence as of 2026-10-28. Sources: anthropics/claude-code #36149, #22658, #83457. Canonical source: / ARTIFACT_INDEX!692."
    }
  ],
  "human_url": "/providers/gx-0017-claude-code-mcp",
  "markdown_url": "/agent/article.md?path=%2Fproviders%2Fgx-0017-claude-code-mcp",
  "json_url": "/agent/article.json?path=%2Fproviders%2Fgx-0017-claude-code-mcp"
}