fix(core): tag subagent OpenAI JSON logs - #4099
Merged
Merged
Conversation
tanzhenxin
force-pushed
the
codex/tag-subagent-openai-logs
branch
from
May 13, 2026 03:40
ea2ad71 to
fed041d
Compare
tanzhenxin
marked this pull request as ready for review
May 13, 2026 03:41
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
LaZzyMan
approved these changes
May 13, 2026
LaZzyMan
left a comment
Collaborator
There was a problem hiding this comment.
Review
Small, well-scoped follow-up to #4081 that disambiguates subagent OpenAI JSON logs from main-agent and side-query traffic. The parsing is conservative — it requires the exact <session>#<subagent>#<round> shape with a non-empty subagent and numeric turn, and the session UUID is intentionally dropped from the filename. Side-query and other internal prompt-id suffixes are preserved unchanged.
Verdict
APPROVE — focused, low-risk fix with the right test coverage for its scope.
TaimoorSiddiquiOfficial
added a commit
to TaimoorSiddiquiOfficial/HopCode
that referenced
this pull request
May 13, 2026
…ry-pick] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
side-query:*calls visible in the explicit diagnostic sink, but Anthropic agent sidechain calls use prompt ids shaped like<session>#<subagent>#<round>. Those calls were recorded as plainopenai-*.jsonfiles, making subagent traffic hard to distinguish from the main agent even though telemetry already attributes them separately.subagent-*suffixes for subagent prompt ids, leaves main-session prompt ids untagged, and does not write the full session id into filenames.Validation
cd packages/core && npx vitest run src/utils/openaiLogger.test.ts src/core/loggingContentGenerator/loggingContentGenerator.test.ts;npm run build && npm run typecheck;npm run bundle;git diff --checknode dist/cli.js --approval-mode yolo --openai-logging --openai-logging-dir /tmp/qwen-rename-auto-logs-1778642240-fast, a setup prompt (For an end-to-end logging test, reply with exactly: ready for rename auto.), and/rename --autounder a temporaryQWEN_HOMEwithfastModelset toclaude-opus-4-7.side-query:*calls, and subagent calls by filename suffix while preserving timestamp-first chronological sorting.side-query-session-titlefiles, and asubagent-managed-auto-memory-extractor-*file./tmp/qwen-rename-auto-logs-1778642240-fast/openai-2026-05-13T03-17-39.632Z-74bf403a-side-query-session-title.json,/tmp/qwen-rename-auto-logs-1778642240-fast/openai-2026-05-13T03-17-49.579Z-dc490e0d-side-query-session-title.json, and/tmp/qwen-rename-auto-logs-1778642240-fast/openai-2026-05-13T03-17-43.225Z-ac6a1ab1-subagent-managed-auto-memory-extractor-d31oyk.json.Scope / Risk
Testing Matrix
Testing matrix notes:
Linked Issues / Bugs