You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cli): /move — rebind a session to a new working directory #1101
A session's cwd is fixed at creation. When a project relocates (repo moved, checked out elsewhere), the session cannot follow — its history stays bound to the old path. Benchmark exists: opencode session.move (tui/src/component/prompt/move.tsx).
Desired outcome
/move opens a directory picker with path completion (reuse the autocomplete file provider).
Persist the new cwd to the session header (same update seam as /rename), effective for subsequent turns.
Inject a synthetic <system-reminder> telling the model the cwd changed ("same project, possibly new location") — the opencode move.tsx pattern.
Warn when the old directory has uncommitted changes (opencode offers to move them; warn-only is fine for MVP).
Seams
SessionHeader.cwd in session-store; sessionCwdOverride (packages/cli/src/runtime-bootstrap.ts) already shows the backend-creation-time patch point used by maka run resume — interactive sessions need the cwd to refresh per turn or on next backend creation.
Out of scope: opencode's "new git worktree copy" destination (possible follow-up).
Add /move to the CLI/TUI and reuse the existing directory picker and file-path autocomplete.
Validate the selected directory, persist it to SessionHeader.cwd, and refresh the runtime/backend cwd so subsequent turns use it.
Inject a system reminder explaining that the session working directory changed.
Read-only check the old cwd for uncommitted changes and show a warning when applicable.
Keep worktree copying out of scope.
Before implementation I will verify the session lifecycle and active-turn behavior, header/runtime consistency, resume/replay semantics, invalid or missing paths, and empty input handling. I will add focused behavioral tests, then run the relevant CLI/runtime typechecks, the full CLI test suite, lint, and git diff --check.
Please assign this issue to me before I start. After assignment I will create a dedicated branch from the latest main and submit the implementation as a separate PR.
Assigned! Personally I use move in Opencode for move between worktrees the most, It would be great to see moving between worktrees being targeted as the first major UX journey. Look forward to your PR!
Activity
Nyvo-io commentedon Jul 18, 2026
I would like to claim this issue.
Implementation scope:
/moveto the CLI/TUI and reuse the existing directory picker and file-path autocomplete.SessionHeader.cwd, and refresh the runtime/backend cwd so subsequent turns use it.Before implementation I will verify the session lifecycle and active-turn behavior, header/runtime consistency, resume/replay semantics, invalid or missing paths, and empty input handling. I will add focused behavioral tests, then run the relevant CLI/runtime typechecks, the full CLI test suite, lint, and
git diff --check.Please assign this issue to me before I start. After assignment I will create a dedicated branch from the latest
mainand submit the implementation as a separate PR.Astro-Han commentedon Jul 18, 2026
Assigned! Personally I use move in Opencode for move between worktrees the most, It would be great to see moving between worktrees being targeted as the first major UX journey. Look forward to your PR!
Astro-Han commentedon Jul 18, 2026
@Nyvo-io Do you have wechat or Email that we can contact you except Github? It would make communicating much more smoother. Cheers!
Nyvo-io commentedon Jul 18, 2026
Nyvo-io commentedon Jul 18, 2026