fix(tmux): skip agent area width guard when 0 agent panes exist

When no agent panes exist, mainPane.width equals windowWidth, making
agentAreaWidth zero. The early return guard blocked initial pane creation
before the currentCount === 0 handler could execute.

Add currentCount > 0 condition so the guard only fires when agent panes
already exist, allowing the bootstrap handler to evaluate canSplitPane.

Closes #1939
This commit is contained in:
YeonGyu-Kim
2026-02-18 17:30:05 +09:00
parent 5bb0e69dea
commit e2e89b1f57
2 changed files with 61 additions and 1 deletions
@@ -32,7 +32,7 @@ export function decideSpawnActions(
)
const currentCount = state.agentPanes.length
if (agentAreaWidth < minPaneWidth) {
if (agentAreaWidth < minPaneWidth && currentCount > 0) {
return {
canSpawn: false,
actions: [],