Skip to content

Excessive approval prompts after recent changes for Playwright MCP #13476

Open

Description

@grray

What version of Codex CLI is running?

codex-cli 0.107.0

What subscription do you have?

team subscription from my employer

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Linux 6.8.0-101-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

No response

What issue are you seeing?

After recent changes, approval_policy = "never" does not stop approval prompts for Playwright MCP tool calls. If I ask Codex to test some UI using Playwright MCP, it asks for confirmation for many tools like browser_click or browser_type, dozens of them, which makes using Playwright very slow and tedious. It wasn’t like this before.

I need a way to trust a specific local MCP server (Playwright) without disabling safety globally for everything else.

What steps can reproduce the bug?

  1. Configure Codex with:
approval_policy = "never"
[mcp_servers.playwright]
command = "npx"
args = ["-y", "@playwright/mcp@latest"]
  1. Restart Codex.
  2. Start a task that uses Playwright MCP and performs mutating actions (for example:
    navigate, click button, type into input).
  3. Observe that approval prompts are still requested for Playwright actions.

What is the expected behavior?

Either of these should work:

  1. approval_policy = "never" should also suppress Playwright MCP action approvals, or
  2. Codex should support per-MCP approval configuration, so trusted local servers can be
    auto-approved.

Proposed config:

[mcp_servers.playwright]
default_tools_approval_mode = "approve" # auto | prompt | approve

Optional per-tool override:

[mcp_servers.playwright.tools.browser_click]
approval_mode = "approve"

Additional information

No response

Activity

  1. added
    bug
    on Mar 4, 2026
  2. added
    CLI
    mcp
    sandbox
    on Mar 4, 2026
  3. etraut-openai commented on Mar 4, 2026

    @etraut-openai
    Contributor

    You said "after recent changes". Can you be more specific? Are you talking about recent configuration changes on your system, a recent update to the Playwright MCP server, or a recent update to the Codex CLI? If it's the CLI, can you confirm that the behavior changed by downgrading and specifying where you first saw the problem occur? I'm trying to determine if something in Codex regressed.

  4. removed
    CLI
    on Mar 4, 2026
  5. grray commented on Mar 4, 2026

    @grray
    Author

    @etraut-openai problem is absent in codex cli 0.104 (no approval prompts) and starts from 0.105. Same codex config, same Playwright mcp, same tools called. Codex told me that Playwright have some tools marked in metadata that they "mutate world", so perhaps codex started to take this into account, but don't provide convenient way to skip that, confirmations are per-session-per-tool at max, not even per-mcp. It looks so bad that I filed it as a bug.

  6. etraut-openai commented on Mar 4, 2026

    @etraut-openai
    Contributor

    OK, thanks for the additional details. Very helpful.

  7. added
    regression
    on Mar 4, 2026
  8. duaneadam commented on Mar 7, 2026

    @duaneadam

    Yes, I faced similar issue. Previously Playwright MCP can just run without approval.

  9. caidish commented on Mar 8, 2026

    @caidish

    Same issue. Reproducible.

    WIth any MCP connected, the MCP tool cannot bypass permission anymore.

  10. Sogl commented on Mar 10, 2026

    @Sogl

    It’s very annoying to constantly press yes, yes for Playwright MCP and there is no allow setting for it...
    v0.113.0

  11. marcesengel commented on Mar 11, 2026

    @marcesengel

    To me it's especially stupid as I can't even see the args codex tries to pass, so I can't even make a proper decision on the approvals.

  12. chardin1 commented on Mar 13, 2026

    @chardin1

    I wasn't trying to use Playwright before, but I can confirm I'm seeing the same behavior. Asking for approval for every tool call (browser_click, browser_navigate, browser_type, etc) even when approval_policy = "never". Very annoying.

    Relatedly, I wish there was a way to set "never" for specific tools/mcps too.

  13. 7 remaining items

  14. N1k1tung commented on Mar 28, 2026

    @N1k1tung

    This has been finally shipped to vscode extension - as is.
    Who thought of this change as acceptable with such an implementation I wonder?
    Atleast make the asterix (tools.*) work! And it's not just about Playwright, which I don't use, it's for every mcp! It's borderline insane, currently it either makes codex unusable or config unreadable.
    Luckily there's an option to downgrade to previous extension version, but I'd like to utilise upstream updates too.

  15. dogmatic69 commented on Mar 28, 2026

    @dogmatic69

    I am using obsidian mcp tool and after updating to 0.117 I am being asked for every single tool use. This was not the case before. I can not see a way to allow all obsidian tools always, now having to allow each time resulting in things taking hours.

  16. thomaswitt commented on Apr 1, 2026

    @thomaswitt

    Same problem here, mainly with tool calls to chrome devtools, like chrome-devtools.take_snapshot({"verbose":false}). Approval on every single one despite my config.toml contains

    [mcp_servers.chrome-devtools.take_screenshot]
    approval_mode = "approve"
    
  17. matys1 commented on Apr 3, 2026

    @matys1

    When will this finally be resolved?

    For each MCP you literally have to whitelist every single tool individually right now e.g.:

    [mcp_servers.chrome-devtools.tools.new_page]
    approval_mode = "approve"
    ...
    

    You should add a setting for MCPs like below like you have for apps:

    [mcp_servers.chrome-devtools]
    default_tools_approval_mode = "approve"
    
  18. codengine commented on Apr 6, 2026

    @codengine

    I am struggling with the same issue. Moreover its really inconvenient that I have to approve tools twice - the tool itself and each call individually for certain tools (because of some security checks...)

  19. jstiers commented on Apr 8, 2026

    @jstiers

    This needs to be fixed. MCP is completely unusable like this.

  20. grray commented on Apr 8, 2026

    @grray
    Author

    So OpenAi implemented per-tool "auto-approve", so as a workaround you can use config from this comment (it's folded). And now we have option to allow specific tool inside Codex CLI (It used to be only "allow for session", now we can just allow specific tool, and it will be saved in config.toml). So this issue is kind of partially fixed.

  21. dogmatic69 commented on Apr 8, 2026

    @dogmatic69

    adding a config with 500 approval entries is not "fixed". This has already been stated as an option as well as not being acceptable.

  22. Meowzz95 commented on Apr 9, 2026

    @Meowzz95

    can't believe this is still open, so codex team's first priority is to squeeze every bit of usage limit out of your paying customer instead of fixing issues affecting daily use?

  23. jstiers commented on Apr 11, 2026

    @jstiers

    So OpenAi implemented per-tool "auto-approve", so as a workaround you can use config from this comment (it's folded). And now we have option to allow specific tool inside Codex CLI (It used to be only "allow for session", now we can just allow specific tool, and it will be saved in config.toml). So this issue is kind of partially fixed.

    This does not work for me unfortunately. Using Playwright MCP and Codex App or CLI.

  24. DejvyK commented on Apr 13, 2026

    @DejvyK

    the issue is still present in codex VScode chat option even if I add the approval_mode or default_tools_approval_mode = "approve" . I am thinking about running the codex via cli headlessly and doing the danger-full-access mode loop. which might work with the mcp. Have anyone tried that ?

  25. chardin1 commented on Apr 16, 2026

    @chardin1

    This seems to have gotten even worse. You can't approve for the session anymore and there's almost no info shown. Even though I've got the playwright mcp approvals in my config.toml I'm getting this every time.

    Image
  26. emilheap commented on Apr 20, 2026

    @emilheap

    When will this finally be resolved?

    For each MCP you literally have to whitelist every single tool individually right now e.g.:

    [mcp_servers.chrome-devtools.tools.new_page]
    approval_mode = "approve"
    ...
    

    You should add a setting for MCPs like below like you have for apps:

    [mcp_servers.chrome-devtools]
    default_tools_approval_mode = "approve"
    

    Even with per-tool approve in config.toml, i'm still being asked everytime..

    The reason it's not fixed is probably because it's not coming from the codex-cli/app, but more so from changes to their internal model's developer-instruction prompts

  27. SylvainWinning commented on May 25, 2026

    @SylvainWinning

    I took another pass through this thread and the current repo/config behavior. The repeated theme seems to be that per-tool approval is useful as an escape hatch, but it is not a sufficient steady-state UX for large trusted MCP servers like Playwright, Chrome DevTools, Obsidian, etc.

    A small MVP that seems aligned with the requests here would be a server-level default for raw MCP tools, for example:

    [mcp_servers.playwright]
    default_tools_approval_mode = "approve"

    with existing per-tool entries continuing to override it:

    [mcp_servers.playwright.tools.browser_click]
    approval_mode = "prompt"

    That keeps the safety model explicit: users still opt in per MCP server, and more sensitive tools can remain prompted. It also avoids configs with hundreds of generated mcp_servers.<id>.tools.<tool>.approval_mode entries, which several comments show is the current practical workaround.

    One reason this shape seems consistent with the product is that app/connector config already has a similar concept: default_tools_approval_mode plus per-tool approval settings. The missing piece appears to be parity for user-configured MCP servers.

    A useful acceptance test would be: configure a Playwright MCP with only the server-level default, run a flow using multiple mutating browser tools, and verify Codex does not prompt for each tool while still prompting for unrelated shell/file operations.

    Per docs/contributing.md, I’m not opening an unsolicited PR, but this seems like a focused issue/RFC shape if maintainers agree with the config direction.

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

    browserbugmcpregressionsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions