# Cli: Permission allowlist written to global config instead of project-level \`.cursor/cli.json\`

**URL:** <https://forum.cursor.com/t/cli-permission-allowlist-written-to-global-config-instead-of-project-level-cursor-cli-json/160343>\
**Category:** Bug Reports\
**Tags:** auto-run, cli\
**Created:** [May 12, 2026, 12:22am UTC](https://forum.cursor.com/t/cli-permission-allowlist-written-to-global-config-instead-of-project-level-cursor-cli-json/160343 "2026-05-12T00:22:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![teruhirokomaki](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/teruhirokomaki/32/108414_2.png) [@teruhirokomaki](https://forum.cursor.com/u/teruhirokomaki)\
**Post date:** [May 12, 2026, 12:22am UTC](https://forum.cursor.com/t/cli-permission-allowlist-written-to-global-config-instead-of-project-level-cursor-cli-json/160343/1 "2026-05-12T00:22:40Z")

</div>

### Where does the bug appear (feature/product)?

Cursor CLI

### Describe the Bug

When running `cursor agent` inside a project that has `.cursor/cli.json`, granting a permission writes the entry to `~/.cursor/cli-config.json` (global) instead of the project-level `.cursor/cli.json`. Because the project-level file takes precedence, the granted permission is never recognized and the permission dialog reappears every time.

### Steps to Reproduce

1. Create a project with a minimal `.cursor/cli.json`:

```bash
$ cat .cursor/cli.json
{}

```

1. Confirm `~/.cursor/cli-config.json` has empty permissions:

```json
{
  "permissions": {
    "allow": [],
    "deny": []
  }
}

```

1. Run `cursor agent` inside the project and trigger a web fetch
2. When prompted, press `tab` to choose “Always allow …”

→ The entry is written to `~/.cursor/cli-config.json`, not to `.cursor/cli.json`

1. Run `cursor agent` again — the same permission dialog reappears

### Expected Behavior

The allowed entry is written to the project-level `.cursor/cli.json`, which takes precedence over the global config.

### Screenshots / Screen Recordings

 ![スクリーンショット 2026-05-12 9.08.12.png](https://us1.discourse-cdn.com/cursor1/original/3X/7/c/7c63d52a47e0d8af84ba2a557af399803cb4fd16.jpeg)

### Operating System

MacOS

### Version Information

About Cursor CLI

CLI Version 2026.05.09-0afadcc  
Model Composer 2 Fast  
Subscription Tier Pro  
OS darwin (arm64)  
Terminal ghostty  
Shell bash  
User Email

### Additional Information

After allowing “Always allow [forum.cursor.com](http://forum.cursor.com)”, `~/.cursor/cli-config.json` is updated:

```json
{
  "permissions": {
    "allow": [
      "WebFetch(forum.cursor.com)"
    ],
    "deny": []
  }
}

```

But `.cursor/cli.json` remains `{}` and takes priority, so the permission is never applied.

### Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 12, 2026, 9:12am UTC](https://forum.cursor.com/t/cli-permission-allowlist-written-to-global-config-instead-of-project-level-cursor-cli-json/160343/5 "2026-05-12T09:12:47Z")

</div>

Hey, thanks for the detailed report and the repro steps. The “Always allow” behavior really only writes an entry to `~/.cursor/cli-config.json`, that’s the current implementation. It doesn’t write to the project-level config. This should be improved, and I’ll log it as a bug.

One quick question so I can understand which exact case you’re hitting. After step 4 when you press `tab` and pick “Always allow [forum.cursor.com](http://forum.cursor.com)”, can you share the exact contents of `.cursor/cli.json`?

```bash
cat .cursor/cli.json

```

Scenario A: if the file is still `{}`, the global permission should be picked up on the next run via deep merge, and the dialog shouldn’t show again. If it still prompts, that’s an extra bug besides only writing to global.

Scenario B: if the file has a `permissions` section, even an empty one like `{ "permissions": { "allow": [], "deny": [] } }`, that explains the repeated prompt. The empty project-level arrays override the global allow list during merge. In that case, the workaround is to add the needed entries manually to `.cursor/cli.json`:

```json
{
  "permissions": {
    "allow": ["WebFetch(forum.cursor.com)"],
    "deny": []
  }
}

```

As another temporary workaround, you can run `cursor agent --disable-project-configs` so the CLI ignores the project config and uses only the global config.

Let me know what the file looks like after you grant it, then I can report it to the team more accurately.

---

<div class="post-metadata">

**Author:** ![teruhirokomaki](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/teruhirokomaki/32/108414_2.png) [@teruhirokomaki](https://forum.cursor.com/u/teruhirokomaki)\
**Post date:** [May 12, 2026, 7:17pm UTC](https://forum.cursor.com/t/cli-permission-allowlist-written-to-global-config-instead-of-project-level-cursor-cli-json/160343/8 "2026-05-12T19:17:21Z")

</div>

Thanks for the clarification! After testing, this is **Scenario B**.

My actual `.cursor/cli.json` has a `permissions` section with existing entries:

```json
{
  "permissions": {
    "allow": ["Shell(ls)"],
    "deny": []
  }
}

```

After granting “Always allow [forum.cursor.com](http://forum.cursor.com)”, the file remained unchanged, and the entry was written to `~/.cursor/cli-config.json` instead. Since the project-level config takes priority, the dialog reappears every time.

As a side note, I also tested with `.cursor/cli.json` = `{}` (no `permissions` key at all). In that case, the global config was picked up correctly and the dialog did **not** reappear — so the deep merge works fine when there is no project-level `permissions` section.

To summarize: the bug is triggered when `.cursor/cli.json` contains a `permissions` section. The workaround of manually adding entries to `.cursor/cli.json` works. Thanks for logging it!

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [May 16, 2026, 11:48am UTC](https://forum.cursor.com/t/cli-permission-allowlist-written-to-global-config-instead-of-project-level-cursor-cli-json/160343/9 "2026-05-16T11:48:37Z")

</div>

Thanks, that’s a helpful signal. Scenario B is confirmed, and the behavior matches what we see in the code: the permission entry always gets written to the global config, and an empty or partially filled `permissions` block in the project-level `.cursor/cli.json` overrides the global one during merge, so the grant doesn’t stick.

I’ve reported this internally. There’s no fix timeline yet. If we get an update, we’ll reply in the thread.

For now, there are two working options:

1. Add entries to `.cursor/cli.json` manually like you already tested:

2. Run `cursor agent --disable-project-configs` if you don’t need the project config in the current session. Then the CLI reads only the global config.
