history Command for Session Navigation

Open 💬 1 comment Opened Aug 4, 2026 by RoroKao-ASUS
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

When a Codex session becomes long, it's difficult to find a previous question and its corresponding answer because users have to scroll through a large amount of conversation history.

I would like a /history command that lists all prompts in the current session.

Example:

/history
  1. Explain BatteryDiffData
  2. Why is collectAsStateWithLifecycle needed?
  3. Segment Tree lazy propagation
  4. Room migration best practices
  5. Android Settings SearchIndexProvider

...

Selecting an item would jump directly to that prompt and its corresponding assistant response.

Example:

/history

Select: 3

Output:

User:
Segment Tree lazy propagation

Assistant:
...

Benefits:

Quickly revisit previous discussions without scrolling.
Makes long coding sessions much easier to navigate.
Similar to shell history, but for prompts within the current session.
Lightweight and CLI-friendly compared to a full conversation search.

Possible future enhancements:

/history battery
/history room
/history --grep migration
Fuzzy search within the current session.
Display timestamps and message numbers.

Additional information

_No response_

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 24 days ago

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

  • #35975
  • #36739

Powered by Codex Action