codex - 💡(How to fix) Fix figma/use_figma hangs in interactive Codex and cancels in codex exec [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17106Fetched 2026-04-09 08:02:19
View on GitHub
Comments
1
Participants
2
Timeline
11
Reactions
0
Timeline (top)
labeled ×6unlabeled ×4commented ×1

Codex can reach the Figma MCP server well enough for whoami and get_metadata, but use_figma is still broken on the same authenticated file.

There are two observed failure modes:

  • nested codex exec returns user cancelled MCP tool call
  • interactive Codex dispatches use_figma, then hangs for several minutes and only surfaces the same cancellation after manual interruption

Environment

  • Codex CLI: 0.118.0
  • Model: gpt-5.4
  • OS: Linux x86_64 (WSL2)
  • Approval mode: never
  • Active Codex MCP config: URL-only OAuth for https://mcp.figma.com/mcp
  • Figma seat/plan: Full seat on Pro

Minimal repro

  1. Confirm Figma MCP is registered and logged in: codex mcp get figma
  2. Run the tracked repro helper: python3 scripts/codex_figma_use_figma_repro.py --mode exec --file-key 5ilg4oRfpF04a2SUZsHXSK
  3. For the interactive variant, run the same prompt through the TUI: codex --no-alt-screen -C <repo> "<prompt>"

The repro prompt forces the figma and figma-use skills into scope and asks Codex to make exactly one read-only use_figma call that returns only pageCount and ordered pageNames. It explicitly forbids fallback calls like whoami and get_metadata.

Expected use_figma should either:

  • return JSON with pageCount and pageNames, or
  • fail with a concrete Figma-side error such as auth or file permission

Actual Nested codex exec

  • returns: user cancelled MCP tool call

Interactive Codex

  • dispatches mcp__figma__use_figma
  • then emits no completion for about 6 minutes 48 seconds
  • after manual interruption, the session records:
    • mcp_tool_call_end ... result.Err = "user cancelled MCP tool call"
    • function_call_output = [{"type":"text","text":"user cancelled MCP tool call"}]

What is already ruled out

  • Figma auth is broadly working enough for other tools
  • figma/whoami succeeds
  • figma/get_metadata succeeds against the same file key
  • the failing call includes skillNames: "figma-use"
  • prompt complexity is not the issue; the repro is a trivial read-only script against figma.root.children

Concrete interactive evidence

  • Session id: 019d6c41-37ad-7150-9e64-c251f5b6730e
  • Tool call id: call_Uxki8nSQa34Gmacq1cG5toVd
  • Tool dispatch timestamp: 2026-04-08T08:42:35.057Z
  • Tool end timestamp: 2026-04-08T08:49:23.162Z

Relevant session excerpt

{"timestamp":"2026-04-08T08:42:35.057Z","type":"response_item","payload":{"type":"function_call","name":"mcp__figma__use_figma","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd"}}
{"timestamp":"2026-04-08T08:49:23.162Z","type":"event_msg","payload":{"type":"mcp_tool_call_end","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd","result":{"Err":"user cancelled MCP tool call"}}}
{"timestamp":"2026-04-08T08:49:23.162Z","type":"response_item","payload":{"type":"function_call_output","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd","output":"[{\"type\":\"text\",\"text\":\"user cancelled MCP tool call\"}]"}}

Why this looks like a Codex-side issue

  • the same authenticated file works with other Figma MCP tools
  • use_figma is reached and dispatched, so this is not a simple tool discovery problem
  • the failure mode differs by Codex surface:
    • exec fast-cancels
    • interactive TUI stalls, then resolves to the same cancellation only after interruption

If helpful, I can provide the full local JSONL session transcript and the exact repro helper script body.

Error Message

  • fail with a concrete Figma-side error such as auth or file permission

Root Cause

Codex can reach the Figma MCP server well enough for whoami and get_metadata, but use_figma is still broken on the same authenticated file.

There are two observed failure modes:

  • nested codex exec returns user cancelled MCP tool call
  • interactive Codex dispatches use_figma, then hangs for several minutes and only surfaces the same cancellation after manual interruption

Environment

  • Codex CLI: 0.118.0
  • Model: gpt-5.4
  • OS: Linux x86_64 (WSL2)
  • Approval mode: never
  • Active Codex MCP config: URL-only OAuth for https://mcp.figma.com/mcp
  • Figma seat/plan: Full seat on Pro

Minimal repro

  1. Confirm Figma MCP is registered and logged in: codex mcp get figma
  2. Run the tracked repro helper: python3 scripts/codex_figma_use_figma_repro.py --mode exec --file-key 5ilg4oRfpF04a2SUZsHXSK
  3. For the interactive variant, run the same prompt through the TUI: codex --no-alt-screen -C <repo> "<prompt>"

The repro prompt forces the figma and figma-use skills into scope and asks Codex to make exactly one read-only use_figma call that returns only pageCount and ordered pageNames. It explicitly forbids fallback calls like whoami and get_metadata.

Expected use_figma should either:

  • return JSON with pageCount and pageNames, or
  • fail with a concrete Figma-side error such as auth or file permission

Actual Nested codex exec

  • returns: user cancelled MCP tool call

Interactive Codex

  • dispatches mcp__figma__use_figma
  • then emits no completion for about 6 minutes 48 seconds
  • after manual interruption, the session records:
    • mcp_tool_call_end ... result.Err = "user cancelled MCP tool call"
    • function_call_output = [{"type":"text","text":"user cancelled MCP tool call"}]

What is already ruled out

  • Figma auth is broadly working enough for other tools
  • figma/whoami succeeds
  • figma/get_metadata succeeds against the same file key
  • the failing call includes skillNames: "figma-use"
  • prompt complexity is not the issue; the repro is a trivial read-only script against figma.root.children

Concrete interactive evidence

  • Session id: 019d6c41-37ad-7150-9e64-c251f5b6730e
  • Tool call id: call_Uxki8nSQa34Gmacq1cG5toVd
  • Tool dispatch timestamp: 2026-04-08T08:42:35.057Z
  • Tool end timestamp: 2026-04-08T08:49:23.162Z

Relevant session excerpt

{"timestamp":"2026-04-08T08:42:35.057Z","type":"response_item","payload":{"type":"function_call","name":"mcp__figma__use_figma","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd"}}
{"timestamp":"2026-04-08T08:49:23.162Z","type":"event_msg","payload":{"type":"mcp_tool_call_end","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd","result":{"Err":"user cancelled MCP tool call"}}}
{"timestamp":"2026-04-08T08:49:23.162Z","type":"response_item","payload":{"type":"function_call_output","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd","output":"[{\"type\":\"text\",\"text\":\"user cancelled MCP tool call\"}]"}}

Why this looks like a Codex-side issue

  • the same authenticated file works with other Figma MCP tools
  • use_figma is reached and dispatched, so this is not a simple tool discovery problem
  • the failure mode differs by Codex surface:
    • exec fast-cancels
    • interactive TUI stalls, then resolves to the same cancellation only after interruption

If helpful, I can provide the full local JSONL session transcript and the exact repro helper script body.

Fix Action

Fix / Workaround

There are two observed failure modes:

  • nested codex exec returns user cancelled MCP tool call
  • interactive Codex dispatches use_figma, then hangs for several minutes and only surfaces the same cancellation after manual interruption

Interactive Codex

  • dispatches mcp__figma__use_figma
  • then emits no completion for about 6 minutes 48 seconds
  • after manual interruption, the session records:
    • mcp_tool_call_end ... result.Err = "user cancelled MCP tool call"
    • function_call_output = [{"type":"text","text":"user cancelled MCP tool call"}]

Concrete interactive evidence

  • Session id: 019d6c41-37ad-7150-9e64-c251f5b6730e
  • Tool call id: call_Uxki8nSQa34Gmacq1cG5toVd
  • Tool dispatch timestamp: 2026-04-08T08:42:35.057Z
  • Tool end timestamp: 2026-04-08T08:49:23.162Z

Code Example

{"timestamp":"2026-04-08T08:42:35.057Z","type":"response_item","payload":{"type":"function_call","name":"mcp__figma__use_figma","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd"}}
{"timestamp":"2026-04-08T08:49:23.162Z","type":"event_msg","payload":{"type":"mcp_tool_call_end","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd","result":{"Err":"user cancelled MCP tool call"}}}
{"timestamp":"2026-04-08T08:49:23.162Z","type":"response_item","payload":{"type":"function_call_output","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd","output":"[{\"type\":\"text\",\"text\":\"user cancelled MCP tool call\"}]"}}
RAW_BUFFERClick to expand / collapse

Summary Codex can reach the Figma MCP server well enough for whoami and get_metadata, but use_figma is still broken on the same authenticated file.

There are two observed failure modes:

  • nested codex exec returns user cancelled MCP tool call
  • interactive Codex dispatches use_figma, then hangs for several minutes and only surfaces the same cancellation after manual interruption

Environment

  • Codex CLI: 0.118.0
  • Model: gpt-5.4
  • OS: Linux x86_64 (WSL2)
  • Approval mode: never
  • Active Codex MCP config: URL-only OAuth for https://mcp.figma.com/mcp
  • Figma seat/plan: Full seat on Pro

Minimal repro

  1. Confirm Figma MCP is registered and logged in: codex mcp get figma
  2. Run the tracked repro helper: python3 scripts/codex_figma_use_figma_repro.py --mode exec --file-key 5ilg4oRfpF04a2SUZsHXSK
  3. For the interactive variant, run the same prompt through the TUI: codex --no-alt-screen -C <repo> "<prompt>"

The repro prompt forces the figma and figma-use skills into scope and asks Codex to make exactly one read-only use_figma call that returns only pageCount and ordered pageNames. It explicitly forbids fallback calls like whoami and get_metadata.

Expected use_figma should either:

  • return JSON with pageCount and pageNames, or
  • fail with a concrete Figma-side error such as auth or file permission

Actual Nested codex exec

  • returns: user cancelled MCP tool call

Interactive Codex

  • dispatches mcp__figma__use_figma
  • then emits no completion for about 6 minutes 48 seconds
  • after manual interruption, the session records:
    • mcp_tool_call_end ... result.Err = "user cancelled MCP tool call"
    • function_call_output = [{"type":"text","text":"user cancelled MCP tool call"}]

What is already ruled out

  • Figma auth is broadly working enough for other tools
  • figma/whoami succeeds
  • figma/get_metadata succeeds against the same file key
  • the failing call includes skillNames: "figma-use"
  • prompt complexity is not the issue; the repro is a trivial read-only script against figma.root.children

Concrete interactive evidence

  • Session id: 019d6c41-37ad-7150-9e64-c251f5b6730e
  • Tool call id: call_Uxki8nSQa34Gmacq1cG5toVd
  • Tool dispatch timestamp: 2026-04-08T08:42:35.057Z
  • Tool end timestamp: 2026-04-08T08:49:23.162Z

Relevant session excerpt

{"timestamp":"2026-04-08T08:42:35.057Z","type":"response_item","payload":{"type":"function_call","name":"mcp__figma__use_figma","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd"}}
{"timestamp":"2026-04-08T08:49:23.162Z","type":"event_msg","payload":{"type":"mcp_tool_call_end","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd","result":{"Err":"user cancelled MCP tool call"}}}
{"timestamp":"2026-04-08T08:49:23.162Z","type":"response_item","payload":{"type":"function_call_output","call_id":"call_Uxki8nSQa34Gmacq1cG5toVd","output":"[{\"type\":\"text\",\"text\":\"user cancelled MCP tool call\"}]"}}

Why this looks like a Codex-side issue

  • the same authenticated file works with other Figma MCP tools
  • use_figma is reached and dispatched, so this is not a simple tool discovery problem
  • the failure mode differs by Codex surface:
    • exec fast-cancels
    • interactive TUI stalls, then resolves to the same cancellation only after interruption

If helpful, I can provide the full local JSONL session transcript and the exact repro helper script body.

extent analysis

TL;DR

The issue with use_figma failing with a "user cancelled MCP tool call" error may be related to how Codex handles the Figma MCP tool call, and a potential workaround could involve adjusting the Codex configuration or the repro helper script to better handle the tool call.

Guidance

  • Verify that the Figma MCP tool is properly configured and registered with Codex by checking the output of codex mcp get figma.
  • Investigate the difference in behavior between the exec and interactive TUI surfaces, as this may indicate a issue with how Codex is handling the tool call.
  • Consider adding additional logging or debugging statements to the repro helper script to gain more insight into the failure mode.
  • Review the Codex documentation to ensure that the use_figma tool is being used correctly and that all required parameters are being passed.

Example

No specific code example is provided, as the issue is more related to the configuration and usage of the Codex and Figma MCP tools.

Notes

The issue may be specific to the Codex version (0.118.0) or the Figma MCP configuration, and further investigation is needed to determine the root cause.

Recommendation

Apply a workaround by adjusting the Codex configuration or the repro helper script to better handle the Figma MCP tool call, as the issue appears to be related to how Codex is handling the tool call.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING