codex-show-next-model-input
v0.3.0
Published
Preview the next model-visible request for an existing Codex session.
Readme
codex-show-next-model-input
Preview the next model-visible request for an existing local Codex session, including its reconstructed conversation history.
Run without arguments to see usage and the ten most recent local session IDs:
npx codex-show-next-model-inputnpx codex-show-next-model-input <SESSION_ID> "<PROMPT>" > /tmp/model-input.jsonOr open a local visual inspector with three linked overview lenses, a searchable timeline, and a lossless Raw JSON view:
npx codex-show-next-model-input --open <SESSION_ID> "<PROMPT>"The viewer listens only on 127.0.0.1, uses a random URL, and keeps running until you press
Ctrl+C. It does not upload the captured request or load external assets.
The Overview includes an explanation of how the request is assembled, an input-order Request Map, and a byte-weighted Context Atlas. Byte size is not a token estimate.
The tool automatically reads the session's original cwd, creates an ephemeral read-only fork,
captures the first inference_started payload, stops Codex, and removes the temporary trace.
The original session is not resumed or modified.
Requirements: Node.js 20+, Codex CLI 0.152.0+, and a local saved session.
The capture sends one real model request and may incur usage. Output can contain prompts, source code, tool results, paths, and secrets. Keep it out of Git and do not share it without review.
