Skip to content

Codex Capture

sivtr copy codex reads Codex rollout JSONL files from ~/.codex/sessions. By default it chooses the newest session whose cwd matches the current working directory.

This is useful when you want to reuse the last answer, input, tool output, or whole parsed session without opening the Codex transcript manually.

Terminal window
sivtr copy codex

The default copies the last completed user plus assistant turn.

Terminal window
sivtr copy codex out
sivtr copy codex in
sivtr copy codex tool
sivtr copy codex all
CommandCopies
sivtr copy codexLast user plus assistant turn
sivtr copy codex outLast assistant reply
sivtr copy codex inLast user message
sivtr copy codex toolLast tool output
sivtr copy codex allWhole parsed session

Selectors work the same way as command-block copy:

Terminal window
sivtr copy codex 2
sivtr copy codex 2..4
sivtr copy codex out 3

1 means the newest matching Codex unit, 2 means the second newest, and so on.

Terminal window
sivtr copy codex tool --regex error
sivtr copy codex all --lines 1:40

Use --print to inspect the copied text:

Terminal window
sivtr copy codex out --print
Terminal window
sivtr copy codex --pick
sivtr copy codex out --pick

The picker shows recent units and lets you choose one or more. Press t to open the Vim-style view. In Codex views, T toggles tool content when an alternate full view is available.

On Windows, the hotkey daemon opens the Codex picker for the project directory where it was started:

Terminal window
sivtr hotkey start

The default chord is alt+y. Configure it in [hotkey] or pass --chord when starting.