Repository navigation
fix(mod): queue a built-in a session asks control_session to run on itself - #62
Merged
Merged
Conversation
This was referenced Oct 9, 2026
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.
Asked "run /compact", sessions mostly reached for lich's
control_session, which refuses a session's own ("never your own"), and either gave up or asked a peer to run it on them. The self-command mod now also takes that path.tool.callonmcp__lich__control_session: lich answers first; an error answer to actioncommandwhose target is this session (named by itsLICH_SESSION_ID, or lich's "is this session, and a session cannot control itself" refusal) is answered by queueing the built-in, same checks as the Skill path (/modeland/effortrefused).tool.describeon it: says actioncommandon this session is accepted and spells out the session id to pass, since a session cannot look its own label up (list_sessions/lich sessionsleave it out).Measured (Claude Code 2.1.295)
tool.call/tool.describe:mcp__lich__control_session; input{ session, action, value, args, tool, tool_use_id }.isError: true, text"<label>" is this session, and a session cannot control itself: ….tool.describefires for the MCP tool while deferred behind ToolSearch.LICH_SESSION_ID(no session named …) and gave up, hence the id in the description.Tests
node --test tests/*.test.mjs: 377 pass.claude plugin validate: pass (same warnings as every othertool.callhook).claude plugin test .: 31 pass.Skill(compact)→ compacted. Told to usecontrol_sessionon itself: called it with its id, got "queued on this session", compacted.