diff --git a/src/session.ts b/src/session.ts index 604458e6..bab62b35 100644 --- a/src/session.ts +++ b/src/session.ts @@ -1630,7 +1630,13 @@ export class Session extends EventEmitter { piConfig: this._piConfig, grokConfig: this._grokConfig, deepSeekConfig: this._deepSeekConfig, - ompConfig: this._ompConfig, + // Respawning a dead pane means the CLI process exited (crash, idle + // respawn, or the user's own /exit) but this is still the same + // conversation from the user's perspective — unlike a brand-new + // `createSession` call, defaulting to --continue here is the honest + // behavior. Only when the session has no resume id of its own already + // (an explicit resumeSessionId always wins in buildOmpCommand). + ompConfig: this._ompConfig?.resumeSessionId ? this._ompConfig : { ...this._ompConfig, continueSession: true }, resumeSessionId: this._resumeSessionId, envOverrides: this._envOverrides, effort: this._effort, diff --git a/src/tmux-manager.ts b/src/tmux-manager.ts index 2bd31f96..182db818 100644 --- a/src/tmux-manager.ts +++ b/src/tmux-manager.ts @@ -2391,6 +2391,7 @@ export class TmuxManager extends EventEmitter implements TerminalMultiplexer { piConfig, grokConfig, deepSeekConfig, + ompConfig, resumeSessionId, envOverrides, effort, @@ -2422,6 +2423,7 @@ export class TmuxManager extends EventEmitter implements TerminalMultiplexer { piConfig, grokConfig, deepSeekConfig, + ompConfig, resumeSessionId, effort, sessionName: name,