Skip to content

Latest commit

 

History

History
62 lines (49 loc) · 3.62 KB

mod-status.md

File metadata and controls

62 lines (49 loc) · 3.62 KB

Mod: status

Client side of the mod-status contract (the endpoint and the response are defined in the lich repository; this plugin only implements them).

Shows, in the prompt footer, the relay errands the session is part of: who it owes an answer, the tasks it handed out that are still running, and the answers waiting to be collected. The card shows these in the window; this puts them in front of the person at the terminal.

client Claude Code Codex Antigravity opencode omp Crush
hooks/mod-status.js mod, registered by hooks/lich.js, the modules entry none: no mod system none: no mod system none: no mod system none: no mod system none: no mod system
when read
session.start, then every 5 seconds GET /mod/status?token=…&session_id=…, X-Lich-Plugin

What the line reads

Each list that is not empty adds a piece, in this order, joined by commas:

list piece
owed owes "Session 26" an answer for one asked by a session, owes N answers otherwise
open N tasks out, plus (M waiting) for those whose session waits on a human
ready N answers to collect

The line reads lich: 1 task out, 1 answer to collect. With all three lists empty the piece is gone.

The mods share one lich line, built by hooks/status-line.js: the errands, then the worker count of agent-cards.md, then the note of edit-guard.md, joined by ·. While the errands show, the worker count is left out: every worker that mod opens is an errand of this session, so open already counts it. The line is drawn dim among the mode labels at the right of the prompt footer, by a ui.render hook on SessionMode that adds it after Claude Code's own labels. $.ui.status is not used: Claude Code draws it as a yellow warning under the prompt, and keeps only one per plugin.

How it behaves

  • Outside lich it never reads. It reads the three variables in session.start and stops there when one is missing.
  • Only an interactive session reads. A claude -p run from a tool inside a lich session inherits that session's variables, and would show the parent's errands. Its session.start hook matches isInteractive: true.
  • Reading never collects. An answer under ready stays in the inbox for the agent's wait_for_answer.
  • A failed read is not retried. The piece is cleared until a read works again, 5 seconds later.
  • A 404 stops the reads for the session: that lich predates the contract.

Limits

  • Up to 5 seconds late. lich pushes nothing; an errand that opens or closes shows at the next read.
  • Labels are the ones at send time, as lich keeps them.
  • Claude Code only. Every other harness has no mod system; there the card is the only place these errands show.