Skip to content

feat: count running lich workers in the status line and stop them with TaskStop - #35

Merged
omartelo merged 1 commit into
mainfrom
feat/subagent-polish
Oct 5, 2026
Merged

omartelo merged 1 commit into
mainfrom
feat/subagent-polish

Conversation

@omartelo

@omartelo omartelo commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Parity with Claude Code's native background subagents (measured on 2.1.289):

  • Status line: while workers run, $.ui.status shows lich: N workers (Claude Code prefixes the plugin name), like the native "N agents". It polls lich sessions --json every 5 s only while any worker runs.
  • TaskStop: Esc does not stop native background agents; TaskStop with the agent id does. The mod takes a TaskStop whose id is one of its workers: a same-checkout worker is closed (lich close), an isolated one has its turn aborted (lich control … abort) and keeps its card and worktree. Any other id goes to Claude Code.

Pairs with omartelo/lich feat/subagent-polish (auto-close). Tests: node 278/278, claude plugin test . 18/18, validate ok. Live in Claude Code 2.1.289 against a fake lich.

…p them with TaskStop

A subagent the mod runs as a lich session now behaves like a native
background agent in two more ways. While any runs, the status line shows
"lich: N workers", read every 5 seconds from `lich sessions --json`: a worker
listed with a done turn, or no longer listed (lich closes one in the asking
checkout once it reported), is finished. And TaskStop on a worker's agentId,
which Claude Code 2.1.289 measured is how a background agent is stopped (Esc
leaves it running), is taken by the mod: a worker in the asking checkout is
closed with `lich close`, an isolated one has its turn stopped with `lich
control <name> abort`, and the result is TaskStop's own shape.

The test harness chains several hooks on one event, as the engine does, now
that the module registers two tool.call hooks.
@omartelo
omartelo merged commit c8a97df into main Oct 5, 2026
3 checks passed
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