Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,11 @@ async function openSession(session, customOptions) {

// Open terminal in main process
const resumeOptions = customOptions || await resolveDefaultSessionOptions({ projectPath });
// The `worktree` default applies to NEW sessions only. Resuming must reuse the
// session's existing directory, so never pass --worktree on resume — otherwise
// a plain-click resume tries to spin up a fresh git worktree and fails to attach
// (the Resume-with-config dialog already omits worktree, which is why it works).
if (resumeOptions) { delete resumeOptions.worktree; delete resumeOptions.worktreeName; }
const result = await window.api.openTerminal(sessionId, projectPath, false, resumeOptions);
if (!result.ok) {
entry.terminal.write(`\r\nError: ${result.error}\r\n`);
Expand Down