{
  "scenario": "bad-error-in-200",
  "expectFaults": false,
  "violations": [],
  "warnings": [],
  "stats": {
    "total": 28,
    "types": {
      "connected": 1,
      "session.created": 1,
      "chat.user_message": 1,
      "chat.event": 3,
      "session.stream": 20,
      "chat.message": 1,
      "chat.response": 1
    },
    "streamFrames": {
      "thinking.chunk": 4,
      "inference.chunk": 15,
      "done": 1
    },
    "sessions": 1
  },
  "events": [
    {
      "type": "connected",
      "timestamp": 1783816032773,
      "_rxAt": 1783816032774,
      "_seq": 0
    },
    {
      "type": "session.created",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "event": {
        "mode": "chat",
        "parentSessionId": null,
        "instanceName": null,
        "timestamp": 1783816033020
      },
      "_rxAt": 1783816033021,
      "_seq": 1
    },
    {
      "type": "chat.user_message",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "event": {
        "content": "Introduce yourself briefly — who are you and what can you do?",
        "timestamp": 1783816033023
      },
      "_rxAt": 1783816033023,
      "_seq": 2
    },
    {
      "type": "chat.event",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "event": {
        "type": "iteration.start",
        "iteration": 1,
        "tokensSoFar": 0,
        "timestamp": 1783816033027
      },
      "_rxAt": 1783816033028,
      "_seq": 3
    },
    {
      "type": "chat.event",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "event": {
        "type": "llm.error",
        "error": "LLM provider error in 200 body: {\"message\":\"fake-api injected error-in-200 body\",\"code\":502}",
        "iteration": 1,
        "attempt": 1,
        "details": {
          "phase": "inference",
          "iteration": 1
        },
        "timestamp": 1783816033103
      },
      "_rxAt": 1783816033104,
      "_seq": 4
    },
    {
      "type": "chat.event",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "event": {
        "type": "iteration.start",
        "iteration": 2,
        "tokensSoFar": 0,
        "timestamp": 1783816034104
      },
      "_rxAt": 1783816034105,
      "_seq": 5
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "thinking.chunk",
      "data": {
        "content": "The user is asking me to introduce myself briefly."
      },
      "_rxAt": 1783816034112,
      "_seq": 6
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "thinking.chunk",
      "data": {
        "content": " I should explain who I am (Helper) and what I can"
      },
      "_rxAt": 1783816034115,
      "_seq": 7
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "thinking.chunk",
      "data": {
        "content": " do. Let me keep it concise and friendly as per "
      },
      "_rxAt": 1783816034120,
      "_seq": 8
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "thinking.chunk",
      "data": {
        "content": "my instructions."
      },
      "_rxAt": 1783816034124,
      "_seq": 9
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": "I'm **Helper**, a friendly"
      },
      "_rxAt": 1783816034128,
      "_seq": 10
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " AI assistant here to help"
      },
      "_rxAt": 1783816034132,
      "_seq": 11
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " you with a variety of tasks."
      },
      "_rxAt": 1783816034137,
      "_seq": 12
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": "\n\nI can:\n- **Answer questions**"
      },
      "_rxAt": 1783816034141,
      "_seq": 13
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " and explain concepts\n- "
      },
      "_rxAt": 1783816034146,
      "_seq": 14
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": "**Write and edit code** "
      },
      "_rxAt": 1783816034150,
      "_seq": 15
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": "in many languages\n- **Analyze"
      },
      "_rxAt": 1783816034155,
      "_seq": 16
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " files** and documents you"
      },
      "_rxAt": 1783816034158,
      "_seq": 17
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " share\n- **Search the web**"
      },
      "_rxAt": 1783816034162,
      "_seq": 18
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " for current information"
      },
      "_rxAt": 1783816034167,
      "_seq": 19
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": "\n- **Run shell commands**"
      },
      "_rxAt": 1783816034171,
      "_seq": 20
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " and manage files\n- **Spawn"
      },
      "_rxAt": 1783816034175,
      "_seq": 21
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " specialized sub-agents**"
      },
      "_rxAt": 1783816034179,
      "_seq": 22
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " for complex tasks\n\nJust"
      },
      "_rxAt": 1783816034184,
      "_seq": 23
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "inference.chunk",
      "data": {
        "content": " tell me what you need!"
      },
      "_rxAt": 1783816034188,
      "_seq": 24
    },
    {
      "type": "chat.message",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "event": {
        "id": 2,
        "session_id": "sess_bebbfc812bdf3598",
        "role": "assistant",
        "content": "I'm **Helper**, a friendly AI assistant here to help you with a variety of tasks.\n\nI can:\n- **Answer questions** and explain concepts\n- **Write and edit code** in many languages\n- **Analyze files** and documents you share\n- **Search the web** for current information\n- **Run shell commands** and manage files\n- **Spawn specialized sub-agents** for complex tasks\n\nJust tell me what you need!",
        "tool_calls": null,
        "tool_call_id": null,
        "thinking_content": "The user is asking me to introduce myself briefly. I should explain who I am (Helper) and what I can do. Let me keep it concise and friendly as per my instructions.",
        "thinking_tokens": 37,
        "created_at": "2026-07-12T00:27:14.193Z",
        "finishReason": "stop",
        "iteration": 2,
        "tokenUsage": {
          "input": 3382,
          "output": 128,
          "cache": 0,
          "cost": 0.0019574082
        },
        "timestamp": 1783816034193
      },
      "_rxAt": 1783816034194,
      "_seq": 25
    },
    {
      "type": "chat.response",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "event": {
        "content": "I'm **Helper**, a friendly AI assistant here to help you with a variety of tasks.\n\nI can:\n- **Answer questions** and explain concepts\n- **Write and edit code** in many languages\n- **Analyze files** and documents you share\n- **Search the web** for current information\n- **Run shell commands** and manage files\n- **Spawn specialized sub-agents** for complex tasks\n\nJust tell me what you need!",
        "toolCount": 0,
        "timestamp": 1783816034194
      },
      "_rxAt": 1783816034194,
      "_seq": 26
    },
    {
      "type": "session.stream",
      "sessionId": "sess_bebbfc812bdf3598",
      "agentName": "helper",
      "eventType": "done",
      "data": {
        "session": {
          "id": "sess_bebbfc812bdf3598",
          "agent_name": "helper",
          "mode": "chat",
          "instance_folder": "/home/ixi/khacloud/drive/Plugins/VeilCli/test/advanced-test-projects/bad-error-in-200",
          "status": "active",
          "model": "moonshotai/kimi-k2.5",
          "title": null,
          "message_count": 2,
          "total_input_tokens": 3382,
          "total_output_tokens": 128,
          "total_cache_tokens": 0,
          "context_size": 3510,
          "context_size_limit": 262144,
          "cost": 0.0019574082,
          "compaction_count": 0,
          "created_at": "2026-07-12T00:27:13.016Z",
          "updated_at": "2026-07-12T00:27:14.193Z",
          "model_thinking": null,
          "compact_summary": null,
          "compact_size": 0,
          "compact_count": 50,
          "compact_auto_threshold": null,
          "compact_enabled": 1,
          "compact_model": "default",
          "compact_custom_instructions": null,
          "temperature": null,
          "max_tokens": null,
          "reasoning": "{\"effort\":\"low\"}",
          "parent_session_id": null,
          "instance_name": null,
          "objective": null,
          "success_criteria": null,
          "token_budget": null,
          "max_wall_seconds": null,
          "max_spawn_depth": null,
          "spawn_depth": 0,
          "trace_id": "trace_ab4fc1ab5611153e",
          "claude_session_id": null,
          "effort": null
        },
        "agentName": "helper",
        "model": "moonshotai/kimi-k2.5",
        "iterations": 2,
        "durationMs": 1171,
        "tokenUsage": {
          "input": 3382,
          "output": 128,
          "cache": 0,
          "cost": 0.0019574082
        },
        "toolCalls": [],
        "cancelled": false
      },
      "_rxAt": 1783816034194,
      "_seq": 27
    }
  ]
}