Bridge mailbox

From leopu00/job-hunter-team · View interactive version

Bridge mailbox is an AI agent skill from the GitHub repository leopu00/job-hunter-team. Drain pending bridge verdicts at the START of every Captain turn — MANDATORY first action before doing anything else. During a long turn, `jht-tmux-send` from the bridge can fail with rc=3 (text never appeared in the pane) and a `[BRIDGE PACING]` or `PIPELINE STALLED` verdict gets silently dropped.

How to use this skill

Skill file

bridge-mailbox — recover missed verdicts

The bridge talks to you over tmux, but tmux delivery can fail silently during a long turn (Codex / Kimi TUI render issues, you were inside a long tool call, etc.). To make sure no verdict is lost, the bridge also appends every tick to a JSONL mailbox at $JHT_HOME/logs/bridge-mailbox.jsonl. You drain it at the top of every turn.

The mandatory first action

Before anything else — before reading messages, before deciding actions, before opening another skill — run:

python3 /app/shared/skills/bridge_mailbox.py drain

Possible outputs:

drain consumes the entries (they are marked read on success) — re-running it returns no pending verdicts until the bridge appends new ones.

Then, your mailbox

When the team uses the mailbox, the messages of other agents wait for you in files; they are not typed into your terminal. Right after the drain above, run:

jht-mail drain

How to apply drained verdicts

Process ALL the lines, but act only on the last one. The earlier ones are already stale — the metrics have moved since. Two exceptions where an earlier line still matters:

  1. PIPELINE STALLED recent (< 30 min) and still pertinent (proj is still low, team_kt is still low right now). Act on the playbook (re-light the pipeline upstream) even if a later valid [BRIDGE PACING] arrived after it. Stalls are state, not events — they need clearing, not just measuring.
  2. A [PAUSA TEAM] / [HARD FREEZE] you missed. If one is in the queue and you have not yet sent [RIPRENDI], the team is still frozen — handle it with sentinel-orders before the latest pacing.

For the routine case (one or more [BRIDGE PACING] lines):

Other commands (debug / inspection)

python3 /app/shared/skills/bridge_mailbox.py status   # how many pending vs total
python3 /app/shared/skills/bridge_mailbox.py peek     # read without consuming

Use peek when you suspect something fishy and want to look without committing — it does NOT mark entries as read.

Anti-patterns

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.