@devo-bmad-custom/agent-orchestration 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -145,12 +145,26 @@ fi
|
|
|
145
145
|
TARGET_PANE_ID="%31"
|
|
146
146
|
MASTER_PANE="%0"
|
|
147
147
|
|
|
148
|
+
# 0. SELF-KILL GUARD — never kill your own pane
|
|
149
|
+
OWN_PANE=$(tmux display-message -p "#{pane_id}")
|
|
150
|
+
if [ "$TARGET_PANE_ID" = "$OWN_PANE" ]; then
|
|
151
|
+
echo "ERROR: refusing to kill own pane $OWN_PANE — coordinator cannot kill itself"
|
|
152
|
+
echo "If you need to exit, use /exit manually."
|
|
153
|
+
exit 1
|
|
154
|
+
fi
|
|
155
|
+
|
|
156
|
+
# Also guard against killing the master pane (unless caller explicitly overrides)
|
|
157
|
+
if [ "$TARGET_PANE_ID" = "$MASTER_PANE" ]; then
|
|
158
|
+
echo "ERROR: refusing to kill master pane $MASTER_PANE"
|
|
159
|
+
exit 1
|
|
160
|
+
fi
|
|
161
|
+
|
|
148
162
|
# 1. Verify pane exists
|
|
149
163
|
sleep 10
|
|
150
164
|
VERIFIED=$(tmux list-panes -a -F "#{pane_id}" | grep -Fx "$TARGET_PANE_ID")
|
|
151
165
|
if [ -z "$VERIFIED" ]; then
|
|
152
166
|
echo "WARN: pane $TARGET_PANE_ID already gone — marking closed in session file"
|
|
153
|
-
# Update session file status
|
|
167
|
+
# Update session file Pane Lifecycle row: status → closed
|
|
154
168
|
exit 0
|
|
155
169
|
fi
|
|
156
170
|
|
|
@@ -167,8 +181,8 @@ if [ -n "$STILL_ALIVE" ]; then
|
|
|
167
181
|
sleep 10
|
|
168
182
|
fi
|
|
169
183
|
|
|
170
|
-
# 4. Update session file — mark pane as closed
|
|
171
|
-
# Edit
|
|
184
|
+
# 4. Update session file — mark pane as closed in Pane Lifecycle table
|
|
185
|
+
# Edit row: status → closed, check coord ✓ boxes
|
|
172
186
|
|
|
173
187
|
# 5. Rebalance remaining panes
|
|
174
188
|
tmux select-pane -t "$MASTER_PANE"
|
|
@@ -459,7 +473,8 @@ fi
|
|
|
459
473
|
|
|
460
474
|
## Common Mistakes (Avoid These)
|
|
461
475
|
|
|
462
|
-
1. **
|
|
476
|
+
1. **Killing own pane** — always check `TARGET_PANE_ID != $(tmux display-message -p "#{pane_id}")` AND `TARGET_PANE_ID != MASTER_PANE` before `kill-pane`
|
|
477
|
+
2. **No `Enter` on send-keys** — message typed but never submitted
|
|
463
478
|
2. **No sleep between tmux commands** — race conditions, stale pane lists
|
|
464
479
|
3. **Combining `/color` and `/rename` in one send-keys call** — only the first command runs; send each as a separate call with `sleep 10` between
|
|
465
480
|
4. **Using OSC 2 / `select-pane -T` for naming** — Claude Code overwrites these
|