Skip to content

Session state

Harnery gives each agent session two separate status signals. One reports what the process is doing now. The other reports whether the assigned task is still open.

That distinction answers a question most agent tools leave ambiguous: did the agent finish its objective, or did its turn simply stop?

Signal Values What it tells you
Activity unknown, working, needs_input, idle What the agent is doing now
Lifecycle active, blocked, done Whether the declared task is still open

The signals can be combined. An agent may be needs_input + active while it waits for approval. It may be idle + active between turns. A completed task is usually idle + done.

Find the session that needs you

A verified permission request moves activity to needs_input. Background output does not make the wait disappear.

Tell a pause from completion

A stopped turn becomes idle. Only an explicit lifecycle declaration marks the task blocked or done.

See the same labels everywhere

The local CLI, prompt context, cross-machine presence, and web UI all use the same activity and lifecycle values.

Keep the record after the session ends

Live heartbeats can disappear. Harnery rebuilds the last known state from its canonical event ledger.

The agent declares lifecycle through one explicit command:

Terminal window
harn agents lifecycle active
harn agents lifecycle blocked --reason "waiting for repository access"
harn agents lifecycle done --reason "implementation and verification complete"

Declaring done runs Harnery’s Git finalization check first. The check looks for dirty touched files, uncommitted submodule pointers, incomplete write history, and commits that have not reached a configured remote. It certifies repository hygiene, not test results or business correctness.

Lifecycle also drives human-facing projections. A blocked task suggests a [BLOCKED] session title, while a completed task suggests [DONE]. Claude Desktop cleanup reads the lifecycle event itself, not the editable title.

  • harn agents whoami, list, status, show, and trace
  • prompt-time peer context
  • cross-machine presence
  • agent cards and detail pages in harn web
  • suggested session titles
  • harn claude-desktop tidy

Run harn agents status to see the current session and its peers. Use harn agents lifecycle when the task becomes blocked, resumes, or finishes.