YBX.

Agents · · 简体中文

Codex CLI resume: how to find the right session across projects

Use codex resume --last inside the original project. If the session is missing or multiple projects are active, use the cross-directory picker or the session ID.

Choose the command by what you know

If you know the repository and want its latest session, change to that working directory and run codex resume --last. If you only remember the task, run codex resume --all and choose the entry by its directory and description. If a handoff already contains the session ID, run codex resume followed by that ID.

Why the last session can be surprising

Consider two checkouts, billing and docs. You last used Codex in docs, then switched to billing in the terminal. From billing, --last selects the most recent session in the current directory. Adding --all to --last broadens the selection across directories and skips the picker. Use --all alone when you want to inspect the choices first.

Check the interface before resuming work

We checked codex resume --help on codex-cli 0.167.0. Its help exposes the picker, session identifier and directory-filter options. The two-project case above illustrates the documented behavior; we did not reopen private sessions. Before asking for an edit, check the working directory and Git branch, especially when two worktrees belong to the same repository.

Sources

Related reading