Files
oh-my-claudecode/scripts
Joao Pster dc3f3b82c0 fix(multi-repo): accept repo subdirs as cwd; stop workspace search at $HOME
Addresses Codex review on #3130.

P1 (validateCwd): cwd is commonly a subdirectory of the repo/workspace root.
The previous direct-only check rejected subdirs and made session-start skip
all restoration. Now walk up from cwd to find a .git or .omc-workspace,
stopping at $HOME so a stray marker/repo in $HOME cannot validate an unrelated
dir. Applied to both scripts/session-start.mjs and templates/hooks/session-start.mjs.

P2 (findWorkspaceRoot): the home-boundary check now runs before the marker
check, so a stray ~/.omc-workspace no longer collapses unrelated repos under
home into one shared state root.

Added a regression test: session-start accepts a nested subdir of a .git repo.

Confidence: high
Scope-risk: narrow
2026-05-26 12:53:28 -03:00
..