Skip to content

Show sessions heed can't hear, and reconnect them - #286

Merged
Mpdreamz merged 3 commits into
mainfrom
fix/unheard-panes
Nov 16, 2026
Merged

Mpdreamz merged 3 commits into
mainfrom
fix/unheard-panes

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

Sessions whose agent pane was started by an older heed (a zmx pane heed reattached, or an agent resumed in one) carry no session token, so heed doesn't take their hook messages. Until now that happened silently: the session kept its last state and was filed under Parked while its agent worked. This makes it visible and fixable. Which messages heed takes is unchanged.

What changed

  • A dropped hook message for a session and agent pane heed knows is noted on the session: why (no token, or a token heed can't verify), when, and how often. The next message heed takes from that pane clears it; a message naming a session heed doesn't have creates nothing.
  • An unheard session is no longer filed by its stale state: it shows under Working with "can't hear it · gk", and a quiet strip over its panes says "heed can't hear this pane — restart it to reconnect".
  • session.reconnect (gk, also in the right-click and Session menus) asks first, ends the pane's process and its zmx session, and resumes the agent in a fresh pane.
  • When the session key can't be read, heed still uses a key for this run only, but now logs it once (session.key) and says so in Settings. A Keychain read error no longer makes heed write a new key over the stored one.
  • Docs: troubleshooting, the hooks page, the keyboard reference.

Verified

  • mise run fmt, lint, text-check, tutor-check (0 problems) and test (2585 tests) pass after rebasing on main; seven mutations each failed their test.

Not tested

  • Reconnecting a real zmx session or a pane on a remote host.

🤖 Generated with Claude Code

Mpdreamz and others added 3 commits November 16, 2026 19:28
A hook message without the pane's token, or with one heed cannot check, is
still not taken; when it names a session heed has and comes from that
session's agent pane, the session now carries an Unheard value (reason,
first and last time, count) for this run, cleared by the next message heed
takes from that pane. Such a session is filed under Working instead of by
the state it last reported. session.reconnect (gk in the sessions scope)
restarts its agent; the right-click and Session menus offer it.

Reading the session key reports why the key is this run's only when it is
(SessionKeyRead), and a Keychain that cannot be read is no longer written
over with a new key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n the session key is this run's only

The session row says "can't hear it" with the key, and a quiet strip over
its panes says "heed can't hear this pane — restart it to reconnect" with
Restart. gk asks first, then ends the pane's process and its zmx session
(here or on its host) and resumes the agent in a new terminal with this
run's token, as resume does. A session key that could not be read or kept
goes in the call log once and Settings shows a notice for the run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working label Nov 16, 2026
@Mpdreamz
Mpdreamz merged commit 93a656c into main Nov 16, 2026
5 checks passed
@Mpdreamz
Mpdreamz deleted the fix/unheard-panes branch November 16, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant