"""Watch moth and talk to it from a side terminal: python -m moth.tail (python -m moth.tail --watch: no prompt) moth (python -m moth.serve) reacts to every coding-agent turn, but the harness adapters are one-way and never see the reply. This is the display that works next to any harness (Claude Code, Codex, Hermes, Pi, OpenCode, dsh): put it in a tmux split or a side terminal. It polls /api/log and prints moth's new lines, with a dim one-liner for each agent turn moth heard; lines you type go to /api/chat and the reply shows up through the same poll. It never posts to /api/agent (the adapters do that), so moth never hears a turn twice. When moth is down it says so once and keeps retrying, and starts over when moth restarts or the chat is reset (a new log epoch). Stdlib only, no torch: safe to run anywhere. MOTH_URL overrides http://127.0.0.1:4747; the token is read from ~/.moth/token (MOTH_TOKEN_FILE overrides), since the full log holds every agent reply. Terminal escape codes in agent and tool text are stripped before printing. Several agent sessions: each agent note says which one ("claude · moth-repo said: ..."), and --session