Skip to content

A read-only tmux client on the swarm server makes every send-keys fail, silently stalling handoffs #82

Open

Description

@ecoinfoai

Summary

If any read-only tmux client is attached to the swarm's tmux server — for example an operator watching an agent with tmux -S <sock> attach -r -t swarmforge-coder — every external tmux send-keys against that server fails with client is read-only. handoffd then fails to wake the recipient, logs the handoff as failed, and does not retry, so the pack stalls silently. This is one concrete, reproducible cause of the stall described in #34.

Evidence

From .swarmforge/daemon/handoffd.log during a four-pack run:

2026-09-26T06:09:47Z error  …/outbox/50_…_from_coder_to_refactorer.handoff tmux send text failed
2026-09-26T06:09:47Z failed …/outbox/50_…_from_coder_to_refactorer.handoff tmux send text failed

The handoff file was in the refactorer's inbox/new/, the refactorer sat idle, and the pack made no progress for ~80 minutes until the read-only clients were detached and the wake message was re-sent by hand.

Reproduce (tmux 3.7c)

S=/tmp/ro.sock
tmux -S $S new-session -d -s a cat
tmux -S $S new-session -d -s b cat
script -qc "tmux -S $S attach -r -t a" /dev/null &   # one read-only viewer on session a
tmux -S $S send-keys -t a -l x   # client is read-only, exit 1
tmux -S $S send-keys -t b -l x   # client is read-only, exit 1 — a different session

A single read-only client blocks send-keys to every session on the server, including targets given as session:window or pane id (%2). handoffd's notify! and the dashboard's inject-target! both go through send-keys.

Why it matters

Attaching read-only is the natural, "safe" way to watch an agent, and nothing warns that it disables the pack. The dashboard's pane view is unaffected because it uses capture-pane.

Suggestions

Environment

NixOS (Linux 7.2), tmux 3.7c, Babashka 1.13.220, four-pack with Claude agents.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions