Skip to content

agents & notifications

Your agents get a voice. You get your afternoon back.

Agentic runs are long, chatty and easy to abandon. mtmux watches the pane itself — the last screen, the process tree, the silence — and tells you which of four things happened.

The four agent states

done

It finished the work

Idle prompt returned, or the wrapped process exited 0. The push carries a diff summary and test result.

blocked

It is waiting on you

A y/n, an approval dialog, a permission request. Answer straight from the notification.

stalled

It went quiet

No new output for your threshold, no exit. Usually a hung build, a rate limit, or a lost connection.

failed

It died

Non-zero exit, pane death, or a matched error signature. The last 20 lines come with it.

Presets, not homework

Run mtmux watch --agents and mtmux identifies known agents by process and pane signature. Each preset knows what “done” and “blocked” look like for that tool.

Detection presets by agent: the done signal, the block signal, and whether replies are supported.
AgentDone signalBlock signalReply
claude codeidle prompt + diff summarytool approval, permissionyes
codex cliexit codeapply-patch, continue?yes
gemini cliidle prompttool confirmationyes
aidercommit lineadd file? (y/n)yes
anything elsewrap with mtmux runyour regex listkeys

Hooks API

Three ways in, in increasing order of effort: wrap a command, emit an event from a script, or bind a tmux hook.

shell
# 1. wrap anything
mtmux run --label nightly -- pytest -x
# 2. emit from a script
mtmux notify --level blocked \
--actions y,n "deploy to prod?"
# 3. tmux hook
set-hook -g pane-died \
'run "mtmux notify --level failed"'

Routing

Send each level where it belongs. Quiet hours, per-session overrides and dedupe windows are all per-rule.

iOS & Android pushactionable, high-priority
Slackchannel or DM, threaded
Discordwebhook, embed with tail
ntfy / gotifyself-hosted push
Webhooksigned JSON, retried
Desktopnative notification centre

Webhook payloads include session, window, pane, agent, level, matched signal and a base64 tail — enough to build your own dashboard.

A morning with three agents running

  1. 08:41

    Kicked off a refactor in work:1 and walked to the train.

  2. 08:52

    Push: codex wants to apply a migration. Tapped y from the platform.

  3. 09:06

    Push: no output for 9 minutes in web:2. Opened the pane, killed a hung installer, restarted it.

  4. 09:18

    Push: refactor done, 27 tests green. Read the diff on the phone, left two comments in a scratch pane.

  5. 09:34

    Sat down at the desk. Same three sessions, exactly where the phone left them.

faq

Questions about agent notifications

Stop babysitting the terminal.

mtmux watch --agents is the whole setup.