Repository navigation
feat(agent-cards): let a lich worker open cards of its own - #58
Merged
Merged
Conversation
lich now sets LICH_SUBAGENT_DEPTH on every Claude Code session it starts (0 at the top, n for a worker n --subagent levels down) and keeps LICH_SUBAGENT_CARDS=off only for the user's setting and for a worker at its own depth limit. - worker-answer: a session is a worker when LICH_SUBAGENT_DEPTH is an integer above 0; without the variable, LICH_SUBAGENT_CARDS=off still marks one, for an older lich. - agent-cards: cards off in a worker (depth above 0) runs the native agent with a toast saying why; a top-level session stays silent. The subagent/ branch gate applies only without the depth variable, so a worker below lich's limit opens cards from an isolated worktree too. No existing test changed; new ones cover the depth rules and the legacy fallbacks.
… worker native The text named the depth limit, but lich also keeps a worker native when the user turned subagent cards off. The test pins the toast's wording, which is what changed.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Client side of lichdotdev/lich#690, which nests subagent cards one level down and splits the two meanings
LICH_SUBAGENT_CARDS=offused to carry.Contract (canonical in lich
docs/hooks/README.md, Shared transport)LICH_SUBAGENT_DEPTHis set on every Claude Code session lich starts:0at the top,nfor a workern--subagentlevels down.LICH_SUBAGENT_CARDS=offnow means only "leave this session's subagents native": the setting is off, the worker is at lich's depth limit, or the installed plugin predates this release.Changes
hooks/worker-answer.js: a session is a worker whenLICH_SUBAGENT_DEPTHis an integer above 0. Without the variable (an older lich) it falls back toLICH_SUBAGENT_CARDS === "off", as before. A top-level session with cards turned off no longer posts answers lich would ignore.hooks/agent-cards.js:offwith a depth above 0 runs the call natively throughrunNatively, so a toast says why. A top-level session with cards off stays silent, as before.subagent/branch gate applies only when the depth is absent; with it, lich'sLICH_SUBAGENT_CARDSis the only gate.docs/agent-cards.md,docs/mod-answer.md,docs/providers.md(which also said only agent-cards read the variables; worker-answer did too). CHANGELOG underChanged.Release
lich#690 sets
NestedSubagentCardsRelease = "0.19.0", the contract minor #57 opened for compacting. This PR has to be in 0.19.0: a 0.19.0 without it would get nested cards switched on by that lich and never answer for the workers that open them. No version bumped here.Tests
node --test tests/*.test.mjs: 363 pass, 0 fail.claude plugin test .: 29 pass, 0 fail.