Skip to content

Refresh commands on skills change#328

Open
benbrandt wants to merge 1 commit into
mainfrom
refresh-skills
Open

Refresh commands on skills change#328
benbrandt wants to merge 1 commit into
mainfrom
refresh-skills

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Closes #320

Copilot AI review requested due to automatic review settings July 22, 2026 09:26

Copilot AI 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.

Pull request overview

Implements support for Codex app-server skills/changed notifications so ACP clients receive refreshed available_commands updates without requiring a session restart.

Changes:

  • Handle skills/changed in CodexEventHandler and trigger a refresh callback.
  • Wire the refresh callback from CodexAcpServer to republish available_commands for the active session.
  • Add a unit test covering command refresh behavior on skills/changed.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/CodexEventHandler.ts Adds a skills/changed notification handler that invokes a provided refresh callback.
src/CodexAcpServer.ts Injects an onSkillsChanged callback that republishes available commands for the session.
src/tests/CodexACPAgent/CodexAcpClient.test.ts Adds a test for refreshing available commands after skills/changed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1375 to +1386
await mockFixture.getCodexAcpAgent().prompt({
sessionId: "session-id",
prompt: [{ type: "text", text: "Hello" }],
});
mockFixture.clearAcpConnectionDump();

mockFixture.sendServerNotification({ method: "skills/changed", params: {} });
await mockFixture.getCodexAcpClient().waitForSessionNotifications("session-id");

expect(listSkillsSpy).toHaveBeenCalledWith({
cwds: ["/workspace", "/workspace/extra"],
});
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.

Refresh available commands on Codex skills/changed notifications

2 participants