Expand description
§K1 chat-thread session actor
§Public contract
open(adapter, key, session, kmap, web_search)recovers one durable thread, spawns its serialized actor, and returns its established command handle.web_searchis the configuredkcode-k1-codex-websearch::Runner.- The public inner Ktool is the strict object
WebSearch { query: string, model: string, reasoning_effort?: string }. Unknown fields, aliases, nulls, and nonstrings fail locally. The model must start with exact case-sensitivecodex/; the prefix is stripped once. Omitted effort becomesmedium; supplied strings pass unchanged. - Each accepted WebSearch Tool Call records its absolute 60-minute deadline before launch, runs once in the background, emits no progress messages, and later records exactly one correlated terminal Tool Result while this actor remains alive. Concurrent calls retain their original ToolCallId. Actor teardown or inference failure cancels all outstanding calls.
Handleretains the actor-channel contract.snapshot()retains its live snapshot, whilesnapshot_with_events()returns that snapshot with cloned durable events in recorded order.
The actor owns FIFO commands, Codex turn effects, managed runtime model-usage lifecycle, stage acknowledgements, restart generations, WebSearch task correlation, and teardown. Durable state owns canonical conversation transitions and persistence. This package owns no persistence format, provider prompt, HTTP, migration, daemon composition, deployment, or progress-event surface.