Include a `skill_name` on OTel tool events

Resolved 💬 2 comments Opened Feb 8, 2026 by drewradcliff Closed Mar 29, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

App and CLI

What feature would you like to see?

Can we get an attribute like skill_name to the OpenTelemetry tool events (e.g. tool decision/result)?

It’s possible to tell a tool was used, but not reliably group usage into higher-level “skills".

Additional information

_No response_

View original on GitHub ↗

2 Comments

wboudy · 6 months ago

+1 — I’ve been working on measuring “skill ROI” and had the same thought.

Problem

OTel logs (and codex exec --json traces) expose tool activity, but there’s no reliable way to attribute tool events to the active skill. Tool events identify the tool, not the skill context.

This blocks:

  • Skill-level ROI measurement
  • Debugging (which skill was active when errors/retries happened)
  • Adoption/impact analytics over time

Proposed minimal change

Add an optional attribute to tool-related telemetry events:

  • Key: codex.skill.name (or skill_name)
  • Value: currently active skill at emission time
  • Omit if no skill is active
  • Emit name only (no filesystem paths)

Attach to:

  • tool decision
  • tool_call
  • tool_result
  • (optionally) tool error events

Parity: include the same field in codex exec --json output.

Acceptance criteria

  1. After explicit skill invocation (e.g. $skill-name), subsequent tool events include the attribute until skill context ends.
  2. No attribute when no skill is active.
  3. Consistent across CLI and app server.
  4. Privacy-safe defaults.

Happy to help implement after maintainer confirmation (per the invitation-only PR policy).

etraut-openai contributor · 5 months ago

This feature request hasn't received enough upvotes, so I'm closing it.