fix(sessions): recover login-shell PATH so tmux works after reboot #184
No reviewers
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman!184
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/tool-path-after-reboot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
exec.LookPathfor tmux/opencode/git then fails, so creating a session in an existing project errors with "No running OpenCode instance here, and tmux is unavailable to start one."ensureToolPath()(newpath_env.go) runs once at startup, asks the user's login shell for its PATH, and merges any missing entries into the process PATH before anyLookPathruns. Best-effort; leaves PATH untouched on error.Testing
go test .(mergePath table test + reboot-simulation test that hides a binary behind a stripped PATH and asserts recovery)pnpm exec vitest run src/lib/createSessionWithLaunch.test.tsmake lintCoverage ratchet: ✅ pass
Tolerance: -0.1%. Baseline stored on
gh-pages.