Skip to content

Agent status signals: pane title, activity clock, evidence merge - #103

Open
Raphael-Hao wants to merge 1 commit into
feature/agent-status-classifierfrom
feature/agent-status-signals
Open

Agent status signals: pane title, activity clock, evidence merge#103
Raphael-Hao wants to merge 1 commit into
feature/agent-status-classifierfrom
feature/agent-status-signals

Conversation

@Raphael-Hao

Copy link
Copy Markdown
Collaborator

What

PR 2+3 of docs/agent-status-plan.md (stacked on #102 — merge that first; this diff shows only the delta once GitHub retargets).

  • PANE_FORMAT gains #{window_activity}, #{window_panes}, #{pane_title} — title last and bounded-split, since titles are arbitrary program text that may contain tabs. Missing/empty tail fields degrade to None, never a dropped pane, so older remote tmux keeps working.
  • The remote agent probe appends date +%s behind a second shell-safe marker: activity freshness is judged against the remote's own clock, so ssh-host clock skew never enters the freshness window. Same single ssh hop.
  • merge_status + activity_fresh in agent-detect: visible dialog > viewer overlay (keep_previous, resolved against the previous status at snapshot apply in app/refresh.rs) > live working tell / fresh output > positive idle tells > weak passthrough. Fresh output deliberately outranks the idle tells: a previous turn's "…ed for N" line lingers on screen while the next turn streams.
  • The activity clock is trusted only when window_panes == 1 (it is window-scoped; a split's neighbor would masquerade as agent output).

Verified live (codex-cli 0.149.1)

Idle title work → mid-turn ⠧ work (spinning through the text-streaming phase, which the buffer classifier cannot see) → back to work at completion; window_activity advanced with output and froze the second the turn ended. This closes the streaming blind spot for Codex two independent ways (title + clock); for Claude 2.1.241 (whose title never spins) the clock is the one that closes it.

Tests

772 workspace tests pass; new table-driven tests for merge_status/activity_fresh, parser tolerance tests for old/truncated tmux output.

🤖 Generated with Claude Code

https://claude.ai/code/session_0141oi9wW2ak6qv2DbgUHv1A

PANE_FORMAT now carries #{window_activity}, #{window_panes}, and
#{pane_title} (title last — it may contain tabs; parse_panes splits
bounded and degrades missing/empty tails instead of dropping the pane).
The remote probe appends a date +%s reading behind a second marker so
activity freshness is judged on the remote's own clock, skew-free.

merge_status orders the evidence: visible blocker > viewer overlay
(keep_previous, resolved against the previous status at snapshot apply)
> live working tell / fresh output > positive idle tells > weak
passthrough. Fresh output sits above the idle tells deliberately: a
previous turn's completed line lingers on screen while the next turn
streams, and only live evidence may keep Working lit.

Verified live on codex-cli 0.149.1: the pane title cycles
work -> "⠧ work" mid-turn -> work, spinning through the streaming
phase the buffer misses, while window_activity tracks output and
freezes at completion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141oi9wW2ak6qv2DbgUHv1A
@Raphael-Hao
Raphael-Hao force-pushed the feature/agent-status-classifier branch from 4fc25d1 to 2389213 Compare August 25, 2026 06:50
@Raphael-Hao
Raphael-Hao force-pushed the feature/agent-status-signals branch from b677920 to 7ca783c Compare August 25, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant