Claude Ps banner
lorenzolfm lorenzolfm

Claude Ps

Development community

Description

One line per running Claude Code agent, joined to its zellij pane

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

claude-agents

`claude-agents` prints one line for each running Claude Code agent. Each line carries what the agent is doing and the zellij pane it is doing it in.

The problem

Claude Code writes `~/.claude/sessions/.json` for each running agent. The file carries the agent's status, its working directory, and the time the status was set. It says nothing about zellij.

The agent's own environment carries `ZELLIJ_SESSION_NAME` and `ZELLIJ_PANE_ID`. It says nothing about what the agent is doing.

The two halves share one thing: the process id. `claude-agents` joins them.

Output

One agent per line, TAB-separated, in a fixed column order:

status  age  session  pane  name  pid  session_id  started_at  cwd
Column Content
status whatever Claude reports, verbatim
age whole seconds spent in that status
session ZELLIJ_SESSION_NAME, or - if the agent is not in zellij
pane ZELLIJ_PANE_ID, or - likewise
name Claude's own derived name, not the zellij session name
pid the process id, and the key the two halves are joined on
session_id Claude's session uuid, matching its transcript
started_at epoch seconds the session began, or 0 if unknown
cwd last, and the only field that may contain whitespace
$ claude-agents
waiting	35	work	0	work-f8	3318865	b08aacbc-…	1755000000	/home/you/Projects/work
idle	5238	notes	1	notes-e1	3132891	f8f9b7ea-…	1754913000	/home/you/notes
busy	13	-	-	scratch-2c	3129839	52b7681e-…	1755004000	/home/you/scratch

The third agent is not in zellij, so both join columns are `-`.

`age` and `started_at` are not the same question

`age` is a duration in the current status; `started_at` is an absolute time the session began. A consumer needs both, because **a session that has just launched and one that has just finished a turn are both `idle` with a small `age`** — and a status bar that cannot tell them apart nags you a