xonecas.io
64875
Mc

mini-coder / commit 9843cea

fix: prevent audit skill from killing host tmux session

Root cause: the audit skill instructs the model to use tmux for testing.
The model runs 'tmux kill-session -t audit' before creating its own
session, which kills the host tmux session if it happens to be named
'audit' — sending SIGTERM to the mc process.

Fix: update audit skill to mandate 'mc-audit-' prefixed session names
and explicitly forbid tmux kill-session/kill-server. Document in
KNOWN_ISSUES as a general shell tool hazard.

xonecas2026-03-21 9843cea5153fd0b07183b85c0104b99957d4815e parent 1e8c453

2 files changed

.agents/skills/audit/SKILL.md+4−2
@@ -24,12 +24,14 @@ Run `mc` sessions across all SDK paths to capture what real users see.
2424 Do NOT delegate analysis to the models under test.
2525 Use `tmux` so you can test interactive sessions properly.
2626
27-**tmux send-keys rules** (always follow these to avoid paste/input issues):
27+**tmux rules** (always follow these):
2828
29+- **Session naming**: always prefix tmux session names with `mc-audit-` (e.g. `mc-audit-haiku`, `mc-audit-gemini`). Never use generic names like `audit`, `test`, or `s` — they may collide with the host tmux session and kill the running mc process.
2930 - Always use `-l` when sending text: `tmux send-keys -t <session> -l 'your text here'`
3031 - Send `Enter` as a **separate** call without `-l`: `tmux send-keys -t <session> Enter`
3132 - Never combine text and `Enter` in a single `send-keys` call — without `-l`, words like `Enter`, `Escape`, `Tab`, `Space` get interpreted as key presses instead of literal text.
32-- Pattern: `tmux send-keys -t s -l 'text'` then `tmux send-keys -t s Enter`
33+- Pattern: `tmux send-keys -t mc-audit-test -l 'text'` then `tmux send-keys -t mc-audit-test Enter`
34+- Before creating a session, never run `tmux kill-session` or `tmux kill-server` — just use unique names.
3335
3436 ### Models to use (one per SDK path)
3537
docs/KNOWN_ISSUES.md+1−0
@@ -4,6 +4,7 @@
44
55 - `/model` doesn't autocomplete models provider/name pattern.
66 - AI SDK expands `claude-3-5-haiku` → dated variant that Zen doesn't serve (404).
7+- Shell tool: model can `tmux kill-session` the host tmux session if names collide (e.g. audit skill creates session named "audit" matching the user's). Not a code bug — the skill/model just picks a conflicting name. Mitigate via skill wording or session name prefixing.
78
89 ## Features