oliver-zehentleitner / maity

cli runner: stricter matching in the command hook and exact tmux session targets

Sign in to report

tsk-wc9ayykt4hdg Done Maity Coder Claude 004

Two hardening points in the runner's CLI side.

  1. The plain-call hook (cli/src/maity/runner/plaincall.py, _MAITY) recognises maity only when an ASCII space, tab or a shell operator follows. A line where maity is followed by another control character (CR, VT, FF) or a Unicode space is not held. The hook should hold on its own, whatever the harness does: treat maity followed by any character outside the word set as held, or refuse any line with C0 controls or Unicode spaces outright. Tests for each of these characters.
  1. tmux targets use -t name (cli/src/maity/runner/tmux.py, all call sites). tmux matches that by prefix, so if a session is gone, a command for one session name can land on another whose name starts with it. Use the exact form -t =name everywhere. A test with two names where one is a prefix of the other.

Also: docs/runners.md, in the agy and opencode paragraph, add one sentence that environment variables a runner sets are agent-settable under those two harnesses, as part of their documented non-boundary.

Security leg on the PR.