Framework Metadata Mappings

Where adapter-specific raw fields are preserved in minitrace for Codex, Claude Code, and Pi

Sections

Terminology & Glossary
πŸ“– Documentation
Navigation
20 sectionsv0.1
πŸ“„ Framework Metadata Mappings β€” glaze help framework-metadata-mappings
framework-metadata-mappings

Framework Metadata Mappings

Where adapter-specific raw fields are preserved in minitrace for Codex, Claude Code, and Pi

Topicminitraceschemaadapterscodexclaude-codepi

This page documents the adapter-specific metadata that minitrace preserves without promoting it into shared first-class schema fields.

Use it together with:

  • go-minitrace help minitrace-schema for the shared schema
  • go-minitrace help adapter-reference for adapter overviews

Storage conventions

Framework-specific raw fields are preserved in three places:

LocationUse for
operational_context.framework_configSession/runtime configuration that applies broadly across the session
turns[].framework_metadataRaw turn/message metadata that does not fit the shared turn schema
tool_calls[].framework_metadataTool-call-specific metadata that is useful but framework-specific

Codex mappings

operational_context.framework_config

Stored keyRaw source
personalityturn_context.payload.personality
collaboration_modeturn_context.payload.collaboration_mode.mode
collaboration_mode_detailturn_context.payload.collaboration_mode
reasoning_effortturn_context.payload.effort or collaboration settings
originatorsession_meta.payload.originator
session_sourcesession_meta.payload.source
approval_policyturn_context.payload.approval_policy
sandbox_policyturn_context.payload.sandbox_policy
truncation_policyturn_context.payload.truncation_policy
rate_limitslatest event_msg.payload.rate_limits from token-count events
model_context_windowtask_started / token-count info
timezoneturn_context.payload.timezone

turns[].framework_metadata

Stored keyRaw source
turn_idturn_context.payload.turn_id, task_started.turn_id, or exec item turn_id
phaseassistant event/item phase
memory_citationassistant event memory_citation

tool_calls[].framework_metadata

Stored keyRaw source
codex_functiontool/function name used by the adapter
justificationfunction_call.arguments.justification when present
sourceexec_command_end.source or exec item source
parsed_cmdexec_command_end.parsed_cmd or exec item parsed_cmd
stdoutexec_command_end.stdout or exec item stdout
stderrexec_command_end.stderr or exec item stderr
statusexec event/item status
turn_idexec event/item turn_id
exit_coderetained in metadata for compatibility, even though a first-class output.exit_code now exists

Claude Code mappings

operational_context.framework_config

Stored keyRaw source
entrypointtop-level Claude record entrypoint

turns[].framework_metadata

Stored keyRaw source
entrypointtop-level Claude record entrypoint
slugtop-level Claude record slug
parent_uuidtop-level Claude record parentUuid
is_sidechaintop-level Claude record isSidechain
stop_reasonmessage.stop_reason
stop_sequencemessage.stop_sequence
cache_creationmessage.usage.cache_creation

tool_calls[].framework_metadata

Stored keyRaw source
callerassistant.message.content[].caller on tool_use blocks
entrypointpreserved from the emitting assistant/tool-result record
slugpreserved from the emitting assistant/tool-result record
parent_uuidpreserved from the emitting assistant/tool-result record
is_sidechainpreserved from the emitting assistant/tool-result record

Pi mappings

operational_context.framework_config

Pi currently preserves a small session config blob rather than the larger framework-specific metadata set used by Codex and Claude Code.

Stored keyRaw source
thinking_levelthinking_level_change.thinkingLevel
apimodel_change.api or message-level api

turns[].framework_metadata

Stored keyRaw source
stop_reasonmessage.stopReason
error_messagemessage.errorMessage

tool_calls[].framework_metadata

Stored keyRaw source
difftoolResult.details.diff
first_changed_linetoolResult.details.firstChangedLine

Notes

  • These metadata keys are intentionally framework-specific. They are preserved for analysis and debugging, but they are not guaranteed to exist across adapters.
  • First-class fields should be reserved for values with stable cross-framework meaning. For example, output.exit_code and input.justification were promoted because they are directly queryable and have clear semantics.
  • If a field graduates from metadata into the shared schema later, this page should be updated to document both the first-class field and any metadata retained for backward compatibility.