Skip to content

feat(app-server): thread/read API#9569

Merged
owenlin0 merged 1 commit intomainfrom
owen/thread_read_api
Jan 22, 2026
Merged

feat(app-server): thread/read API#9569
owenlin0 merged 1 commit intomainfrom
owen/thread_read_api

Conversation

@owenlin0
Copy link
Collaborator

Add a new thread/read app-server API for fetching a thread (and optionally also include the thread's contents via the turns field).

@owenlin0 owenlin0 force-pushed the owen/thread_read_api branch 2 times, most recently from c78e466 to f78833a Compare January 21, 2026 01:01
@owenlin0 owenlin0 force-pushed the owen/thread_read_api branch from f78833a to 5d06347 Compare January 22, 2026 19:50
@owenlin0 owenlin0 marked this pull request as ready for review January 22, 2026 19:51
@owenlin0 owenlin0 requested a review from aibrahim-oai January 22, 2026 19:51
@owenlin0
Copy link
Collaborator Author

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d063473e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1725 to +1728
let rollout_path =
match find_thread_path_by_id_str(&self.config.codex_home, &thread_uuid.to_string())
.await
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow thread/read to find archived rollouts

When a thread is archived, its rollout file is moved into archived_sessions (see codex_message_processor.rs:3261-3268). thread/read resolves the rollout path solely via find_thread_path_by_id_str, which only searches under codex_home/sessions (core/src/rollout/list.rs:798-820). This means a thread that was successfully archived will now fail thread/read with “no rollout found”, even though the data is still stored; the new API can’t read archived threads at all. Consider falling back to a search in archived_sessions (or adding an explicit flag) so archived threads remain readable.

Useful? React with 👍 / 👎.

@owenlin0 owenlin0 merged commit 80240b3 into main Jan 22, 2026
30 of 32 checks passed
@owenlin0 owenlin0 deleted the owen/thread_read_api branch January 22, 2026 20:22
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants