Uh oh!
There was an error while loading. Please reload this page.
fix(server): attach explicit Codex $skill invocations - #7196
Conversation
Composer $skill tokens reached Codex as plain text, so user-invoked-only skills never loaded their SKILL.md. Resolve complete tokens against the active skills/list and send Codex SkillUserInput items; unknown tokens fail the turn instead of going through inert. Made-with: Grok / T3 Code
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Needs human review This PR introduces new feature functionality for parsing and binding You can customize Macroscope's approvability policy. Learn more. |
Prefer an exact skill name before a case-insensitive fallback so $Foo does not attach enabled foo when Foo exists. Treat punctuation after a token as a terminator, and attach one SkillUserInput per resolved path. Made-with: Grok / T3 Code
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b84e583. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Treat `.` and `,` as token terminators so `$review.` still binds, but leave `$HOME/.config` and `$review.md` as plain text.
Uh oh!
There was an error while loading. Please reload this page.
Keep sentence punctuation so $review. and $review, still attach. Do not treat $HOME/.config or $FOO/bar as invocations, and ignore Unicode filename extensions after a period. Made-with: Grok / T3 Code
t3dotgg
commented
Aug 28, 2026
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. |

Problem
T3 recognizes
$skilltokens in the composer, but a Codex turn received only that literal text. Skills withdisable-model-invocation: true/allow_implicit_invocation: falsethen never loadedSKILL.md, so explicit$grill-with-docsstyle entry points failed silently.Fix
On Codex
turn/start, resolve complete$skilltokens against the liveskills/listfor the session cwd and attach CodexSkillUserInputitems ({ type: "skill", name, path }). The user text is unchanged, so$chips still render. Unknown tokens fail the turn withUnknown 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
$skilltokens; behavior is localized to the Codex send path with broad test coverage.Overview
Codex turns now bind composer
$skilltokens to real skills instead of sending inert literal text, so user-invoked-only skills (e.g.disable-model-invocation) actually loadSKILL.md.On send,
collectComposerSkillInvocationsparses 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 callsskills/listfor the session cwd,bindCodexSkillInvocationsresolves names (exact, then case-insensitive; deduped by path), andbuildTurnStartParamsappends Codex{ type: "skill", name, path }inputs after the unchanged text. Unknown names fail the turn withCodexSessionRuntimeUnknownSkillErrorinstead of silently continuing.Reviewed by Cursor Bugbot for commit f44f09c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Attach explicit
$skillinvocations as structured inputs inCodexSessionRuntimecollectComposerSkillInvocationstocomposerInlineTokens.tsto extract distinct$skillnames from submitted text, excluding shell paths and filenames.codexSkillInvocations.tswithbindCodexSkillInvocations, which resolves$skilltokens 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.$skilltokens,makeCodexSessionRuntimenow fetchesskills/listfrom the Codex app server and passes results tobuildTurnStartParams, which appends the resolved skill inputs to the turn payload.CodexSessionRuntimeUnknownSkillError— thrown when any referenced$skillis not found — with a formatted message showing the unrecognized$nametokens.$skillnames now fail explicitly withCodexSessionRuntimeUnknownSkillErrorinstead of passing silently.Macroscope summarized f44f09c.