Skip to content

chore(scripts): copy .claude/settings.local.json into worktrees - #1535

Merged
gabrielseco merged 1 commit into
mainfrom
chore/worktree-copy-claude-settings-local
Oct 13, 2026
Merged

gabrielseco merged 1 commit into
mainfrom
chore/worktree-copy-claude-settings-local

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

npm run worktree now also copies the main checkout's .claude/settings.local.json into the new worktree.

Why

That file holds personal, untracked Claude Code settings (permissions, hooks). A session started inside a worktree didn't get them, so local hooks and allowlists silently stopped applying there. The script already copies CLAUDE.local.md and the .env.* files for the same reason.

What changed

Toggle details
  • scripts/create-worktree.ts: if .claude/settings.local.json exists in the main checkout, create .claude/ in the worktree if needed and copy the file, logging Copied .claude/settings.local.json. Nothing happens when the file is absent.
  • Dev tooling only. No change to the public API or the bundle.
  • Existing worktrees are not updated; only newly created ones get the file.

Screenshots

N/A

Related Resources

N/A

Testing

  • Tested against the example/ app in a browser: N/A, dev script only
  • Feature flag: N/A

Created a worktree with the script and confirmed it runs. Lint reports no errors and tsc --noEmit passes.

🤖 Generated with Claude Code


Note

Low Risk
Dev-only change to the worktree setup script; no runtime, API, or production impact.

Overview
Extends npm run worktree so new git worktrees inherit the main checkout’s local Claude Code config, not just CLAUDE.local.md and .env.* files.

When .claude/settings.local.json exists in the repo root, the script creates .claude/ in the worktree if needed, copies that file, and logs the action. If the file is missing, behavior is unchanged. Only affects newly created worktrees.

Reviewed by Cursor Bugbot for commit feed8f0. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-qnpqn5wgu-remotecom.vercel.app
Latest Commit:feed8f0

Deployed with vercel-action

@github-actions

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-dix5h0oz7-remotecom.vercel.app
Latest Commit:feed8f0

Deployed with vercel-action

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚪ Coverage unchanged

Metric Current Previous Change Status
Lines 89.58% 89.58% 0% ⚪
Statements 89.45% 89.45% 0% ⚪
Functions 88.47% 88.47% 0% ⚪
Branches 81.20% 81.20% 0% ⚪

Detailed Breakdown

Lines Coverage
  • Covered: 5389 / 6016
  • Coverage: 89.58%
  • Change: 0% (0 lines)
Statements Coverage
  • Covered: 5454 / 6097
  • Coverage: 89.45%
  • Change: 0% (0 statements)
Functions Coverage
  • Covered: 1427 / 1613
  • Coverage: 88.47%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 3343 / 4117
  • Coverage: 81.20%
  • Change: 0% (0 branches)

✅ Coverage check passed

@gabrielseco
gabrielseco merged commit a7bb7bd into main Oct 13, 2026
13 checks passed
@gabrielseco
gabrielseco deleted the chore/worktree-copy-claude-settings-local branch October 13, 2026 15:25
@gabrielseco gabrielseco mentioned this pull request Oct 14, 2026
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