feat(acp): handle /clear in ACP sessions / ACP 会话内支持 /clear - #9705
Open
BuGlessRB wants to merge 1 commit into
Open
feat(acp): handle /clear in ACP sessions / ACP 会话内支持 /clear#9705BuGlessRB wants to merge 1 commit into
BuGlessRB wants to merge 1 commit into
Conversation
BuGlessRB
force-pushed
the
pr/clear-acp
branch
5 times, most recently
from
September 4, 2026 15:51
86f2621 to
fbf2fee
Compare
…LO mode The ACP turn path runs RunTurn directly and never reaches the controller's slash-verb dispatch, so /clear previously went to the model as plain text. Resolve /clear in the ACP server before the turn: YOLO mode clears immediately (the mode already opted out of confirmations), every other approval mode asks the client through a session/request_permission round-trip first, and the session rotates to a fresh transcript path under the same session id. Advertise the verb in available_commands_update like any other slash command.
BuGlessRB
force-pushed
the
pr/clear-acp
branch
from
September 5, 2026 13:18
fbf2fee to
e8dea6a
Compare
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.
Follow-up to #9488 (/clear + YOLO). The CLI got YOLO-mode confirmation skipping for
/clear;reasonix acpnever did — its turn path runsRunTurndirectly and skips the controller's slash-verb dispatch, so/clearwent to the model as plain text.Changes
session/promptwith text/clearnow clears the session in place (fresh transcript, same session id), matching the CLI's/clear.session/request_permissionround-trip (Clear the session/Cancel); declining leaves the session untouched.available_commands_updateasclear, like any other slash command.Tests
TestE2EClearAskModeAsksAndClearsOnConfirm— permission round-trip, then clear + fresh transcript path under the same session id.TestE2EClearAskModeCancelAborts— declining keeps the session and path.TestE2EClearYoloModeSkipsConfirmation— clears without any client round-trip.Verified:
go test ./internal/acp/,go test ./internal/cli/ ./internal/control/,go build ./...,go vet, repolint clean.With this, the agentic.nvim
/clearinterception kludge can be removed.