mirror of
https://github.com/openai/codex.git
synced 2026-10-22 17:58:46 +00:00
Add a provider for thread-scoped instructions (#44701)
## What changed - Expose `ThreadInstructionsProvider` through `StartThreadOptions`. Load its snapshot at startup and model-request boundaries, composing it after global instructions and before repository instructions. Empty or blank output clears only the thread contribution. - Reject thread instructions exceeding 10,000 estimated tokens independently of the repository instruction budget. Allow host-provided instructions without a filesystem source and rename the shared future type to `LoadInstructionsFuture`. - Retain the provider across warm resumes; require hosts to supply it again for cold resumes and offline forks. Live forks and subagents inherit applied snapshots without inheriting the source thread's provider, including when the parent is unloaded during setup or reload. - Include thread instructions in guardian reviewer inheritance and reuse decisions. ## Testing Add coverage for composition and clearing, refresh within an active turn, size rejection before sampling, cancellation-safe refresh, fork and resume behavior, parent eviction, and reviewer reuse invalidation. GitOrigin-RevId: 7be9a523cbbfd67704067dfd526188dad89a3c88
This commit is contained in:
committed by
Benjamin Carlsson
parent
dc55274818
commit
a231f681b8
@@ -85,8 +85,9 @@ pub use codex_exec_server::NoiseRendezvousConnectBundle;
|
||||
pub use codex_exec_server::NoiseRendezvousConnectProvider;
|
||||
pub use codex_extension_api::ExtensionRegistryBuilder;
|
||||
pub use codex_extension_api::Instructions;
|
||||
pub use codex_extension_api::LoadUserInstructionsFuture;
|
||||
pub use codex_extension_api::LoadInstructionsFuture;
|
||||
pub use codex_extension_api::LoadedUserInstructions;
|
||||
pub use codex_extension_api::ThreadInstructionsProvider;
|
||||
pub use codex_extension_api::UserInstructionsProvider;
|
||||
pub use codex_extension_api::empty_extension_registry;
|
||||
pub use codex_features::Feature;
|
||||
|
||||
Reference in New Issue
Block a user