Skip to content

Fix goal-first live threads missing from thread/list#28808

Open
etraut-openai wants to merge 1 commit into
mainfrom
etraut/goal-first-thread-list
Open

Fix goal-first live threads missing from thread/list#28808
etraut-openai wants to merge 1 commit into
mainfrom
etraut/goal-first-thread-list

Conversation

@etraut-openai

@etraut-openai etraut-openai commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Fixes #28263.

Why

When a thread starts with /goal, the goal extension can update SQLite goal state before the thread has any user-turn rollout items. thread/list discovers and repairs listing metadata from persisted rollout items, so a goal-first live thread could be absent from app-server listings after restart even though the goal itself existed.

This regressed when goal handling moved out of core: the core path wrote the goal update into the live thread rollout, while the extension-backed app-server path only updated goal state and emitted the live notification.

What

  • Add GoalSetOutcome::thread_goal_updated_item() so the goal extension owns the canonical ThreadGoalUpdated rollout item shape.
  • When app-server sets a goal on an active live thread, append that rollout item to ThreadStore so listing repair can recover the thread preview.
  • Add an app-server regression test that starts a live thread with thread/goal/set and verifies it appears in thread/list.

Verification

  • env -u CODEX_SQLITE_HOME just test -p codex-app-server goal_first_live_thread_appears_in_thread_list

@etraut-openai etraut-openai changed the title Fix goal-first threads in thread/list Fix goal-first live threads missing from thread/list Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/goal-first sessions can still be omitted from codex resume when preview metadata stays empty

1 participant