Skip to content

/goal-first sessions are missing from resume lists #20792

Closed

Description

@pauloportella

What issue are you seeing?

If a new session starts by creating a goal with /goal, the thread can still be resumed by id, but it does not show up in the normal session lists.

The session history exists after the goal is created, including normal assistant messages, and the thread can be opened by id. But list-based discovery does not show it.

Observed:

  • codex resume <thread_id> opens the session.
  • The resumed session contains the later assistant messages.
  • codex resume does not list the same session.
  • Codex Desktop recents for the same workspace also do not show it, even though nearby sessions that started with a normal user message do appear there.
  • Sessions in the same workspace that start with a normal user message do show up in Desktop recents and in codex resume.
  • A session that starts with a normal user message and uses /goal later also shows up.

What steps can reproduce the bug?

  1. Start a new Codex session in a workspace.

  2. Make the first interaction /goal and create a goal.

  3. Let Codex respond with normal assistant messages.

  4. Try to resume by id:

    codex resume <thread_id>

    This works, and the later assistant messages are present.

  5. Try to find it through the picker:

    codex resume

    The session is missing.

  6. Check Codex Desktop recents for the same workspace.

    The session is missing there too, while nearby sessions that began with normal user messages are listed.

Control case: start a new session with a normal text message first, then use /goal later. That session appears normally.

What is the expected behavior?

A valid thread should be listed even when the first interaction is /goal.

If there is no first normal user message, Codex should use the goal objective, the first assistant message, or a fallback title so the thread remains discoverable.

Additional information

Platform observed on:

Darwin 25.5.0 arm64 arm

I searched for existing reports around goal, resume picker, first_user_message, and missing Desktop recents. The closest issues I found were broader session-listing bugs (#14370, #16095, #16515, #18993), but I did not find this specific /goal-first repro.

Activity

  1. added
    bug
    CLI
    app
    session
    on May 2, 2026
  2. github-actions commented on May 2, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. etraut-openai commented on May 2, 2026

    @etraut-openai
    Contributor

    Are you using the CLI (TUI) or the app?

    The goal feature is still under development and hasn't yet been exposed as an experimental feature. There is no support for it yet in the desktop app.

  4. added
    TUI
    and removed
    CLI
    app
    session
    on May 2, 2026
  5. pauloportella commented on May 2, 2026

    @pauloportella
    Author

    cli

  6. pauloportella commented on May 2, 2026

    @pauloportella
    Author

    simple test, start a session and your first message should have /goal hey test

    if you close codex cli, and run codex resume that session is not listed

  7. etraut-openai commented on May 2, 2026

    @etraut-openai
    Contributor

    Thanks, I'm able to repro and understand the problem. Posted a PR to fix.

  8. pauloportella commented on May 2, 2026

    @pauloportella
    Author

    Thank you

  9. added a commit that references this issue on May 11, 2026
    f10ddc3
  10. etraut-openai commented on May 11, 2026

    @etraut-openai
    Contributor

    This will be addressed in the next release. It may not fix existing sessions that started with /goal, but it will fix the problem for all new sessions that are created this way.

  11. added a commit that references this issue on May 13, 2026
    e1afafb
  12. iFurySt commented on May 13, 2026

    @iFurySt

    Thanks for the fix here. One related question: should this same fix also cover prompt recall/history for /goal-first sessions?

    The case I am seeing is that after starting a session with /goal ... and exiting, the session is not discoverable via codex resume; as a result, there is also no obvious way to get back to that original /goal ... query from history/recall. Is that considered part of this same /goal-first session metadata issue, or should prompt recall for /goal ... be tracked separately?

  13. etraut-openai commented on May 13, 2026

    @etraut-openai
    Contributor

    @iFurySt, that's a separate fix, but it's already in place. It will be included in 0.131.0.

  14. added 2 commits that reference this issue on May 15, 2026
    ca22089
    e83ac63
  15. favoyang commented on Jun 15, 2026

    @favoyang

    v0.139.0, starting session with /goal, still missing in the resume list.

  16. etraut-openai commented on Jun 15, 2026

    @etraut-openai
    Contributor

    @favoyang, this bug was fixed several versions ago. I'm no longer able to repro it. If you're still seeing a related issue, please open a new bug report with clear repro steps and additional details requested in the bug report template.

  17. favoyang commented on Jun 15, 2026

    @favoyang

    Opened a new issue with the confirmed v0.139.0/current-main reproduction and code-path analysis: #28263

  18. added a commit that references this issue on Jun 27, 2026
    4dbcb43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions