Skip to content

fix(setup): handle read-only .claude directory in sandboxed environments#702

Merged
BYK merged 1 commit intomainfrom
fix/699-readonly-claude-sandbox
Apr 9, 2026
Merged

fix(setup): handle read-only .claude directory in sandboxed environments#702
BYK merged 1 commit intomainfrom
fix/699-readonly-claude-sandbox

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 9, 2026

Summary

Fixes #699

  • Add accessSync(W_OK) pre-check in installAgentSkills() before attempting file creation — prevents sandbox process termination when ~/.claude is read-only
  • Report setup step failures to Sentry via captureException in bestEffort() and the agent-skills catch block for visibility into errors that were previously silently swallowed
  • Add test for sandbox scenario (read-only .claude directory with 0o555 permissions)

…nts (#699)

Add a writability pre-check (accessSync W_OK) in installAgentSkills()
before attempting file creation. Some sandboxes (e.g., Claude Code)
make ~/.claude read-only and may terminate the process on write
syscalls, bypassing the existing try/catch.

Also report setup step failures to Sentry via captureException in
bestEffort() and the agent-skills catch block so we have visibility
into installation errors that were previously silently swallowed.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Bug Fixes 🐛

Dashboard

  • Add --layout flag to widget add for predictable placement by BYK in #700
  • Render tracemetrics widgets in dashboard view by BYK in #695

Other

  • (init) Narrow command validation to actual shell injection vectors by betegon in #697
  • (init,feedback) Default to tracing only in feature select and attach user email to feedback by MathurAditya724 in #688
  • (setup) Handle read-only .claude directory in sandboxed environments by BYK in #702

Internal Changes 🔧

  • (docs) Gitignore generated command docs, extract fragments by BYK in #696
  • (eval) Replace OpenAI with Anthropic SDK in init-eval judge by betegon in #683
  • (init) Use markdown pipeline for spinner messages by betegon in #686
  • Regenerate skill files and command docs by github-actions[bot] in 584ec0e0

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/pr-preview/pr-702/

Built to branch gh-pages at 2026-04-09 13:19 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Codecov Results 📊

134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 1523 uncovered lines.
❌ Project coverage is 95.36%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    95.48%    95.36%    -0.12%
==========================================
  Files          224       225        +1
  Lines        32591     32790      +199
  Branches         0         0         —
==========================================
+ Hits         31115     31267      +152
- Misses        1476      1523       +47
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review April 9, 2026 13:22
@BYK BYK merged commit 881d41d into main Apr 9, 2026
25 checks passed
@BYK BYK deleted the fix/699-readonly-claude-sandbox branch April 9, 2026 13:32
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.

Incompatible with Claude Code sandbox

1 participant