Skip to content

Comments

docs: expand multi-prompt context carry-over details#1

Open
Zireaeler wants to merge 1 commit intomainfrom
codex/explain-codebase-structure-to-newcomers
Open

docs: expand multi-prompt context carry-over details#1
Zireaeler wants to merge 1 commit intomainfrom
codex/explain-codebase-structure-to-newcomers

Conversation

@Zireaeler
Copy link
Owner

Motivation

  • Clarify how multi-call turns carry prior prompt context into subsequent model requests with concrete, repo-local detail.
  • Respond to inline feedback by adding an explicit subsection that explains where carry-over is stored, how history is rebuilt, and how function calls and outputs are appended.

Description

  • Add docs/codex-request-lifecycle.md updates: new section 3.1 that states carry-over lives in ResponsesApiRequest.input and is encoded as Vec<ResponseItem> with structured items (message, function_call, function_call_output).
  • Describe the per-round pipeline (OutputItemDone → record function_call → execute tool → record function_call_output → rebuild sampling_request_input) and emphasize that history is replayed structurally rather than by copying assistant plaintext.
  • Include concrete JSON examples for Call docs: expand multi-prompt context carry-over details #1 / Call Codex-generated pull request #2 / Call move all tests under tests/ openai/codex#3 showing appended function_call and function_call_output items, and summarize which request fields typically remain stable (instructions, tool_choice, stream, prompt_cache_key) versus which change (input, tools, reasoning/include/text).
  • Explain compaction behavior: when tokens near limit the next input can become a summary + recent critical items instead of the full raw history.

Testing

  • No automated tests were run because this is a documentation-only change.
  • No runtime or Rust code was modified, so no cargo test or workspace formatting was required for this PR.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant