Skip to content

fix(agent): apply local-skill context on the codex adapter#3058

Merged
tatoalo merged 4 commits into
mainfrom
codex-local-skill-context
Jul 1, 2026
Merged

fix(agent): apply local-skill context on the codex adapter#3058
tatoalo merged 4 commits into
mainfrom
codex-local-skill-context

Conversation

@tatoalo

@tatoalo tatoalo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Local skills didn't actually apply on the Codex adapter. The agent-server sets _meta.localSkillContext (the resolved skill instructions) and leaves the raw /skill slash command in the prompt; the Claude adapter consumes that meta, dropping the /skill chunk and injecting the instructions — but the Codex adapter had no such seam, so the bare /skill reached codex-acp and the skill instructions were ignored.

Changes

  • added prependLocalSkillContext to the Codex adapter, mirroring the Claude adapter's promptToClaude handling: drop the leading /skill chunk (the context already carries the user's args), prepend the resolved skill instructions as a text block, and strip the local-skill _meta before forwarding to codex-acp
  • extracted the shared isLocalSkillCommandChunk helper into adapters/local-skill.ts, now imported by both the Codex and Claude adapters (previously duplicated)

tatoalo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit b901a88.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(agent): apply local-skill context on..." | Re-trigger Greptile

Comment thread packages/agent/src/adapters/codex/codex-agent.ts
Comment thread packages/agent/src/adapters/codex/codex-agent.test.ts
@tatoalo tatoalo self-assigned this Jul 1, 2026
@tatoalo tatoalo added the Stamphog This will request an autostamp by stamphog on small changes label Jul 1, 2026
@tatoalo tatoalo force-pushed the cloud-skills-dependency-autobundle branch from a569f38 to add6912 Compare July 1, 2026 13:35
@tatoalo tatoalo force-pushed the codex-local-skill-context branch from 3cddfff to 392d5c1 Compare July 1, 2026 13:35
@tatoalo tatoalo marked this pull request as ready for review July 1, 2026 13:40
github-actions[bot]
github-actions Bot previously approved these changes Jul 1, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean bug fix that mirrors existing Claude adapter behavior in the Codex adapter. Defensive guards prevent the broken-mix edge case, all bot review comments were addressed (guard for missing localSkillName, parameterized tests), and no API contracts, data models, or dependencies are touched.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "fix(agent): apply local-skill context on..." | Re-trigger Greptile

@tatoalo tatoalo force-pushed the codex-local-skill-context branch from 392d5c1 to 1ac275a Compare July 1, 2026 13:48
@tatoalo tatoalo force-pushed the cloud-skills-dependency-autobundle branch from add6912 to 42720c8 Compare July 1, 2026 13:48
@github-actions github-actions Bot dismissed their stale review July 1, 2026 13:48

New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean bug fix that mirrors existing Claude adapter behavior in the Codex adapter. The extracted helper, defensive guard for missing localSkillName, and parameterized tests all look correct with no showstoppers.

Base automatically changed from cloud-skills-dependency-autobundle to main July 1, 2026 14:09
@tatoalo tatoalo enabled auto-merge (squash) July 1, 2026 14:09
@stamphog

stamphog Bot commented Jul 1, 2026

Copy link
Copy Markdown

Retaining stamphog approval — delta since last review classified as merge_only.

@tatoalo tatoalo merged commit 6dcb410 into main Jul 1, 2026
24 checks passed
@tatoalo tatoalo deleted the codex-local-skill-context branch July 1, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant