opencode run --fork/--continue --dir <path> fails to create sessions #105
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Bug Description
Running
kugetsu startorkugetsu continuefails becauseopencode run --fork --dir <path>does NOT create a session. The command runs but the session is never registered inopencode session list. No error is shown — it silently fails.Same issue with
(cd "$worktree" && opencode run --fork ...)in a subshell.opencode run --continue --session <id> --dir <path>also fails to work properly.Reproduction
Root Cause
The
--dirflag breaks session creation for--forkand--continue. When kugetsu uses--dir, the command executes but the session is never registered.Workaround Applied
Removed
--dirfromopencode run --forkandopencode run --continue. Session creation now works but worktree directory isolation is lost — agents run from opencode default directory.Impact
kugetsu start,kugetsu continue, and any tool using--dirwith--fork/--continue