Understand how agentscript normalizes Claude Code and Codex JSONL into stable renderable blocks.

Stable blocks

agentscript parses Claude Code and Codex sessions into one stream of renderable blocks:

#000 user
#001 thinking
#002 assistant
#003 command Bash
#004 command_result Bash
#005 tool_call Edit
#006 tool_result Edit

Indexes are assigned before filtering. This means --hide-thinking may show gaps, but the visible blocks still keep their original indexes.

Why this matters

Stable indexes make long transcript surgery easy. For example, if a session changed tasks around block 100, preserve the earlier context with:

agentscript slice transcript.jsonl 0:100 --format md --out old-context.md

Then inspect the new task separately:

agentscript slice transcript.jsonl 100:

Commands and tools

Shell commands are separated from generic tool calls so they can be hidden independently:

agentscript open transcript.jsonl --hide-commands
agentscript open transcript.jsonl --hide-tools

Tool and command results can be hidden while keeping the calls visible:

agentscript open transcript.jsonl --hide-tool-results