Skip to content

fix(sensor): support current Codex tool records - #83

Draft
barisozbas wants to merge 1 commit into
mainfrom
pr/codex-tool-records
Draft

fix(sensor): support current Codex tool records#83
barisozbas wants to merge 1 commit into
mainfrom
pr/codex-tool-records

Conversation

@barisozbas

@barisozbas barisozbas commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

What changed

Codex session records now parse across the currently observed call, argument, output, and status shapes without dropping useful tool activity.

  • Accepts common call-ID aliases and both structured and encoded arguments.
  • Bounds nested values before retaining them and preserves unknown typed result objects.
  • Infers success, failure, and pending states only from explicit result envelopes, avoiding false failures from domain data.
  • Recognizes MCP tools from encoded names and explicit namespaces.
  • Keeps valid sessions when individual records or timestamps are malformed.

Why

The previous parser assumed a narrower event shape. Newer records could lose arguments or results, and nested business fields such as status could be mistaken for the tool's execution status.

Validation

  • pytest -q Sensor/tests
  • ruff check Sensor/adr_sensor/parsers/codex_parser.py Sensor/tests/test_parsers.py

Stack

This is the foundation for #84.

Summary:
Intent:
- Preserve Codex sessions and tool activity as event schemas evolve.
- Derive tool outcomes from explicit structured result envelopes.

Changes:
- Accept alternate call identifiers, argument shapes, output containers, and malformed timestamps.
- Normalize status and error data while retaining typed results and MCP namespaces.
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