Skip to content

fix(claude): mid-sentence skill chips keep the full request - #15253

Open
ScottN-PV wants to merge 2 commits into
pingdotgg:mainfrom
ScottN-PV:fix/13256-claude-skill-chips-v2
Open

ScottN-PV wants to merge 2 commits into
pingdotgg:mainfrom
ScottN-PV:fix/13256-claude-skill-chips-v2

Conversation

@ScottN-PV

@ScottN-PV ScottN-PV commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A Claude skill chip that comes after other text splits the request. you will $implement fixes goes out as two text blocks, you will and /implement fixes. Claude Code expands the last block and puts the command ahead of the earlier text, so the model reads the command, then you will on its own, then the skill body. With Ultrathink selected, $implement fixes splits the same way and leaves Ultrathink: on its own.

The V2 rewrite kept the planner as it was, so this reproduces through ClaudeAdapterV2 on main at 43bd6677.

Change

When text comes before the dispatched chip, the earlier block now holds the whole request with chips written as /name, for example you will /implement fixes. The last block is unchanged: /name plus the text after the chip, so the skill loads with the same arguments. Text after the chip, including attachment path notes, now appears in both blocks. A chip that opens the prompt, with no effort prefix, still sends one command block.

The fix is in planClaudeSkillDispatch. ClaudeAdapterV2 calls it for sends and steering, with and without images, so ClaudeAdapterV2.ts changes a comment only.

Scope and approval

Closes #13256. Maintainer triage confirmed the bug and described this block layout: #13256 (comment)

This rebuilds #13299 on V2. Macroscope approved #13299 before it was closed because V2 removed ClaudeAdapter.ts: #13299 (comment)

Not in this PR: the setting requested in the issue thread to turn off typed $ skill mentions.

Verification

An agent ran everything below on Linux (Node 24.21.0, Claude Code 2.1.286) from apps/server. Nothing was checked by hand.

  • Rebased onto main bf725cb80d on Oct 11. The three new adapter tests now build the adapter the way main's other adapter tests do (crypto, stopTask, McpProviderSessions); the checks below were rerun on the rebased head.
  • vp test run src/provider/Drivers/ClaudeSkillDispatch.test.ts src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts: 242 passed.
  • Same command with only the ClaudeSkillDispatch.ts change reverted: 11 failed, 231 passed. Eight are planner cases. Three are new adapter tests that start a turn with a discovered skill and assert the SDK message content: a plain send, a send with an image, and a steering message.
  • vp run --filter t3 typecheck exited 0. vp lint and vp fmt --check on the four changed files passed. Lint's one warning is in unchanged code.

Native capture: a temporary harness ran the ClaudeAdapterV2 turn path through the Agent SDK query runner and the installed CLI, against a fake Messages API on localhost with a fixture skill. No inference ran. These are the user text blocks in the API request:

Prompt Before After
you will $implement fixes command, you will, skill body command, you will /implement fixes, skill body
please $implement the fixes + a second paragraph command, please, skill body command, full two-paragraph request, skill body
$implement fixes with Ultrathink command, Ultrathink:, skill body command, Ultrathink:\n/implement fixes, skill body
$implement fixes command, skill body unchanged

The skill expanded with its arguments in every case.

Real inference: one turn on each side through a second temporary harness, with the live SDK runner and claude-fable-5-1. The skill tells the model to reply SKILL-RAN, then repeat the user's full request. Prompt: you will $echo-request fixes.

  • Before: SKILL-RAN / /echo-request fixes. The reply leaves out you will.
  • After: SKILL-RAN / you will /echo-request fixes.
  • Neither turn made a tool call, so the inline /echo-request in the earlier block did not start the skill a second time.

That is one run per side on one model.

Not checked: a turn started from a T3 client, images or steering in a native capture (the adapter tests cover both), and Windows or macOS.

Model: Claude Opus 5.5, Claude Fable 5.1 (review), GPT-6-Astra (review). Harness: Claude Code, Codex.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 3, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 3, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at a6e8fb9

