addedInput schema / properties / agent
Added value: +{
+ "default": "claude",
+ "description": "Which agent's session store to target: \"claude\" (default) or \"codex\".",
+ "enum": [
+ "claude",
+ "codex"
+ ],
+ "type": "string"
+}
addedInput schema / properties / breakdown
Added value: +{
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "enum": [
+ "summary",
+ "deep"
+ ],
+ "type": "string"
+ }
+ ],
+ "default": false,
+ "description": "Include the per-tool/resource breakdown of what was flattened. false, true, or \"summary\" = the aggregated adaptive rows plus byKind/bySlot groupings; \"deep\" ALSO lists every individual block under its row (tool + arg summary + bytes + per-block token estimate), groups sorted by context tokens then blocks by bytes. Dry runs always include at least the summary; set true/\"summary\"/\"deep\" to also get it on a real flatten."
+}
changedInput schema / properties / claude_dir / description
Previous value: -"Absolute path (or ~/...) to the Claude config dir whose sessions to target — the dir holding projects/. Default: $CLAUDE_CONFIG_DIR if set, else ~/.claude."New value: +"Absolute path (or ~/...) to the Claude config dir whose sessions to target — the dir holding projects/. Default: $CLAUDE_CONFIG_DIR if set, else ~/.claude. Applies to agent \"claude\" only."
addedInput schema / properties / codex_home
Added value: +{
+ "description": "Absolute path (or ~/...) to the Codex home whose sessions to target — the dir holding sessions/. Default: $CODEX_HOME if set, else ~/.codex. Applies to agent \"codex\" only.",
+ "type": "string"
+}
changedInput schema / properties / project_dir / description
Previous value: -"Absolute path to project. Default: the project the CLI runs in (cwd)"New value: +"Absolute path to project. Default: the project the CLI runs in (cwd). Under codex, scopes \"last\"/\"last N\"/keyword to rollouts whose cwd equals this dir."
changedInput schema / properties / session_id / description
Previous value: -"Session UUID, \"last\", \"last N\", or \"current\". Omit to flatten the current live session."New value: +"Session UUID, \"last\", \"last N\", or \"current\". Omit to flatten the current live session (claude); under codex \"current\" falls back to \"last\"."
addedOutput schema / properties / sessions / items / properties / breakdown
Added value: +{
+ "additionalProperties": false,
+ "description": "X-ray of what was flattened: adaptive tool/resource rows plus byKind and bySlot groupings, each with the bytes and context tokens freed. Present on every dry run with at least one qualifying block, and on a real flatten only when breakdown=true. contextTokens are exact when tokensExact (per-group count_tokens, requiring the FLATTEN_COUNT_EXACT=1 + ANTHROPIC_API_KEY opt-in), otherwise a local estimate; they are always 0 for the toolUseResult slot (the mirror is disk-only and never in model context).",
+ "properties": {
+ "byKind": {
+ "description": "Grouped by block kind.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "bytes": {
+ "description": "Disk bytes this group frees.",
+ "type": "number"
+ },
+ "contextTokens": {
+ "description": "Context tokens this group frees — exact when tokensExact, else estimated; 0 for toolUseResult-slot blocks.",
+ "type": "number"
+ },
+ "count": {
+ "description": "How many blocks this group holds.",
+ "type": "number"
+ },
+ "key": {
+ "description": "Block kind: \"text\", \"image\", or \"mixed\" (the group key).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "key",
+ "count",
+ "bytes",
+ "contextTokens"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "bySlot": {
+ "description": "Grouped by storage slot.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "bytes": {
+ "description": "Disk bytes this group frees.",
+ "type": "number"
+ },
+ "contextTokens": {
+ "description": "Context tokens this group frees — the full contextTokensSaved on the content row, 0 on the disk-only toolUseResult row.",
+ "type": "number"
+ },
+ "count": {
+ "description": "How many blocks this group holds.",
+ "type": "number"
+ },
+ "key": {
+ "description": "Slot: \"content\" (message.content, in model context) or \"toolUseResult\" (the disk-only mirror).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "key",
+ "count",
+ "bytes",
+ "contextTokens"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "rows": {
+ "description": "Adaptive tool/resource rows: MCP tools collapse per server, heavyweight resources get their own row, and the light tail folds into a single \"other\" row (at most 9 rows). Partitions the flattened blocks exactly. In deep mode each row also carries its individual blocks in .entries.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "bytes": {
+ "description": "Disk bytes this row frees.",
+ "type": "number"
+ },
+ "contextTokens": {
+ "description": "Context tokens this row frees — exact when tokensExact, else estimated; 0 for toolUseResult-slot blocks.",
+ "type": "number"
+ },
+ "count": {
+ "description": "How many blocks this row holds.",
+ "type": "number"
+ },
+ "entries": {
+ "description": "Deep mode only (breakdown=\"deep\"): the individual blocks this row aggregates, sorted by bytes desc — the per-command attribution. Absent in summary mode.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "args": {
+ "description": "Short arg summary (command=…, file_path=…); \"\" when none.",
+ "type": "string"
+ },
+ "bytes": {
+ "description": "Disk bytes this block frees.",
+ "type": "number"
+ },
+ "contextTokens": {
+ "description": "Per-block net context-token estimate (local; never reconciled to the exact per-group total).",
+ "type": "number"
+ },
+ "kind": {
+ "description": "\"text\", \"image\", or \"mixed\".",
+ "type": "string"
+ },
+ "lineCount": {
+ "description": "Line count of the block's text projection.",
+ "type": "number"
+ },
+ "name": {
+ "description": "Originating tool name of this block.",
+ "type": "string"
+ },
+ "slot": {
+ "description": "\"content\" (in model context) or \"toolUseResult\" (disk-only mirror, 0 context tokens).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "args",
+ "bytes",
+ "kind",
+ "slot",
+ "contextTokens",
+ "lineCount"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "key": {
+ "description": "Row key: a tool family (\"<server> (MCP)\" for MCP tools, else the built-in tool name), or \"other\" for the tail-collapsed row.",
+ "type": "string"
+ },
+ "resource": {
+ "description": "Present only on a resource-promoted row: the raw file_path/path/url value that earned this tool family its own line.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "key",
+ "count",
+ "bytes",
+ "contextTokens"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "tokensExact": {
+ "description": "True when the rows' contextTokens are exact (per-group count_tokens), false when locally estimated.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "tokensExact",
+ "rows",
+ "byKind",
+ "bySlot"
+ ],
+ "type": "object"
+}
changedOutput schema / properties / sessions / items / properties / entries / description
Previous value: -"One row per flattened block (id, originating tool name, size, kind, and slot)."New value: +"One row per flattened block — id, originating tool name, arg summary, size, kind, slot, per-block token estimate, and line count. The machine-readable per-command attribution the breakdown aggregates."
addedOutput schema / properties / sessions / items / properties / entries / items / properties / args
Added value: +{
+ "description": "Short arg summary of the originating call (e.g. command=…, file_path=…), same grammar as the marker; \"\" when none.",
+ "type": "string"
+}
addedOutput schema / properties / sessions / items / properties / entries / items / properties / contextTokens
Added value: +{
+ "description": "Per-block net context-token estimate (local; not reconciled to the exact per-group total).",
+ "type": "number"
+}
addedOutput schema / properties / sessions / items / properties / entries / items / properties / lineCount
Added value: +{
+ "description": "Line count of the block's text projection.",
+ "type": "number"
+}
changedOutput schema / properties / sessions / items / properties / entries / items / required
Previous value: -[
- "id",
- "name",
- "size",
- "kind",
- "slot"
-]New value: +[
+ "id",
+ "name",
+ "args",
+ "size",
+ "kind",
+ "slot",
+ "contextTokens",
+ "lineCount"
+]