← back to Commercialrealestate
add fix-workspace-trust.js — restores hasTrustDialogAccepted after mac3 migration
0ab08f24995649e0e779b98edc51924350cdb83b · 2026-07-07 13:52:16 -0700 · Steve
The Jul 2 Claude update + mac3 migration reset ~/.claude.json workspace trust to
false, silently breaking every headless 'claude -p' launchd job (Unknown command
on slash-command jobs; ignored permissions on plain-prompt jobs). This one-shot
restores it with a backup. Paste-safe alternative to a long node -e one-liner.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
A scripts/fix-workspace-trust.js
Diff
commit 0ab08f24995649e0e779b98edc51924350cdb83b
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Jul 7 13:52:16 2026 -0700
add fix-workspace-trust.js — restores hasTrustDialogAccepted after mac3 migration
The Jul 2 Claude update + mac3 migration reset ~/.claude.json workspace trust to
false, silently breaking every headless 'claude -p' launchd job (Unknown command
on slash-command jobs; ignored permissions on plain-prompt jobs). This one-shot
restores it with a backup. Paste-safe alternative to a long node -e one-liner.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
scripts/fix-workspace-trust.js | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/scripts/fix-workspace-trust.js b/scripts/fix-workspace-trust.js
new file mode 100644
index 0000000..49727c9
--- /dev/null
+++ b/scripts/fix-workspace-trust.js
@@ -0,0 +1,22 @@
+#!/usr/bin/env node
+// fix-workspace-trust.js — flip hasTrustDialogAccepted=true for /Users/macstudio3 in ~/.claude.json.
+//
+// WHY: the Jul 2 2026 Claude update + mac3 migration reset workspace trust to false. Headless
+// `claude -p` launchd jobs then refuse to load workspace skills/slash-commands ("Unknown command:
+// /officer-council") and ignore the permissions.allow entries — silently breaking every scheduled
+// claude-invoking cron. This restores trust so those jobs work again. Backs up ~/.claude.json first.
+//
+// Run: node ~/Projects/commercialrealestate/scripts/fix-workspace-trust.js
+'use strict';
+const fs = require('fs');
+const p = process.env.HOME + '/.claude.json';
+const bak = p + '.bak-trust-' + Date.now();
+fs.copyFileSync(p, bak);
+const j = JSON.parse(fs.readFileSync(p, 'utf8'));
+j.projects = j.projects || {};
+j.projects['/Users/macstudio3'] = j.projects['/Users/macstudio3'] || {};
+const before = j.projects['/Users/macstudio3'].hasTrustDialogAccepted;
+j.projects['/Users/macstudio3'].hasTrustDialogAccepted = true;
+fs.writeFileSync(p, JSON.stringify(j, null, 2));
+console.log('hasTrustDialogAccepted: ' + before + ' -> true');
+console.log('backup: ' + bak);
← f81d920 afternoon CRE update 2026-07-07
·
back to Commercialrealestate
·
chore: lint (syntax-check ✓), v0.3.1 → v0.4.0 (session close b7ae291 →