Macroscope's review found this PR approvable — This is a focused Claude prompt-dispatch bug fix: existing skill invocations retain the full user request, with targeted coverage for normal sends, attachments, steering, and edge cases. No product defaults, schemas, infrastructure, or static-analysis settings are changed.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 3, 2026 — with ChatGPT Codex Connector
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 3, 2026 17:17

Dismissing prior approval to re-evaluate fbee41f

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0269b88f-8873-422d-b894-07ec1502263c



📥 Commits

Reviewing files that changed from the base of the PR and between 65731f9 and fbee41f.




📒 Files selected for processing (4)
  • apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts
  • apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
  • apps/server/src/provider/Drivers/ClaudeSkillDispatch.test.ts
  • apps/server/src/provider/Drivers/ClaudeSkillDispatch.ts



Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.





📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

Claude skill dispatch now rewrites known skill mentions throughout the earlier prompt text and retains the final invocation with trailing text in a separate command block. Tests cover prompt formats, image attachments, initial prompts, and steering messages.

Changes

Claude Skill Dispatch

Layer / File(s) Summary
Rewrite mentions and select the dispatch target
apps/server/src/provider/Drivers/ClaudeSkillDispatch.ts, apps/server/src/provider/Drivers/ClaudeSkillDispatch.test.ts
planClaudeSkillDispatch now rewrites all known skill mentions in the full prompt for leadingText. The final mention and its trailing text remain in commandText. Tests cover mention positions and prompt formats.
Verify offered adapter messages
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts, apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts
Tests check expanded skill prompts in initial messages and steering, including a prompt with an image attachment. A comment describes the earlier and final message blocks.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: t3dotgg





Merge Risk: ⚪ Minimal · up to fbee4

The change aims to preserve the full request when dispatching a mid-sentence skill, with coverage for prompts, steering, and attachments. No concrete merge-blocking issue is evident; proceed with routine checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to fbee4

The change preserves the full request without adding access or permissions. Remaining uncertainty concerns how the receiving application interprets repeated command text, rather than a demonstrated security weakness.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The effective change is request content within existing skill-enabled interactions, including sends and steering. The inspected change does not add a caller, credential, permission, or attachment-read capability. Downstream interpretation remains dependent on the receiving runtime.

Trust Boundaries and Controls

  • observed — User-supplied mention names are checked against skillNames, and only the final recognized mention determines commandText. This recognition set is not itself an authorization decision. The documented native expansion contract selects the last text block, which the adapter preserves; earlier slash-form mentions remain model-visible text rather than additional native command blocks.

Resilience and Maintainability Implications

  • observed — The changed planner performs synchronous string transformation without mutating the supplied skill set or writing shared state. It introduces no reservation, persistence, cleanup, or recovery transition; repetition of the same inputs produces the same plan.



Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Issue #13256 requires a mid-sentence skill chip to preserve the full request through native expansion and retain working behavior for a leading chip. planClaudeSkillDispatch now places the full prom…
Out of Scope Changes check Passed The planner change, updated planner tests, and ClaudeAdapterV2 tests and comment all support issue #13256. The PR does not add the separately excluded setting to disable typed $ skill mentions. No…
Title check Passed The title is concise, specific, and accurately describes the main fix for mid-sentence Claude skill chips.
Description check Passed The description includes all required sections, explains the problem and change, documents issue and maintainer approval, reports focused verification results, and lists unverified environments and sc…





✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR





  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 3, 2026
ScottN-PV and others added 2 commits October 11, 2026 02:47
…hips

Claude Code expands a skill from the last text block and moves the
command ahead of earlier blocks, so "you will $implement fixes" reached
the model as the command, then "you will", then the skill body. The
earlier block now carries the whole request with mentions rewritten to
/name, and the last block still holds the invocation and its arguments.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ScottN-PV
ScottN-PV force-pushed the fix/13256-claude-skill-chips-v2 branch from fbee41f to a6e8fb9 Compare October 11, 2026 06:53
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 11, 2026 06:53

Dismissing prior approval to re-evaluate a6e8fb9

@ScottN-PV

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Incremental review skipped.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Mid-sentence Claude skill chips split the original request during native expansion

2 participants