anthropics / anthropics/claude-code

[BUG] Workspace trust not persisted across sessions (Code tab, macOS 15.5)

Đang mở
#92,801 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:desktop bug has repro platform:macos
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

I'm seeing the same behavior on macOS.

**Environment**
- Claude desktop app (Code tab)
- Claude Code versions installed: 2.1.258, 2.1.260
- macOS 15.5 (24F74)

**Steps to reproduce**
1. Open a project folder in the Code tab (e.g. /Users/.../**)
2. Workspace trust dialog appears, listing .claude/settings.json and .claude/settings.local.json as "allowed to execute"
3. Click "Trust workspace" (작업 공간 신뢰)
4. Trust dialog reappears on the next session / next time the workspace is opened — the decision is not persisted

**What I've already ruled out**
- File/folder permissions: ~/Library/Application Support/Claude and the project's .claude/ folder are correctly owned by my user, not root
- Corrupted local state: deleted and let the app regenerate
~/Library/Application Support/Claude/IndexedDB/https_claude.ai_0.indexeddb.leveldb
(this is where the claude.ai origin, which the Code tab's webview runs on, stores "trust" strings) — problem persists after regeneration

**Additional issue**
After repeatedly triggering this dialog / switching to the Code tab, the desktop app has become noticeably slower overall.

**Workaround in use**
Using the Claude Code CLI (`claude` in terminal) instead of the desktop app's Code tab — trust persists correctly there.

Happy to provide more logs/diagnostics if useful.

### What Should Happen?

After clicking "Trust workspace" once, the decision should be persisted, and the dialog should not reappear when reopening the same workspace in a later session.

### Error Messages/Logs

```shell
No error message shown — the dialog simply reappears silently.
```

### Steps to Reproduce

1. Open Claude desktop app, go to Code tab
2. Select a project folder containing .claude/settings.json and .claude/settings.local.json (e.g. /Users/.../**)
3. Workspace trust dialog appears — click "Trust workspace" (작업 공간 신뢰)
4. Close the app completely (Cmd+Q) and reopen it
5. Reopen the same workspace in the Code tab
6. Trust dialog appears again, as if it was never accepted

Additional observation: after repeating this a few times, the desktop app became noticeably slower overall.

### Claude Model

Sonnet (default)

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.263

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

_No response_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Reproduce on macOS 15.5 with the Claude desktop app Code tab by trusting a project containing .claude/settings.json and .claude/settings.local.json, then quitting and reopening. The report points to the claude.ai webview IndexedDB under ~/Library/Application Support/Claude as relevant state to inspect. Done means the same workspace stays trusted across sessions and the dialog no longer reappears.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
macos
Lĩnh vực
desktop, security
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.