Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): attach explicit Codex $skill invocations #7196

Closedmaslinedwin(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/7196/headopened View on GitHub

Problem

T3 recognizes $skill tokens in the composer, but a Codex turn received only that literal text. Skills with disable-model-invocation: true / allow_implicit_invocation: false then never loaded SKILL.md, so explicit $grill-with-docs style entry points failed silently.

Fix

On Codex turn/start, resolve complete $skill tokens against the live skills/list for the session cwd and attach Codex SkillUserInput items ({ type: "skill", name, path }). The user text is unchanged, so $ chips still render. Unknown tokens fail the turn with Unknown Codex skill $name. instead of being sent inert.

Picker inventory and implicit invocation are unchanged. Web, desktop, and mobile all go through this send path.

Fixes #6095

Made-with: Grok / T3 Code


Note

Medium Risk Changes Codex turn input construction and adds a hard failure path for unresolved $skill tokens; behavior is localized to the Codex send path with broad test coverage.

Overview Codex turns now bind composer $skill tokens to real skills instead of sending inert literal text, so user-invoked-only skills (e.g. disable-model-invocation) actually load SKILL.md.

On send, collectComposerSkillInvocations parses complete tokens (including end-of-message and punctuation-terminated forms, while ignoring $HOME/.config, $review.md, etc.). When the prompt has any $skill, the runtime calls skills/list for the session cwd, bindCodexSkillInvocations resolves names (exact, then case-insensitive; deduped by path), and buildTurnStartParams appends Codex { type: "skill", name, path } inputs after the unchanged text. Unknown names fail the turn with CodexSessionRuntimeUnknownSkillError instead of silently continuing.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f44f09c335802ad8da93344ed34f3c29942f535f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Attach explicit $skill invocations as structured inputs in CodexSessionRuntime

  • Adds collectComposerSkillInvocations to composerInlineTokens.ts to extract distinct $skill names from submitted text, excluding shell paths and filenames.
  • Adds codexSkillInvocations.ts with bindCodexSkillInvocations, which resolves $skill tokens against available skills (exact match first, then case-insensitive with enabled preference) and returns structured {type,name,path} inputs or a list of unknown names.
  • When the user input contains $skill tokens, makeCodexSessionRuntime now fetches skills/list from the Codex app server and passes results to buildTurnStartParams, which appends the resolved skill inputs to the turn payload.
  • Introduces CodexSessionRuntimeUnknownSkillError — thrown when any referenced $skill is not found — with a formatted message showing the unrecognized $name tokens.
  • Risk: turns referencing unknown $skill names now fail explicitly with CodexSessionRuntimeUnknownSkillError instead of passing silently.
Macroscope summarized f44f09c.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: e683b00e-51bc-42d8-b835-0bd527f8ee5a

      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

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      This PR introduces new feature functionality for parsing and binding $skill invocations in user prompts, which affects runtime behavior. New capabilities warrant human review regardless of test coverage.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b84e583a5a2ca0bef6150e23a3b973c50cd0e96b. Configure [here](https://www.cursor.com/dashboard/bugbot).
    5. Note

      🤖 GPT-5.6 Sol responding on behalf of Theo

      We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.

      We are keeping OPEN #8336 as the review path for explicit skill invocations across providers. The Codex-specific tests in this branch remain useful reference.

      If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed.

Sign in to join this conversation.