{
  "representation": "redacted structure view; omitted strings are not training payloads",
  "archive": {
    "schemaVersion": 6,
    "id": "inventory-case",
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "Bash",
          "parameters": {
            "type": "object",
            "properties": {
              "command": {
                "type": "string"
              },
              "timeout": {
                "type": "number"
              },
              "description": {
                "type": "string"
              },
              "run_in_background": {
                "type": "boolean"
              }
            },
            "required": [
              "command"
            ]
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "Read",
          "parameters": {
            "type": "object",
            "properties": {
              "file_path": {
                "type": "string"
              },
              "thumbnail_size": {
                "type": "string"
              },
              "offset": {
                "type": "integer"
              },
              "limit": {
                "type": "integer"
              }
            },
            "required": [
              "file_path"
            ]
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "Write",
          "parameters": {
            "type": "object",
            "properties": {
              "file_path": {
                "type": "string"
              },
              "content": {
                "type": "string"
              }
            },
            "required": [
              "file_path",
              "content"
            ]
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "Edit",
          "parameters": {
            "type": "object",
            "properties": {
              "file_path": {
                "type": "string"
              },
              "old_string": {
                "type": "string"
              },
              "new_string": {
                "type": "string"
              },
              "replace_all": {
                "type": "boolean"
              }
            },
            "required": [
              "file_path",
              "old_string",
              "new_string"
            ]
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "present_files",
          "parameters": {
            "type": "object",
            "properties": {
              "artifacts": {
                "type": "array"
              }
            },
            "required": [
              "artifacts"
            ]
          }
        }
      }
    ],
    "messages": [
      {
        "role": "system",
        "content": "[omitted]"
      },
      {
        "role": "system",
        "content": "[omitted]"
      },
      {
        "role": "system",
        "content": "[omitted]"
      },
      {
        "role": "user",
        "content": "[omitted]"
      },
      {
        "role": "user",
        "content": "[omitted]"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_01",
            "type": "function",
            "function": {
              "name": "Read",
              "arguments": "{\"file_path\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_01"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_02",
            "type": "function",
            "function": {
              "name": "Read",
              "arguments": "{\"file_path\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_02"
      },
      {
        "role": "user",
        "content": "[omitted]"
      },
      {
        "role": "assistant",
        "content": "[omitted]",
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_03",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_03"
      },
      {
        "role": "assistant",
        "content": "[omitted]",
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_04",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_04"
      },
      {
        "role": "user",
        "content": "[omitted]"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_05",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_05"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_06",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_06"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_07",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_07"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_08",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_08"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_09",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_09"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_10",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_10"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_11",
            "type": "function",
            "function": {
              "name": "Bash",
              "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": [
          {
            "type": "text",
            "text": "[omitted]",
            "resource": null
          }
        ],
        "tool_call_id": "call_11"
      },
      {
        "role": "assistant",
        "content": null,
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": [
          {
            "id": "call_12",
            "type": "function",
            "function": {
              "name": "present_files",
              "arguments": "{\"artifacts\":[{\"source\":\"[omitted]\",\"name\":\"[omitted]\"}]}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "content": "[omitted]",
        "tool_call_id": "call_12"
      },
      {
        "role": "assistant",
        "content": "[omitted]",
        "reasoning_content": "[original reasoning omitted]",
        "tool_calls": []
      }
    ],
    "modelTurns": [
      {
        "round": 1,
        "inputMessageCount": 5,
        "assistantMessageIndex": 5,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_01"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 2,
        "inputMessageCount": 7,
        "assistantMessageIndex": 7,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_02"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 3,
        "inputMessageCount": 10,
        "assistantMessageIndex": 10,
        "reasoningStatus": "returned",
        "replyStatus": "returned",
        "toolCallIds": [
          "call_03"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 4,
        "inputMessageCount": 12,
        "assistantMessageIndex": 12,
        "reasoningStatus": "returned",
        "replyStatus": "returned",
        "toolCallIds": [
          "call_04"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 5,
        "inputMessageCount": 15,
        "assistantMessageIndex": 15,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_05"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 6,
        "inputMessageCount": 17,
        "assistantMessageIndex": 17,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_06"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 7,
        "inputMessageCount": 19,
        "assistantMessageIndex": 19,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_07"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 8,
        "inputMessageCount": 21,
        "assistantMessageIndex": 21,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_08"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 9,
        "inputMessageCount": 23,
        "assistantMessageIndex": 23,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_09"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 10,
        "inputMessageCount": 25,
        "assistantMessageIndex": 25,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_10"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 11,
        "inputMessageCount": 27,
        "assistantMessageIndex": 27,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_11"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 12,
        "inputMessageCount": 29,
        "assistantMessageIndex": 29,
        "reasoningStatus": "returned",
        "replyStatus": "not_returned",
        "toolCallIds": [
          "call_12"
        ],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      },
      {
        "round": 13,
        "inputMessageCount": 31,
        "assistantMessageIndex": 31,
        "reasoningStatus": "returned",
        "replyStatus": "returned",
        "toolCallIds": [],
        "responsePath": "[response archive path]",
        "wireDir": "[wire archive directory]"
      }
    ],
    "rounds": 13,
    "commands": 9,
    "failedCommands": 0,
    "generationAttempts": 15,
    "executedCommandsIncludingDiscarded": 11,
    "completed": true
  },
  "messageLabels": {
    "0": "ThinkSP",
    "1": "FunctionSP",
    "2": "MainSP",
    "3": "Harness reminder",
    "4": "User query",
    "9": "Correction before T3",
    "14": "Correction before T5"
  },
  "failedAttempts": [
    3,
    6
  ],
  "replay": "/writing/coding-agent-trajectories/#case-format",
  "example": {
    "round": 10,
    "assistantMessageIndex": 25,
    "callId": "call_10",
    "command": "lark-cli base +record-list --base-token \"<base>\" --table-id \"<products>\" --as user",
    "result": {
      "count": 6,
      "has_more": false,
      "product": "Fishing Lure Minnow 110mm",
      "units": 1260,
      "cartons": 42
    },
    "nextRound": 11,
    "nextAssistantMessageIndex": 27
  },
  "trainingMapping": {
    "arkTargetExample": {
      "messages": [
        {
          "role": "system",
          "content": "[omitted]"
        },
        {
          "role": "system",
          "content": "[omitted]"
        },
        {
          "role": "system",
          "content": "[omitted]"
        },
        {
          "role": "user",
          "content": "[omitted]"
        },
        {
          "role": "user",
          "content": "[omitted]"
        },
        {
          "role": "assistant",
          "content": "",
          "tool_calls": [
            {
              "id": "call_01",
              "type": "function",
              "function": {
                "name": "Read",
                "arguments": "{\"file_path\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_01"
        },
        {
          "role": "assistant",
          "content": "",
          "tool_calls": [
            {
              "id": "call_02",
              "type": "function",
              "function": {
                "name": "Read",
                "arguments": "{\"file_path\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_02"
        },
        {
          "role": "user",
          "content": "[omitted]"
        },
        {
          "role": "assistant",
          "content": "[omitted]",
          "tool_calls": [
            {
              "id": "call_03",
              "type": "function",
              "function": {
                "name": "Bash",
                "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_03"
        },
        {
          "role": "assistant",
          "content": "[omitted]",
          "tool_calls": [
            {
              "id": "call_04",
              "type": "function",
              "function": {
                "name": "Bash",
                "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_04"
        },
        {
          "role": "user",
          "content": "[omitted]"
        },
        {
          "role": "assistant",
          "content": "",
          "tool_calls": [
            {
              "id": "call_05",
              "type": "function",
              "function": {
                "name": "Bash",
                "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_05"
        },
        {
          "role": "assistant",
          "content": "",
          "tool_calls": [
            {
              "id": "call_06",
              "type": "function",
              "function": {
                "name": "Bash",
                "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_06"
        },
        {
          "role": "assistant",
          "content": "",
          "tool_calls": [
            {
              "id": "call_07",
              "type": "function",
              "function": {
                "name": "Bash",
                "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_07"
        },
        {
          "role": "assistant",
          "content": "",
          "tool_calls": [
            {
              "id": "call_08",
              "type": "function",
              "function": {
                "name": "Bash",
                "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_08"
        },
        {
          "role": "assistant",
          "content": "",
          "tool_calls": [
            {
              "id": "call_09",
              "type": "function",
              "function": {
                "name": "Bash",
                "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 0
        },
        {
          "role": "tool",
          "content": "[omitted]",
          "tool_call_id": "call_09"
        },
        {
          "role": "assistant",
          "content": "",
          "reasoning_content": "[original reasoning omitted]",
          "tool_calls": [
            {
              "id": "call_10",
              "type": "function",
              "function": {
                "name": "Bash",
                "arguments": "{\"command\":\"[omitted]\",\"description\":\"[omitted]\"}"
              }
            }
          ],
          "loss_weight": 1
        }
      ],
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "Bash",
            "parameters": {
              "type": "object",
              "properties": {
                "command": {
                  "type": "string"
                },
                "timeout": {
                  "type": "number"
                },
                "description": {
                  "type": "string"
                },
                "run_in_background": {
                  "type": "boolean"
                }
              },
              "required": [
                "command"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "Read",
            "parameters": {
              "type": "object",
              "properties": {
                "file_path": {
                  "type": "string"
                },
                "thumbnail_size": {
                  "type": "string"
                },
                "offset": {
                  "type": "integer"
                },
                "limit": {
                  "type": "integer"
                }
              },
              "required": [
                "file_path"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "Write",
            "parameters": {
              "type": "object",
              "properties": {
                "file_path": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                }
              },
              "required": [
                "file_path",
                "content"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "Edit",
            "parameters": {
              "type": "object",
              "properties": {
                "file_path": {
                  "type": "string"
                },
                "old_string": {
                  "type": "string"
                },
                "new_string": {
                  "type": "string"
                },
                "replace_all": {
                  "type": "boolean"
                }
              },
              "required": [
                "file_path",
                "old_string",
                "new_string"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "present_files",
            "parameters": {
              "type": "object",
              "properties": {
                "artifacts": {
                  "type": "array"
                }
              },
              "required": [
                "artifacts"
              ]
            }
          }
        }
      ]
    },
    "assistantSegmentSkeleton": [
      {
        "type": "special_token",
        "text": "[CLS]",
        "has_loss": 0
      },
      {
        "type": "special_token",
        "text": "assistant\n",
        "has_loss": 0
      },
      {
        "type": "text",
        "text": "[serialized original reasoning] + [original text] + [XML65 tool call]",
        "has_loss": 1
      },
      {
        "type": "special_token",
        "text": "[EOS]",
        "has_loss": 1
      }
    ]
  }
}
