Skip to content

Opt-in OTel logging for agent responses #22230

@chdeskur

Description

@chdeskur

What variant of Codex are you using?

CLI, App

What feature would you like to see?

Codex OpenTelemetry exports should support an explicit opt-in option to log the agent/assistant response content for a turn.

This feature is needed for monitoring and evaluating agent behavior, especially regarding adherence to SKILL.md directives.

Suggested behavior

Add a config option such as:

[otel]
log_agent_responses = true

or an environment/config equivalent.

When enabled, Codex should emit a log event for the final assistant message, for example:

  • event.name = "codex.agent_response"
  • conversation.id
  • turn.id if available
  • response_length
  • response = ""

A documented truncation limit would be acceptable.

Additional information

This feature is available in Claude Code's OTel implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIappIssues related to the Codex desktop appconfigIssues involving config.toml, config keys, config merging, or config updatesenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions