Skip to content

fix(profile): allow Claude Code UID-suffixed tmp dirs and skills#12

Merged
Pierozi merged 2 commits into
agentic-dev3o:mainfrom
stefandeml:fix/claude-profile-tmp-paths
Jan 31, 2026
Merged

fix(profile): allow Claude Code UID-suffixed tmp dirs and skills#12
Pierozi merged 2 commits into
agentic-dev3o:mainfrom
stefandeml:fix/claude-profile-tmp-paths

Conversation

@stefandeml
Copy link
Copy Markdown
Contributor

Claude Code writes session data to /private/tmp/claude-501/ (with UID suffix) rather than /private/tmp/claude/. The previous literal path caused sandbox denials on file-write-create, making Claude hang when executing API calls (e.g. sx online claude -- claude -p "prompt").

Changes:

  • Use glob /private/tmp/claude* to match UID-suffixed directories
  • Add ~/.agents to allow_read for Claude skills/plugins access

Claude Code writes session data to /private/tmp/claude-501/ (with UID
suffix) rather than /private/tmp/claude/. The previous literal path
caused sandbox denials on file-write-create, making Claude hang when
executing API calls (e.g. `sx online claude -- claude -p "prompt"`).

Changes:
- Use glob /private/tmp/claude* to match UID-suffixed directories
- Add ~/.agents to allow_read for Claude skills/plugins access

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@stefandeml stefandeml mentioned this pull request Jan 30, 2026
@Pierozi
Copy link
Copy Markdown
Contributor

Pierozi commented Jan 30, 2026

I wanted to make the support of glob path but unfortunately it's not supported by Seatbelt.

@Pierozi Pierozi added the invalid This doesn't seem right label Jan 30, 2026
@stefandeml
Copy link
Copy Markdown
Contributor Author

Not sure I’m following.
"/private/tmp/zsh*" is already in there using a glob, right?
seatbelt.rs contains the glob-to-regex machinery.

@Pierozi
Copy link
Copy Markdown
Contributor

Pierozi commented Jan 30, 2026

Ah yes indeed I forgot that I finally added it with a "hack" of converting it to a regex.
Thanks for the change because for directory it's better to not have glob.

@Pierozi Pierozi removed the invalid This doesn't seem right label Jan 30, 2026
@Pierozi
Copy link
Copy Markdown
Contributor

Pierozi commented Jan 30, 2026

The folder and subfolder are already allowed. you can confirm it by running

sx claude -- ls -lh /private/tmp/claude/

Usually the hang are coming from MCP.

For full trace

sx --trace online claude -- claude --dangerously-skip-permissions -p "What is 2+3"
[sx:trace] Starting sandbox violation trace...
[sx:trace] [READ] file-read-data /private/tmp (2.1.25(55503))
[sx:trace] [READ] file-read-data /Applications/Pencil.app/Contents/Resources/app.asar.unpacked/out/mcp-server-darwin-arm64 (mcp-server-darwin-arm64(55528))
[sx:trace] [WRITE] file-write-create /Users/pierozi/.local/state/claude/locks/2.1.25.lock.tmp.55503.1769792503199 (2.1.25(55503))
[sx:trace] [READ] file-read-data /Users/pierozi/.cache/claude/staging (2.1.25(55503))
[sx:trace] [READ] file-read-data /Users/pierozi/.local/state/claude/locks (2.1.25(55503))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/config (ssh(55546))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/id_rsa (ssh(55546))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/id_rsa.pub (ssh(55546))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/id_rsa (ssh(55546))
[sx:trace] [READ] file-read-data /private/tmp (2.1.25(55533))
[sx:trace] [READ] file-read-data /private/tmp (2.1.25(55532))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/known_hosts (ssh(55546))
[sx:trace] [READ] file-read-data /Users/pierozi (2.1.25(55503))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/known_hosts (ssh(55546))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/known_hosts (ssh(55546))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/id_rsa (ssh(55546))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/config (ssh(55599))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/id_rsa (ssh(55599))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/id_rsa.pub (ssh(55599))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/id_rsa (ssh(55599))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/known_hosts (ssh(55599))
[sx:trace] [READ] file-read-data /Users/pierozi/.ssh/id_rsa (ssh(55599))
5

@stefandeml
Copy link
Copy Markdown
Contributor Author

Yeah, that folder obviously works.
But the issue is that 'claude' is not enough as parallel sessions create eg 'claude-001'.

Comment thread profiles/claude.toml Outdated
allow_read = [
"~/.claude",
"~/.claude.json",
"~/.agents",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove only that because it's not related to Claude directly.

Copy link
Copy Markdown
Contributor Author

@stefandeml stefandeml Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I can delete. But many people these days just have symlinks form .claude to .agents to make sure things are picked up by opencode as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted

@Pierozi
Copy link
Copy Markdown
Contributor

Pierozi commented Jan 30, 2026

Indeed I reproduced the issue. Strange that I did not encounter it before.
Thanks for contributing.

Not directly related to Claude Code — addressing PR review feedback.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Pierozi Pierozi merged commit fe4fff4 into agentic-dev3o:main Jan 31, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants