Agent status: read hook-reported state from pane user options - #104
Open
Raphael-Hao wants to merge 1 commit into
Open
Agent status: read hook-reported state from pane user options#104Raphael-Hao wants to merge 1 commit into
Raphael-Hao wants to merge 1 commit into
Conversation
Raphael-Hao
force-pushed
the
feature/agent-status-signals
branch
from
August 24, 2026 11:40
5cde418 to
b677920
Compare
Raphael-Hao
force-pushed
the
feature/agent-hook-read
branch
from
August 24, 2026 11:40
d579fd6 to
16fba90
Compare
PANE_FORMAT gains #{@deck_agent_state}: the optional lifecycle hooks
(next step) write "<state>@<epoch>" onto the agent's own pane via the
$TMUX_PANE it inherited, so both gathering paths read the report in the
list-panes hop they already pay for — no socket, no resident process,
and the option dies with the pane.
hook_status decodes and expires the report against the owning server's
clock: Working dies after 60s (hooks are edge-triggered; Esc, deny, and
kill all fire no closing event), Blocked after 10min, Idle never (the
ground state the weak screen fallback agrees with anyway). In the merge
the hook sits below the positive idle tells — the interrupt/completed
lines are what retract a stale hook Working — and lights the streaming
blind spot when the activity clock has no signal.
Inert until the hooks are installed; verifiable by hand with
tmux set-option -p @deck_agent_state "working@$(date +%s)".
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141oi9wW2ak6qv2DbgUHv1A
Raphael-Hao
force-pushed
the
feature/agent-status-signals
branch
from
August 25, 2026 06:50
b677920 to
7ca783c
Compare
Raphael-Hao
force-pushed
the
feature/agent-hook-read
branch
from
August 25, 2026 06:50
16fba90 to
5a69d12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR 4 of
docs/agent-status-plan.md(stacked on #103 → #102; merge those first).The transport for the optional agent lifecycle hooks, read side only:
PANE_FORMATgains#{@deck_agent_state}— a pane-scoped tmux user option the hook script (next PR) writes via the$TMUX_PANEthe agent inherited. Both gathering paths read it in thelist-paneshop they already pay for: zero extra ssh round-trips, no resident remote process, keyed by the%Nid deck already targets, gone automatically when the pane dies.hook_statusdecodes"<state>@<epoch>"against the owning server's clock (localSystemTime, remote the probe'sdate +%s): Working expires after 60 s — hooks are edge-triggered and Esc / permission-deny / kill fire no closing event; Blocked after 10 min; Idle never (ground state).merge_statusgains the hook source, deliberately below the positive idle tells (the interrupt/completed lines are what retract a stale hook Working) and available to light the streaming blind spot when the activity clock has no signal (split window, old tmux).Inert in production until PR 5 installs the hooks; the whole chain is hand-verifiable with
tmux set-option -p @deck_agent_state "working@$(date +%s)".Tests
773 workspace tests pass; new tests cover decode/expiry and the hook's place in the merge order.
🤖 Generated with Claude Code
https://claude.ai/code/session_0141oi9wW2ak6qv2DbgUHv1A