Liking cljdoc? Tell your friends :D

hive-tmux.claude.panes

Claude Code panes as data: which tmux pane runs which Claude session, how full its context is, and whether it is working.

Strata: Collect list-raw / capture tmux reads through the host port Promote parse-panes / join-session / goal-text / pane-row pure Boundary panes / pane one call that does all of it

Three sources are joined, because no single one is enough: tmux list-panes pane id, target, cwd, title sessions/<pid>.json session id, name, busy|idle (Claude Code's own word) the pane's screen context tokens, /goal active, spinner

A bg session's process is not a child of the pane that shows it, so the join is by name: the footer rule (or the pane title) names the session, the same name ListAgents prints. cwd breaks a tie between equal names.

Claude Code panes as data: which tmux pane runs which Claude session, how
full its context is, and whether it is working.

Strata:
  Collect   list-raw / capture        tmux reads through the host port
  Promote   parse-panes / join-session / goal-text / pane-row   pure
  Boundary  panes / pane              one call that does all of it

Three sources are joined, because no single one is enough:
  tmux list-panes            pane id, target, cwd, title
  sessions/<pid>.json        session id, name, busy|idle (Claude Code's own word)
  the pane's screen          context tokens, /goal active, spinner

A bg session's process is not a child of the pane that shows it, so the
join is by name: the footer rule (or the pane title) names the session, the
same name ListAgents prints. cwd breaks a tie between equal names.
raw docstring

captureclj

(capture {:keys [tmux!]} pane-id lines)

The last LINES screen lines of PANE-ID, trailing blanks trimmed.

The last LINES screen lines of PANE-ID, trailing blanks trimmed.
sourceraw docstring

claude-pane?clj

(claude-pane? {:keys [command]})

Is tmux PANE running Claude Code? Its foreground command names it, or its process title is the Claude Code version (2.1.319).

Is tmux PANE running Claude Code? Its foreground command names it, or its
process title is the Claude Code version (`2.1.319`).
sourceraw docstring

goal-textclj

(goal-text lines)

The text of the latest /goal LINES (a transcript, oldest first) set, or nil when the latest /goal cleared it or none was ever set. A raw line is only a candidate; the marker is checked again on the decoded content, because a JSON writer may spell / as \/.

The text of the latest /goal LINES (a transcript, oldest first) set, or nil
when the latest /goal cleared it or none was ever set. A raw line is only a
candidate; the marker is checked again on the decoded content, because a
JSON writer may spell `/` as `\/`.
sourceraw docstring

join-sessionclj

(join-session sessions name cwd)

The session of SESSIONS that NAME names, preferring one whose cwd is CWD. {:session map :ambiguous? bool}, or nil when NAME matches none.

The session of SESSIONS that NAME names, preferring one whose cwd is CWD.
{:session map :ambiguous? bool}, or nil when NAME matches none.
sourceraw docstring

last-assistant-textclj

(last-assistant-text lines)

The text of the newest assistant message in LINES (a transcript, oldest first) that says something: thinking and tool calls are skipped. Nil when there is none.

The text of the newest assistant message in LINES (a transcript, oldest
first) that says something: thinking and tool calls are skipped. Nil when
there is none.
sourceraw docstring

list-rawclj

(list-raw {:keys [tmux!]})

Every pane on the server, as parse-panes rows.

Every pane on the server, as `parse-panes` rows.
sourceraw docstring

paneclj

(pane ref)
(pane h ref)
(pane h ref opts)

The row of the pane REF names: a pane id (%3), a target (1:3.1), a session name or a session id. Nil when none matches.

The row of the pane REF names: a pane id (%3), a target (1:3.1), a session
name or a session id. Nil when none matches.
sourceraw docstring

pane-rowclj

(pane-row pane facts sessions)

One pane's row from its tmux PANE map, its SCREEN facts and SESSIONS.

One pane's row from its tmux PANE map, its SCREEN facts and SESSIONS.
sourceraw docstring

panesclj

(panes)
(panes h)
(panes h {:keys [include-goal? lines] :or {lines 40}})

Every Claude Code pane as a row. OPTS: :include-goal? also read each goal-active pane's transcript for :goal :lines screen lines to read (default 40)

Every Claude Code pane as a row. OPTS:
:include-goal?  also read each goal-active pane's transcript for :goal
:lines          screen lines to read (default 40)
sourceraw docstring

parse-panesclj

(parse-panes out)

Rows of tmux list-panes -a -F list-format OUT, one map per pane.

Rows of `tmux list-panes -a -F list-format` OUT, one map per pane.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close