Skip to content

Add turn start timestamp to turn metadata - #19473

Merged
mchen-oai merged 1 commit into
mainfrom
mchen/turn_start_timestamp_metadata
Apr 28, 2026
Merged

mchen-oai merged 1 commit into
mainfrom
mchen/turn_start_timestamp_metadata

Conversation

@mchen-oai

@mchen-oai mchen-oai commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

  • Without change: MCP tool calls receive _meta["x-codex-turn-metadata"] with session_id and turn_id.
  • Issue: MCP servers may want the turn start timestamp to measure internal latency relative to turn start.

What Changed

  • With change: turn metadata now includes turn_started_at_unix_ms, which is propagated to MCP tool calls in _meta["x-codex-turn-metadata"].

Verification

  • codex-rs/core/src/mcp_tool_call_tests.rs
  • codex-rs/core/src/turn_metadata_tests.rs
  • codex-rs/core/src/turn_timing_tests.rs
  • codex-rs/core/tests/responses_headers.rs
  • codex-rs/core/tests/suite/search_tool.rs

@github-actions

github-actions Bot commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@mchen-oai
mchen-oai force-pushed the mchen/turn_start_timestamp_metadata branch from 562f93e to a7cd879 Compare April 25, 2026 00:47
@mchen-oai

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Apr 25, 2026
@mchen-oai
mchen-oai force-pushed the mchen/turn_start_timestamp_metadata branch 2 times, most recently from 8b0c8bf to 652b5c9 Compare April 25, 2026 04:24
@mchen-oai
mchen-oai marked this pull request as ready for review April 25, 2026 04:25
@mchen-oai
mchen-oai requested a review from a team as a code owner April 25, 2026 04:25
@mchen-oai
mchen-oai force-pushed the mchen/turn_start_timestamp_metadata branch 4 times, most recently from f13f077 to 196dd95 Compare April 28, 2026 02:09
@mchen-oai
mchen-oai force-pushed the mchen/turn_start_timestamp_metadata branch from 196dd95 to 5eafeb8 Compare April 28, 2026 16:13
@mchen-oai
mchen-oai enabled auto-merge (squash) April 28, 2026 16:20
@mchen-oai
mchen-oai merged commit ccec84b into main Apr 28, 2026
25 checks passed
@mchen-oai
mchen-oai deleted the mchen/turn_start_timestamp_metadata branch April 28, 2026 16:37
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants