mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
Clarify ephemeral context compaction docs
Document that the current turn's ephemeral context is preserved across mid-turn compaction, while older ephemeral context is stripped during compaction. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
1f56845cc4
commit
766be572d4
@@ -2959,7 +2959,7 @@
|
||||
"description": "Override the reasoning effort for this turn and subsequent turns."
|
||||
},
|
||||
"ephemeralContext": {
|
||||
"description": "Additional model-visible context for this turn, such as editor or IDE state. This context is not re-injected automatically after compaction, so clients should send a fresh snapshot on each turn instead of expecting it to carry forward automatically.",
|
||||
"description": "Additional model-visible context for this turn, such as editor or IDE state. If compaction happens while this turn is still in progress, the current turn's ephemeral context is preserved so the turn can continue. Ephemeral context from older turns is stripped during compaction, so clients should send a fresh snapshot on each turn instead of expecting it to persist automatically.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/EphemeralContext"
|
||||
},
|
||||
|
||||
@@ -13224,7 +13224,7 @@
|
||||
"description": "Override the reasoning effort for this turn and subsequent turns."
|
||||
},
|
||||
"ephemeralContext": {
|
||||
"description": "Additional model-visible context for this turn, such as editor or IDE state. This context is not re-injected automatically after compaction, so clients should send a fresh snapshot on each turn instead of expecting it to carry forward automatically.",
|
||||
"description": "Additional model-visible context for this turn, such as editor or IDE state. If compaction happens while this turn is still in progress, the current turn's ephemeral context is preserved so the turn can continue. Ephemeral context from older turns is stripped during compaction, so clients should send a fresh snapshot on each turn instead of expecting it to persist automatically.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v2/EphemeralContext"
|
||||
},
|
||||
|
||||
@@ -538,7 +538,7 @@
|
||||
"description": "Override the reasoning effort for this turn and subsequent turns."
|
||||
},
|
||||
"ephemeralContext": {
|
||||
"description": "Additional model-visible context for this turn, such as editor or IDE state. This context is not re-injected automatically after compaction, so clients should send a fresh snapshot on each turn instead of expecting it to carry forward automatically.",
|
||||
"description": "Additional model-visible context for this turn, such as editor or IDE state. If compaction happens while this turn is still in progress, the current turn's ephemeral context is preserved so the turn can continue. Ephemeral context from older turns is stripped during compaction, so clients should send a fresh snapshot on each turn instead of expecting it to persist automatically.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/EphemeralContext"
|
||||
},
|
||||
|
||||
@@ -12,45 +12,58 @@ import type { EphemeralContext } from "./EphemeralContext";
|
||||
import type { SandboxPolicy } from "./SandboxPolicy";
|
||||
import type { UserInput } from "./UserInput";
|
||||
|
||||
export type TurnStartParams = {threadId: string, input: Array<UserInput>, /**
|
||||
export type TurnStartParams = { threadId: string, input: Array<UserInput>,
|
||||
/**
|
||||
* Additional model-visible context for this turn, such as editor or IDE state.
|
||||
* This context is not re-injected automatically after compaction, so
|
||||
* If compaction happens while this turn is still in progress, the current
|
||||
* turn's ephemeral context is preserved so the turn can continue.
|
||||
* Ephemeral context from older turns is stripped during compaction, so
|
||||
* clients should send a fresh snapshot on each turn instead of expecting
|
||||
* it to carry forward automatically.
|
||||
* it to persist automatically.
|
||||
*/
|
||||
ephemeralContext?: Array<EphemeralContext> | null, /**
|
||||
ephemeralContext?: Array<EphemeralContext> | null,
|
||||
/**
|
||||
* Override the working directory for this turn and subsequent turns.
|
||||
*/
|
||||
cwd?: string | null, /**
|
||||
cwd?: string | null,
|
||||
/**
|
||||
* Override the approval policy for this turn and subsequent turns.
|
||||
*/
|
||||
approvalPolicy?: AskForApproval | null, /**
|
||||
approvalPolicy?: AskForApproval | null,
|
||||
/**
|
||||
* Override the sandbox policy for this turn and subsequent turns.
|
||||
*/
|
||||
sandboxPolicy?: SandboxPolicy | null, /**
|
||||
sandboxPolicy?: SandboxPolicy | null,
|
||||
/**
|
||||
* Override the model for this turn and subsequent turns.
|
||||
*/
|
||||
model?: string | null, /**
|
||||
model?: string | null,
|
||||
/**
|
||||
* Override the service tier for this turn and subsequent turns.
|
||||
*/
|
||||
serviceTier?: ServiceTier | null | null, /**
|
||||
serviceTier?: ServiceTier | null | null,
|
||||
/**
|
||||
* Override the reasoning effort for this turn and subsequent turns.
|
||||
*/
|
||||
effort?: ReasoningEffort | null, /**
|
||||
effort?: ReasoningEffort | null,
|
||||
/**
|
||||
* Override the reasoning summary for this turn and subsequent turns.
|
||||
*/
|
||||
summary?: ReasoningSummary | null, /**
|
||||
summary?: ReasoningSummary | null,
|
||||
/**
|
||||
* Override the personality for this turn and subsequent turns.
|
||||
*/
|
||||
personality?: Personality | null, /**
|
||||
personality?: Personality | null,
|
||||
/**
|
||||
* Optional JSON Schema used to constrain the final assistant message for
|
||||
* this turn.
|
||||
*/
|
||||
outputSchema?: JsonValue | null, /**
|
||||
outputSchema?: JsonValue | null,
|
||||
/**
|
||||
* EXPERIMENTAL - Set a pre-set collaboration mode.
|
||||
* Takes precedence over model, reasoning_effort, and developer instructions if set.
|
||||
*
|
||||
* For `collaboration_mode.settings.developer_instructions`, `null` means
|
||||
* "use the built-in instructions for the selected mode".
|
||||
*/
|
||||
collaborationMode?: CollaborationMode | null};
|
||||
collaborationMode?: CollaborationMode | null, };
|
||||
|
||||
@@ -3633,9 +3633,11 @@ pub struct TurnStartParams {
|
||||
pub thread_id: String,
|
||||
pub input: Vec<UserInput>,
|
||||
/// Additional model-visible context for this turn, such as editor or IDE state.
|
||||
/// This context is not re-injected automatically after compaction, so
|
||||
/// If compaction happens while this turn is still in progress, the current
|
||||
/// turn's ephemeral context is preserved so the turn can continue.
|
||||
/// Ephemeral context from older turns is stripped during compaction, so
|
||||
/// clients should send a fresh snapshot on each turn instead of expecting
|
||||
/// it to carry forward automatically.
|
||||
/// it to persist automatically.
|
||||
#[ts(optional = nullable)]
|
||||
pub ephemeral_context: Option<Vec<EphemeralContext>>,
|
||||
/// Override the working directory for this turn and subsequent turns.
|
||||
|
||||
@@ -414,7 +414,7 @@ Turns attach user input (text or images) to a thread and trigger Codex generatio
|
||||
|
||||
You can optionally specify config overrides on the new turn. If specified, these settings become the default for subsequent turns on the same thread. `outputSchema` applies only to the current turn.
|
||||
|
||||
`ephemeralContext` is separate from `input`. Use it for additional model-visible context for this turn, such as IDE/editor state. This context is not re-injected automatically after compaction, so clients should send a fresh snapshot on each turn instead of expecting it to carry forward automatically.
|
||||
`ephemeralContext` is separate from `input`. Use it for additional model-visible context for this turn, such as IDE/editor state. If compaction happens while this turn is still in progress, the current turn's ephemeral context is preserved so the turn can continue. Ephemeral context from older turns is stripped during compaction, so clients should send a fresh snapshot on each turn instead of expecting it to persist automatically.
|
||||
|
||||
```json
|
||||
{ "method": "turn/start", "id": 30, "params": {
|
||||
|
||||
Reference in New Issue
Block a user