fix(agent): inject local skill context into codex follow-up prompts#3399
Merged
Conversation
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(agent): announce mid-message skill i..." | Re-trigger Greptile |
Codex bakes its skill catalog into the thread when it starts, so a local skill bundle installed by a follow-up message is invisible to it. The Claude adapter already consumes _meta.localSkillContext to inline the invoked skill's definition; the codex adapter dropped it, so follow-up /my-skill invocations reached codex as meaningless plain text. - codex adapter: consume localSkillContext/localSkillName — prepend the inlined skill definition to the forwarded turn input and drop the bare /name chunk (echo unchanged), mirroring the Claude adapter. - agent-server: list co-installed skills (auto-bundled dependencies and skills from earlier messages) with their installed paths in the injected context. - agent-server: announce mid-message skill installs — messages that install bundles without being a bare invocation get a context that inlines skills named in the message (token-boundary matched) and lists the rest by path.
549adcc to
166536e
Compare
New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.
There was a problem hiding this comment.
Well-scoped fix that extends local skill context injection to the Codex adapter, mirroring the existing Claude adapter. The Greptile P1 concern about prefix-matching was addressed with a token-boundary regex and confirmed resolved. Interface change is backward-compatible, the fallback path is correctly guarded, and new behavior is covered by tests.
Member
|
/trunk merge |
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.
Problem
Codex cloud runs don't reliably recognize local skills after the first message. The sandbox agent installs uploaded skill bundles to disk and passes the invoked skill's definition via
_meta.localSkillContext, but only the Claude adapter consumed that meta. codex adapter dropped it. Since codex bakes its skill catalog into the thread at start, a skill first invoked in a follow-up message was installed to disk but never became visible to the model: the/my-skilltext reached codex as meaningless plain text.Two adjacent gaps had the same effect even for Claude:
/nameinvocations.Changes
update the Codex adapter to consume
localSkillContextandlocalSkillName, prepending inlined skill definitions to the prompt and stripping the/skillinvocation only when appropriate. Prompt ordering isprContext→localSkillContext→ remaining user inputinclude all installed skills and their paths in the agent-server prompt, allowing the model to resolve references between bundled or previously installed skills
add a fallback for messages that install skill bundles without directly invoking one, inlining referenced skill definitions and listing the remaining installed skills with their paths