Skip to content

fix(nix): make the materialized .claude/ writable so the skills hook can write - #138

Merged
Soushi888 merged 1 commit into
devfrom
fix/nix-claude-dir-readonly
Aug 16, 2026
Merged

fix(nix): make the materialized .claude/ writable so the skills hook can write#138
Soushi888 merged 1 commit into
devfrom
fix/nix-claude-dir-readonly

Conversation

@Soushi888

Copy link
Copy Markdown
Collaborator

Intent

Every nix develop entry and every CI job logs this, three times:

rsync: [Receiver] mkdir ".claude/skills/holochain" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(791)

It is non-fatal, but it is noise on every run and an active red herring when diagnosing real failures: in PR #130's failing e2e run the error appears immediately before launch-happ.mjs exited before ready, which invites the conclusion that they are related. They are not, and confirming that costs time each round.

Root cause

The shellHook materializes .claude/ out of the nix store:

rsync -a --delete ${./pai/claude}/ .claude/

rsync -a preserves permissions, and nix store paths are read-only, so .claude/ lands as mode 555. The agent-skills hook that runs a few lines later then cannot mkdir .claude/skills/holochain inside it.

.cursor/ is materialized the same way and already carries chmod -R u+w .cursor for exactly this reason. .claude/ was simply missing the equivalent line.

Change

One line, mirroring the .cursor/ treatment, placed after the rsync and before the skills hook, with a comment recording why it is load-bearing.

How to test

chmod -R u+w .claude && rm -rf .claude
nix develop --command true    # first run: materializes
nix develop --command true    # second run: this is the one that used to fail

Verified locally: .claude is now drwxr-xr-x, .claude/skills/holochain is created, and the second run produces no rsync output at all. Before the fix the second run reproduced the error every time.

Related

Clears one of the two prerequisites listed for reviewing #130 (the other being the 0.7 launcher timeout, which is genuinely unrelated and remains open).

…can write

rsync -a preserves the read-only mode of nix store paths, so after the
first materialization .claude/ was mode 555 and the agent-skills hook
could not mkdir .claude/skills/holochain. Every nix shell entry and every
CI job logged 'rsync: mkdir failed: Permission denied (13)' three times.

Non-fatal but noisy, and a red herring when diagnosing real e2e failures:
in PR #130's failing run the error appears immediately before the launcher
timeout, though the two are unrelated.

.cursor/ already had this exact chmod; .claude/ was missing it.
@Soushi888
Soushi888 merged commit 8f3fb37 into dev Aug 16, 2026
7 checks passed
@Soushi888
Soushi888 deleted the fix/nix-claude-dir-readonly branch August 16, 2026 00:35
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.

1 participant