Skip to content

Show skill reads as ACP read tool calls#269

Closed
nikita-ashihmin wants to merge 1 commit into
agentclientprotocol:mainfrom
nikita-ashihmin:codex/skill-read-ui-events
Closed

Show skill reads as ACP read tool calls#269
nikita-ashihmin wants to merge 1 commit into
agentclientprotocol:mainfrom
nikita-ashihmin:codex/skill-read-ui-events

Conversation

@nikita-ashihmin

@nikita-ashihmin nikita-ashihmin commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Render Codex reads of skill instruction files as skill-specific ACP read tool calls.

Before

  • When the agent loaded/read a skill, Codex emitted a normal commandExecution item whose parsed commandActions contained a read action for a .../skills/<skill>/SKILL.md path.
  • codex-acp mapped every read action the same way, so the UI only saw a generic title like Read file '/path/to/SKILL.md'.
  • That made skill loading indistinguishable from ordinary file reads, even though the UI wants to show activity such as Read UI Accessibility skill separately.

After

  • createCommandActionEvent() detects read actions whose path points at a skill instruction file (*/skills/<skill>/SKILL.md).
  • Those reads are still emitted as standard ACP read tool calls:
    • sessionUpdate: "tool_call"
    • kind: "read"
    • title: "Read <skill> skill"
    • locations: [{ path: <SKILL.md path> }]
    • rawInput: { type: "skill", name: <skill directory>, path }
  • Ordinary file reads are unchanged.

Why

The agent-side “loaded/read skill” activity is already present in Codex events as a parsed read command for SKILL.md; codex-acp just treated it like a generic file read. This keeps the ACP protocol shape unchanged while giving Codex-aware UIs a stable way to render skill loading separately from regular file reads (rawInput.type === "skill").

Tests

  • npx vitest run src/__tests__/CodexACPAgent/command-action-events.test.ts -u
  • npm run typecheck
  • npm test

@nikita-ashihmin
nikita-ashihmin force-pushed the codex/skill-read-ui-events branch from 40bf2b4 to cf4c30a Compare July 7, 2026 15:07
@nikita-ashihmin

Copy link
Copy Markdown
Contributor Author

Closing this PR because the skill-read display can be handled client-side by interpreting existing read tool calls for SKILL.md paths.

@nikita-ashihmin
nikita-ashihmin deleted the codex/skill-read-ui-events branch July 7, 2026 15:16
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.

1 participant