From e5a5380c8ef2d3c0c1695388e61da670289ac719 Mon Sep 17 00:00:00 2001 From: NagyVikt Date: Fri, 24 Apr 2026 00:26:14 +0200 Subject: [PATCH] Default auto-doctor to --current so bare gx stays in this repo Before: bare `gx` on a degraded repo auto-ran `gx doctor --target ` which recursively walked every git repo it could find under the parent directory (16 repos in the reported case) before returning control to the user. That blew up a quick status check into a multi-minute repair sweep across unrelated repos. After: the auto-doctor path passes `--current` so it only repairs the repo the user is actually standing in. Recursive repair stays available explicitly via `gx doctor` (no `--current`). Also bumps `@imdeadpool/guardex` to 7.0.30 so the fix ships. Co-Authored-By: Claude Opus 4.7 (1M context) --- package.json | 2 +- src/cli/main.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c397248..4586d5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@imdeadpool/guardex", - "version": "7.0.29", + "version": "7.0.30", "description": "Guardian T-Rex for your multi-agent repo. Isolated worktrees, file locks, and PR-only merges stop parallel Codex & Claude agents from overwriting each other's work. Auto-wires Oh My Codex, Oh My Claude, OpenSpec, and Caveman.", "license": "MIT", "preferGlobal": true, diff --git a/src/cli/main.js b/src/cli/main.js index 1104a0b..1b5bd0b 100755 --- a/src/cli/main.js +++ b/src/cli/main.js @@ -953,9 +953,9 @@ async function maybeAutoRunDoctorFromDefaultStatus(statusPayload) { } const target = statusPayload?.repo?.target || process.cwd(); - console.log(`[${TOOL_NAME}] Auto-repair: repo safety is degraded. Running '${SHORT_TOOL_NAME} doctor' now.`); + console.log(`[${TOOL_NAME}] Auto-repair: repo safety is degraded. Running '${SHORT_TOOL_NAME} doctor --current' now.`); process.exitCode = await runCliSubprocessWithSpinner( - ['doctor', '--target', target], + ['doctor', '--target', target, '--current'], { cwd: target, spinnerPrefix: `[${TOOL_NAME}] Auto-repair:`,