Skip to content

fix: use session cwd when listing skills#251

Merged
benbrandt merged 1 commit into
agentclientprotocol:mainfrom
LucaDiba:fix-session-cwd-skills
Jun 29, 2026
Merged

fix: use session cwd when listing skills#251
benbrandt merged 1 commit into
agentclientprotocol:mainfrom
LucaDiba:fix-session-cwd-skills

Conversation

@LucaDiba

@LucaDiba LucaDiba commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes skill discovery for ACP sessions whose cwd differs from the codex-acp process cwd.

Previously, session startup refreshed skills with the correct session cwd, but available command publication and /skills later called skills/list with no params. Codex app-server then defaulted back to the adapter process cwd, so repo-local skills from the active ACP session workspace were missing and unrelated repo skills could appear instead.

This changes command skill listing to pass the active session roots:

  • sessionState.cwd
  • sessionState.additionalDirectories

Fixes #250

Changes

  • Pass SessionState into available command publication.
  • Use session-scoped skills/list params for:
    • available_commands_update
    • /skills
  • Add a portable e2e regression test that creates a temporary workspace skill under .agents/skills and verifies:
    • $workspace-skill appears in available commands
    • /skills lists workspace-skill
  • Add focused unit assertions that skill command publication calls listSkills with the session cwd and additional directories.

Verification

  • npm run typecheck
  • npm run test
  • Ran the new e2e test locally through an alternate Codex wrapper to verify the ACP path end-to-end.

Use the active ACP session roots when publishing skill commands and handling /skills so Codex app-server does not fall back to the adapter process cwd.

Adds a portable e2e regression for repo-local skills under the session workspace.

Fixes agentclientprotocol#250
@LucaDiba LucaDiba changed the title Fix ACP skill listing to use session cwd fix: use session cwd when listing skills Jun 28, 2026

@benbrandt benbrandt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@benbrandt benbrandt merged commit 3a3e8f6 into agentclientprotocol:main Jun 29, 2026
1 check passed
@LucaDiba LucaDiba deleted the fix-session-cwd-skills branch June 29, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skills from cwd are not included in commands list

2 participants