Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

Merge branch 'pr-160' into integration/v0.4.5

Chaitanya Giri95ccb3139b22
diff --cc src/main/config.ts
index e2a3b597,3cb8e025..809d3bd6
--- a/src/main/config.ts
+++ b/src/main/config.ts
@@@ -679,17 -678,11 +679,19 @@@ export function commandForAutoMode
return flag ? `${base} ${flag}` : base;
}
- /** Ensure harnessHome exists on disk. */
+ /** Ensure harnessHome exists on disk. Expands `~` first — the onboarding wizard
+ * lets the user type the path, and mkdir treats a literal `~` as a plain
+ * directory name (issue #140's `ENOENT: mkdir '~/HarnessAgents'`). */
export function ensureHarnessHome(path: string): { ok: boolean; error?: string } {
try {
+ // Expand HERE too, not only at the config write (#140). This runs FIRST —
+ // onboarding calls it before updateConfig — so normalizing only at the write
+ // boundary left the actual mkdir still receiving a literal `~`. Depending on
+ // the process cwd that either fails outright or, worse, quietly succeeds by
+ // creating a directory genuinely named "~" somewhere nobody will look, and
+ // the hive then lives at a path the user cannot find. This is the
+ // "defense-in-depth at the consumers" the expandTilde doc calls for: the
+ // ingestion point normalizes, and the consumer refuses to trust that it did.
mkdirSync(expandTilde(path), { recursive: true });
return { ok: true };
} catch (e) {