fix(tracing): recognize nested Codex subagent parent identities - #83
Open
joserprieto wants to merge 2 commits into
Open
joserprieto wants to merge 2 commits into
joserprieto wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex 0.154.0 can record a child thread’s parent only in
session_meta.source.subagent.thread_spawn.parent_thread_id. The index currently reads only the top-level field, so a child with no UUID-bearing spawn event is omitted from its parent trace. The parser also misclassifies this metadata layout.Resolve both metadata layouts through a shared helper. Retain legacy subagent classification and reject conflicting parent identities from the index. Existing parent/time attribution then recovers the child without changing transport or delivery behavior.
Regression coverage uses synthetic metadata and existing synthetic rollout fixtures: nested-only identity, matching legacy identity, conflicting identities, legacy/root classification, and the recovered child’s parent/model.
A separate test-only commit acknowledges exported turn IDs before the existing repeat-export assertion; that assertion already failed on the base revision because convertRollout no longer persists delivery receipts itself.
Validation: new regressions observed failing before the fix; focused tests pass; pnpm run lint passes. Validated locally on macOS with Node 22.22.0 and 24.14.1; Ubuntu CI remains to run. Full suite: 64 tests pass across 7 files (production tracing credentials removed from the test environment).
Related: #81 addresses inherited ancestor turns, a separate issue. This change does not introduce the local compatibility build’s delivery ledger, retry policy, custom exporter, launcher or installation configuration.