Skip to content

Pretty print Codex logs to core.info using shared renderer#15688

Merged
pelikhan merged 3 commits intocopilot/review-codex-agentic-enginefrom
copilot/pretty-print-codex-logs
Feb 14, 2026
Merged

Pretty print Codex logs to core.info using shared renderer#15688
pelikhan merged 3 commits intocopilot/review-codex-agentic-enginefrom
copilot/pretty-print-codex-logs

Conversation

Copy link
Contributor

Copilot AI commented Feb 14, 2026

Codex logs were displaying as generic "Codex log parsed successfully" instead of structured execution summaries in core.info, unlike Claude/Copilot parsers.

Changes

Return structured logEntries from Codex parser

  • Added convertToLogEntries() to transform parsed Codex data (thinking, tool calls, bash commands) into standardized logEntries format
  • Changed parseCodexLog() return type from string to object: { markdown, logEntries, mcpFailures, maxTurnsHit }
  • Updated parse_custom_log.cjs to handle object return instead of string

Result

Codex logs now render structured summaries to core.info via generatePlainTextSummary():

=== Codex Execution Summary ===
Model: o4-mini

Conversation:

✓ github__get_pull_request
   └ {"number": 123, "title": "..."}

✓ $ git log --oneline -2
   └ 2 lines...

Statistics:
  Tools: 2/2 succeeded

The bootstrap code (log_parser_bootstrap.cjs) checks for logEntries presence to determine whether to call the plain text renderer. Codex now follows the same contract as other engines.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Reference: https://github.com/github/gh-aw/actions/runs/22018381996/job/63623495793#step:42:1

Pretty print the parsed codex logs to core.info. Use shared logs helper to render them.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 14, 2026 14:16
- Convert Codex log parser to return structured logEntries format
- Add convertToLogEntries helper to transform parsed data
- Update parseCodexLog to return object with markdown, logEntries, mcpFailures, maxTurnsHit
- Update parse_custom_log.cjs to handle new return format
- Update all tests to access result.markdown property
- Codex logs now output to core.info via generatePlainTextSummary

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Pretty print parsed codex logs to core.info Pretty print Codex logs to core.info using shared renderer Feb 14, 2026
Copilot AI requested a review from pelikhan February 14, 2026 14:20
@pelikhan pelikhan marked this pull request as ready for review February 14, 2026 14:22
Copilot AI review requested due to automatic review settings February 14, 2026 14:22
@pelikhan pelikhan merged commit 51683f8 into copilot/review-codex-agentic-engine Feb 14, 2026
2 checks passed
@pelikhan pelikhan deleted the copilot/pretty-print-codex-logs branch February 14, 2026 14:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the Codex log parser to return structured logEntries (matching the pattern used by Claude and Copilot parsers), enabling pretty-printed execution summaries in core.info console output instead of generic "log parsed successfully" messages.

Changes:

  • Modified parseCodexLog() to return an object with {markdown, logEntries, mcpFailures, maxTurnsHit} instead of just a markdown string
  • Added convertToLogEntries() function to transform parsed Codex data (thinking, tool calls, bash commands) into standardized logEntries format
  • Updated parse_custom_log.cjs to handle the new object return type from Codex parser
  • Updated all tests in parse_codex_log.test.cjs to check result.markdown instead of just result

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
actions/setup/js/parse_codex_log.cjs Added convertToLogEntries() function and changed parseCodexLog() return type from string to object with markdown, logEntries, mcpFailures, and maxTurnsHit fields
actions/setup/js/parse_custom_log.cjs Updated to handle Codex parser's new object return type, extracting and forwarding all fields (markdown, logEntries, mcpFailures, maxTurnsHit)
actions/setup/js/parse_codex_log.test.cjs Updated all test assertions to access result.markdown instead of treating result as a string

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
type: "tool_use",
id: toolUseId,
name: item.toolName, // Already in server__method format
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tool name format needs to be prefixed with "mcp__" for proper display in plain text summaries. The generatePlainTextSummary function expects MCP tools to be in the format "mcp__server__method" (e.g., "mcp__github__list_pull_requests") to apply proper formatting. Currently, the name is "server__method" (e.g., "github__list_pull_requests"), which will not be formatted correctly.

Change line 169 to:
name: mcp__${item.toolName}, // Convert to mcp__ format for plain text rendering

Suggested change
name: item.toolName, // Already in server__method format
name: `mcp__${item.toolName}`, // Convert to mcp__ format for plain text rendering

Copilot uses AI. Check for mistakes.
Comment on lines +51 to 55
expect(result.markdown).toContain("## 🤖 Reasoning");
expect(result.markdown).toContain("## 🤖 Commands and Tools");
expect(result.markdown).toContain("github::list_pull_requests");
expect(result.markdown).toContain("✅");
});
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing test coverage for the new logEntries array returned by parseCodexLog. While the tests verify the markdown field, they should also verify that logEntries contains properly structured conversation data (tool calls, bash commands, thinking sections) that can be used by generatePlainTextSummary.

Copilot uses AI. Check for mistakes.
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.

2 participants