Repository navigation
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained ACP bug fix that preserves normal prompt handling and verifies the changed slash-command shape with an integration test. It does not alter product defaults, schemas, deployment behavior, or static-analysis configuration. You can add or adjust custom eligibility rules. Learn more. |
Contributor
Contributor
Author
|
Note 🤖 Claude Fable 5.1 on behalf of Mnigos Closing in favour of #19393, which was opened first for the same fix; three PRs on one issue is one too many. |
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.
Fixes #19384.
Opened a minute after #19393 (#19393) by Exotic209093, which takes the same approach; the difference here is the shared
isSlashCommandPromptpredicate and a full run of the ACP adapter test file. Happy to close this one if that lands first.Problem
ACP agents receive T3's orchestration instructions inside the first user prompt, and
t3AcpPromptWithInstructionsalready leaves a prompt that starts with/untouched so the agent can expand its own slash command. ButresolvePromptPartsthen appended a second text block with the<runtime_info>instructions on every turn. Copilot only expands a slash command when the prompt is a single text block that starts with/(the issue's standalonecopilot --acprepro shows the same prompt loading the skill as one block and failing as two), so/skillturns reached the model as plain text, and skills withdisable-model-invocation: truecould never be started from T3 Code.Change
resolvePromptPartsinpackages/provider-acp/src/server/adapter.tsleaves out the runtime-instructions block when the message is a slash command, so the prompt is that single text block. The predicate moved into an exportedisSlashCommandPromptinorchestrationInstructions.tsso both places share it. Nothing else changes: image attachments are still appended, the empty-prompt error stays, and a slash turn still returns no instruction state, so the orchestration instructions are sent with the next ordinary turn as before. Grok also goes through this adapter and gets the same shape. Cursor appends its runtime instructions to the same text block and is unaffected; Muse uses its ownturn/startprotocol and is out of scope here.Verification
AcpAdapterV2.test.ts,sends a slash command as the only ACP prompt block: a/repro-skillturn sends asession/promptwhosepromptis exactly[{ type: "text", text: "/repro-skill" }], and the ordinary follow-up turn sends two blocks, the orchestration instructions with the message and the<runtime_info>block. Without the fix it fails withexpected [ {…}, …(1) ] to deeply equal [ { type: 'text', text: '/repro-skill' } ].AcpAdapterV2.test.ts(119 tests) and provider-core'sorchestrationInstructions.test.tspass; typecheck forprovider-core,provider-acpandapps/server, lint, fmt and knip clean.Implemented with Claude Opus 5.5, coordinated by Claude Fable 5.1 in Claude Code.