Skip to content

fix: answer a worker's errand when its classic.Stop is bypassed - #93

Merged
omartelo merged 1 commit into
mainfrom
fix/worker-answer-bypassed-stop
Oct 21, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/worker-answer-bypassed-stop

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

Summary

On a machine with managed settings (Team and Enterprise organizations), Claude Code 2.1.306's builtin cc-plugin-sec-default seats itself outermost and sends classic.Stop on past the plugins a person installs. The engine marks the mod's hook skipped ("bypassed by") and queues a meta notice (lich: its classic.Stop hook was skipped. "cc-plugin-sec-default" runs first and sent the event on past it.), but no mod call says so.

worker-answer.js reports only from a turn.complete that follows a classic.Stop, so a worker in such a session never answered its errand and the caller waited until the ticket expired.

Change

  • A session that has not seen a single classic.Stop reports from a main-loop turn.complete with reason answer: its answer, or unanswered: "blank" for a blank one. The bypass follows the settings the session started with, so once a Stop has been seen the Stop rule holds for the rest of the session.
  • Without a Stop there is no background_tasks. The report is held while $.agent.list() lists a subagent running or waiting, or cannot be read.
  • Ceiling, written in docs/mod-answer.md and the module header: a background shell, monitor or workflow is not listed by $.agent.list(), so a turn that handed one off answers early and lich keeps that first answer.

Test plan

  • node --test tests/*.test.mjs (459 pass), with cases for a Stop seen, a bypassed Stop with an answer and a blank one, a subagent at work holding the report, and a subagent's turn never reporting
  • claude plugin test . (33 pass), including a worker whose classic.Stop never fires answering from turn.complete

On a machine with managed settings, Claude Code's builtin
cc-plugin-sec-default sends classic.Stop on past user-installed plugins,
so worker-answer never read a Stop and the worker never answered. A
session that has not seen a Stop now reports from turn.complete, held
back while $.agent.list() shows a subagent at work.
omartelo added a commit to lichdotdev/lich that referenced this pull request Oct 21, 2026
@omartelo
omartelo merged commit 5ab3acf into main Oct 21, 2026
2 checks passed
omartelo added a commit to lichdotdev/lich that referenced this pull request Oct 21, 2026
)

* fix(terminal): do not read the terminal's query replies as a draft

The window's terminal answers a TUI's startup queries (OSC 11, XTVERSION,
kitty graphics) through the same input path as the keyboard. escapeSpan
read each control string as Alt+key followed by typed text, so a fresh
Claude Code session looked drafted for up to a minute and a handoff
(Resolve conflicts, Fix CI errors, issue worktree) waited for an Enter.

* docs(ceilings): a managed plugin can hide the Stop a worker's answer waits on

See lichdotdev/lich-plugin#93.
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