openai / openai/codex

History does not remember file paths that convert to [Image #1] across restarts

Open
#38,488 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI session TUI
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

codex-cli 0.147.0

What subscription do you have?

Pro

Which model were you using?

GPT-5.6

What platform is your computer?

Linux

What terminal emulator and version are you using (if applicable)?

No response

Codex doctor report

What issue are you seeing?

If you restart the CLI, and go up through your history using the up arrow key, the [image #1] links are actually just the text "[image #1]" and dont represent the underlying filepath you pasted.

Furthermore, copy/paste of them also loses the actual filepath.

Also, alt+r (raw mode) does not show the actual filepath.

What steps can reproduce the bug?

Paste an image, restart codex, and get back your previous message using up arrow key.

What is the expected behavior?

It should preserve the underlying filepath for copy/paste, or for repeating messages. It should show the real filepath instead of [image #1] when in raw mode.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by pasting an image, restarting Codex CLI, and retrieving the message with the up arrow; also check copy/paste and alt+r raw mode. Trace the CLI history persistence and image-placeholder handling, then verify that the filepath survives restarts, copy/paste, message repetition, and raw mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.