Store
Storage contract for a conversation shared by independent workers.
StoredConversation
dataclass
ConversationStore
Bases: Protocol
Source code in src/openai_agents/codex/store.py
lock
lock(
conversation_id: str,
) -> AbstractAsyncContextManager[StoredConversation]
Acquire exclusive access to the ID before reading its last committed state.
Acquire even for an ID that has no snapshot yet. Yield a private copy. On normal exit, commit the new state if set, then release the lock. On exceptional exit, discard changes and release the lock. A worker that loses the lock must be unable to commit its snapshot.
Source code in src/openai_agents/codex/store.py
InMemorySessionStorage
Share snapshots by ID for the lifetime of this object.