Logfire Codex Connection
PydanticOfficialPublished by Pydantic
- Skill
- Tool integration
- Automation and integrations
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The logfire-codex-connection skill provides a structured interface for managing the integration between Codex and Logfire. It allows users to configure MCP access for querying Logfire and set up session recording for telemetry, all while adhering to security best practices regarding credential handling and configuration management. The skill acts as a bridge to the native Codex CLI and configuration APIs, ensuring that users can maintain their observability setup without manual file editing or complex CLI workflows.
What it does
- Connects Codex to Logfire for MCP-based querying and session telemetry.
- Checks the current status of Logfire connections and recording configurations.
- Disables or removes existing Logfire connections and stops session recording.
- Supports regional configurations including US, EU, and self-hosted endpoints.
- Handles the enabling and disabling of the bundled Logfire MCP server.
- Provides clear reporting on MCP access, capture modes, and delivery status.
When to use it
- When you need to enable Logfire telemetry for your Codex sessions.
- When you want to query Logfire data directly from within the Codex environment.
- When you need to switch between US, EU, or self-hosted Logfire instances.
- When you need to verify if your current session is being recorded or if MCP is active.
- When you need to disconnect Logfire from Codex to stop data collection.
Advantages
- Simplifies complex configuration tasks into guided, safe steps.
- Protects sensitive credentials by avoiding manual file inspection or printing.
- Maintains clear separation between MCP querying and session recording.
- Provides consistent status reporting without requiring manual CLI intervention.
- Respects existing application instrumentation and model provider settings.
Usage examples
- “Connect my Codex to Logfire for session recording.”
- The agent will guide you through selecting a capture mode (full, messages-only, or metadata-only) and verify the connection status.
- “Check if my Codex session is currently being recorded by Logfire.”
- The agent will inspect the current configuration and report the active capture mode and connection status.
- “Switch my Logfire connection to the EU region.”
- The agent will help you disable the current US connection and configure the EU endpoint via native Codex controls.
- “Stop recording my Codex sessions.”
- The agent will execute the necessary commands to disable session recording while keeping the MCP connection intact if desired.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/pydantic/logfire-codex-connection/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip logfire-codex-connection.zip -d .agents/skills
Documentation by Pydantic
Connect Codex to Logfire
Help the user connect, check status, or disconnect without making them run a setup checklist. Honor the requested operation; a status request never grants permission to install, authenticate, or repair anything.
For connection, ask only if missing: "Would you like to query Logfire, record your Codex sessions, or both?" MCP access and recording are independent. Do not require CLI login for working MCP, or MCP read access to record sessions.
Connect: follow connection setup.
Status: follow status and removal.
Disconnect: follow status and removal.
Resolve bundled scripts relative to this installed skill directory. The runtime
helper is ../../scripts/agent_runtime.py --agent codex; the explicit agent
selects Codex's separate runtime and project credential directory.
Quote paths as single arguments. Do not assume
CLAUDE_PLUGIN_ROOT exists in Codex.
Leave telemetry configuration and exporter installation to the native Logfire CLI. Do not add custom transcript hooks, copy credentials, open secret-bearing Codex/exporter configuration files, or start a nested coding session for setup. Keep existing application instrumentation, model providers, and Gateway routing unchanged. Plugin installation is not consent to session capture.
Finish with MCP access, capture mode/destination, and delivery evidence as separate facts. Give one next action. "Configured" does not mean data arrived.
Files
- ATTRIBUTION.mdAdded by AutoGineer881 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md1.8 KiB
- references/connect.md4.1 KiB
- references/mcp.md4.4 KiB
- references/status.md2.5 KiB
references/connect.md
Connection setup
Query Logfire
Follow MCP connection selection for US, EU, or self-hosted access. It keeps one selected connection active without changing plugin cache files. Never print a full Codex configuration file: it may contain exporter credentials. CLI account login does not authenticate Codex's MCP client.
Query-only ends here. No runtime installation or capture questions are needed.
Record Codex sessions
Confirm destination origin, organization, and project, and explain the choices:
Full: native logs/traces with prompts, tool arguments and bounded result previews; enrichment adds final assistant responses. Content can contain source code or secrets. Native logs can also include account email and host name.
Messages without tool content: prompt/final-response enrichment and native traces, without native logs or tool content (
no-tool-content).Metadata only: timing and usage without message or tool content.
Not now: leave recording unchanged.
Record the user's capture choice explicitly. These settings apply across
repositories, not just this conversation. Native export uses CODEX_HOME, while
enrichment configuration uses XDG_CONFIG_HOME (or ~/.config): separate Codex
homes can still share an enrichment destination. Do not retarget an existing
installation without confirmation. Disabling this plugin does not stop native
capture. Codex currently stores a project write token in its native configuration
and exporter configuration; do not print, commit, or sync those files.
Run the bundled helper with --agent codex (see the skill entrypoint). If it
reports runtime_required, offer to install the private persistent CLI with the
same helper plus --install; Python 3 and uv are required. Do not silently install
packages into the user's app or fall back to the old Python SDK CLI. Status
checks must omit --install. Use its returned absolute executable and data_dir.
For every command below, use the confirmed --region us, --region eu, or
--base-url <origin> and --org <organization>. Omit ambient LOGFIRE_BASE_URL
when using a cloud region. For browser login, omit ambient LOGFIRE_API_KEY,
LOGFIRE_TOKEN, and LOGFIRE_MCP_TOKEN from child environments without exposing
their values or changing the parent environment. Preserve explicitly requested
headless credentials. Quote all substituted paths/names as arguments.
Inspect
--no-input --output json auth status. If needed, runauth loginagainst that same origin and organization, explaining browser approval. Do not start competing pending logins.authdoes not accept--data-dir.Inspect
--no-input --output json project --data-dir <data_dir> current. Reuse credentials matching the confirmed origin/org/project. Only when absent (not on network/auth errors), or after explicit retargeting approval, run--no-input --output json init use --name <project> --permission send --data-dir <data_dir>. This creates a write token; do not repeat initialization on reconnect or pick another project on failure.Run
--beta --no-input --output json agent codex --data-dir <data_dir> configure --capture <mode>with exactlyfull,no-tool-content, ormetadata-onlyas selected. The CLI owns native export and installation of the pinned enrichment plugin. Do not separately installlogfire-exporterfrom another marketplace.Recheck
--beta --no-input --output json agent codex status. Inspect native export and enrichment separately, including credential/file-permission state.
Respect independent exporter conflicts. A failure can leave the pinned plugin installed or a token created; report the actual partial state, not an invented rollback, and inspect status before retrying mutations.
Ask the user to restart Codex and review new exporter hooks in native hook controls before trusting them. Send a harmless prompt after restart, then use MCP if available to look for matching recent Codex session data in the confirmed project. Do not treat unrelated historical activity as proof. If session correlation or read access is unavailable, report delivery as not yet verified.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Pydantic
- Publisher
- Pydantic (Official)
- Source
- pydantic/skills · plugins/logfire/skills/logfire-codex-connection · commit 98f591c
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Pydantic or Pydantic.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download logfire-codex-connection.zip