fix(omp): wire ompConfig into respawnPane and default to --continue there

respawnPane() -- the path used when a session's pane died (crash, idle
respawn, or the user's own /exit) but the Codeman session object is
still tracked -- never had ompConfig wired through at all, in either
its options destructure or its inner buildSpawnCommand() call. This is
a gap in the original OMP patch, distinct from the resumeHistorySession
fix (which only covers a session that has been fully closed and shows
up as a history row): reselecting a tab whose CLI process just exited
goes through this path instead, and always launched a bare, contextless
`omp` no matter what.

Beyond the wiring, respawning a dead pane is semantically different
from creating a brand-new session: the conversation is still "this
session" to the user, so _buildRespawnPaneOptions() now defaults
ompConfig to continueSession:true unless the session already carries
an explicit resumeSessionId (which still wins in buildOmpCommand).

Verified live: told a session a secret, exited OMP so the pane died
(session and tmux both left alone), forced the exact dead-pane-respawn
path, and the new process replied with the secret -- confirming
`omp --continue` fired instead of a blank omp.
This commit is contained in:
timkjr
2026-08-28 11:32:30 -05:00
parent 3e1a0e679f
commit 253599ce9c
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -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,
+2
View File
@@ -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,