core: add extra metadata field to Thread struct (#29675)

# Summary

Adds a field Thread.extras that can be used to hold arbitrary metadata
specific to a given thread.
This commit is contained in:
Boyang Niu
2026-06-23 19:15:59 +00:00
committed by GitHub
parent 2cf2a6a844
commit 354807920e
30 changed files with 113 additions and 44 deletions
+2
View File
@@ -334,6 +334,7 @@ async fn resume_lookup_model_providers_filters_only_last_lookup() {
fn turn_items_for_thread_returns_matching_turn_items() {
let thread = AppServerThread {
id: "thread-1".to_string(),
extra: None,
session_id: "thread-1".to_string(),
forked_from_id: None,
parent_thread_id: None,
@@ -753,6 +754,7 @@ fn sample_thread_start_response() -> ThreadStartResponse {
ThreadStartResponse {
thread: codex_app_server_protocol::Thread {
id: "67e55044-10b1-426f-9247-bb680e5fe0c8".to_string(),
extra: None,
session_id: "67e55044-10b1-426f-9247-bb680e5fe0c7".to_string(),
forked_from_id: None,
parent_thread_id: None,