{
  "schema_version": 1,
  "run_id": "BlackBadHope--agent-token-forensics-gpt-6-luna-1796392145541652294",
  "date": "2026-12-04T13:52:30.392234+00:00",
  "repo": "BlackBadHope/agent-token-forensics",
  "model": "gpt-6-luna",
  "kind": "mcp",
  "mcp": "local",
  "commit": "427bfb5fe076162ebc6f74e5467a6feedbb65180",
  "outcome": "pass",
  "time_to_working_s": 165.72267923501204,
  "install_s": 28.353,
  "first_use_s": 71.645,
  "stuck_step": null,
  "what_failed": null,
  "suggested_fix": null,
  "what_it_did": "Analyze a local JSONL transcript through the documented MCP analyze_transcripts tool; also run the documented CLI demo.",
  "needs": [],
  "needs_which": null,
  "missing": null,
  "claims": [
    {
      "kind": "claim",
      "claim": "Read-only offline JSONL forensics identifies prompt-cache and retry-loop behavior",
      "source": "I built `agent-token-forensics` after watching my own long coding-agent sessions report **97%+ prompt-cache hit rates** while still burning most of the budget on uncompacted context tails (`>80k` tokens), idle cache-TTL cliffs, and identical tool-retry loops.",
      "input": "{\"tool\": \"analyze_transcripts\", \"arguments\": {\"path\": \"<guest-path>\"}}",
      "expected": "one thousand total context tokens",
      "command": "<guest-path> -m agent_token_forensics.mcp_server --allow-root <guest-path> tools/call {\"tool\": \"analyze_transcripts\", \"arguments\": {\"path\": \"<guest-path>\"}}",
      "verdict": "yes",
      "outcome": "Real input produced the expected result: 1000",
      "evidence": "…1000,\\n      \\\"output_tokens\\\": 100,\\n      \\\"turns\\\": 1\\n    }\\n  },\\n  \\\"cache_bust_events\\\": [],\\n  \\\"cache_hit_ratio\\\": 0.0,\\n  \\\"cache_read_tokens\\\": 0,\\n  \\\"cache_write_tokens\\\": 0,\\n  \\\"compact_threshold\\\": 80000,\\n  \\\"compaction_inflection_points\\\": [],\\n  \\\"compaction_recommendations\\\": [],\\n  \\\"cost_summary\\\": {\\n    \\\"cache_hit_ratio\\\": 0.0,\\n    \\\"estimated_compaction_savings_pct\\\": 0.0,\\n    \\\"estimated_compaction_savings_usd\\\": 0.0,\\n    \\\"estimated_cost_usd\\\": 0.0045,\\n    \\\"total_context_tokens\\\": 1000\\n  },\\n  \\\"estimated_compaction_savings_pct\\\": 0.0,\\n  \\\"estimated_compactio",
      "cwd": "<guest-path>",
      "source_checked": true,
      "source_file": "README.md"
    }
  ],
  "example_checks": [
    {
      "kind": "example",
      "claim": "Preview sample output with the documented demo",
      "source": "README.md",
      "input": "built-in demo transcript",
      "command": "<guest-path> analyze --demo --json",
      "evidence": "lt-in-demo-session.jsonl>\",\n      \"repeats\": 4,\n      \"start_turn\": 3,\n      \"tools\": [\n        \"Bash\"\n      ]\n    }\n  ],\n  \"top_tools_by_tokens\": [\n    {\n      \"attributed_tokens\": 275050,\n      \"calls\": 4,\n      \"tool\": \"Bash\"\n    },\n    {\n      \"attributed_tokens\": 122500,\n      \"calls\": 2,\n      \"tool\": \"Edit\"\n    },\n    {\n      \"attributed_tokens\": 18100,\n      \"calls\": 1,\n      \"tool\": \"Read\"\n    }\n  ],\n  \"total_context_tokens\": 410300,\n  \"turns\": 7,\n  \"uncached_input_tokens\": 55700\n}\n[demo] Analyzing built-in sample transcript. Pass a JSONL path or run without --demo to scan local logs.",
      "deferred": false,
      "expected": "JSON analysis containing one cache bust and a retry loop",
      "hardware_prerequisite": null,
      "returncode": 0,
      "native_crash": false,
      "stdout": "nalyzed\": 1,\n  \"files_scanned\": 1,\n  \"output_tokens\": 5350,\n  \"retry_loops\": [\n    {\n      \"file\": \"<built-in-demo-session.jsonl>\",\n      \"repeats\": 4,\n      \"start_turn\": 3,\n      \"tools\": [\n        \"Bash\"\n      ]\n    }\n  ],\n  \"top_tools_by_tokens\": [\n    {\n      \"attributed_tokens\": 275050,\n      \"calls\": 4,\n      \"tool\": \"Bash\"\n    },\n    {\n      \"attributed_tokens\": 122500,\n      \"calls\": 2,\n      \"tool\": \"Edit\"\n    },\n    {\n      \"attributed_tokens\": 18100,\n      \"calls\": 1,\n      \"tool\": \"Read\"\n    }\n  ],\n  \"total_context_tokens\": 410300,\n  \"turns\": 7,\n  \"uncached_input_tokens\": 55700\n}\n",
      "stderr": "[demo] Analyzing built-in sample transcript. Pass a JSONL path or run without --demo to scan local logs.\n",
      "output_truncated": true,
      "verdict": "yes",
      "outcome": "command completed successfully"
    }
  ],
  "cycle_checks": [
    {
      "kind": "cycle",
      "claim": "Scheduled or looping main behavior",
      "source": "repository entry points",
      "input": "source inspection",
      "expected": "identify the product trigger",
      "verdict": "yes",
      "outcome": "Inspected CLI and MCP entrypoints (agent_token_forensics/cli.py and agent_token_forensics/mcp_server.py); each performs one analysis per invocation or MCP tools/call and has no scheduled job, webhook, repeating loop trigger, --once or --now cycle feature.",
      "evidence": "Inspected CLI and MCP entrypoints (agent_token_forensics/cli.py and agent_token_forensics/mcp_server.py); each performs one analysis per invocation or MCP tools/call and has no scheduled job, webhook, repeating loop trigger, --once or --now cycle feature.",
      "command": ""
    }
  ],
  "maintenance": {
    "archived": false,
    "ci_commit": "427bfb5fe076162ebc6f74e5467a6feedbb65180",
    "ci_read_at": "2026-12-04T13:48:06Z",
    "ci_state": "SUCCESS",
    "commits_90d": 24,
    "last_commit_at": "2026-12-03T00:39:03Z",
    "last_release_at": "2026-12-03T00:50:35Z",
    "median_reply_hours": null,
    "merged_prs_90d": 0,
    "note": "actively maintained: last commit 1 days ago; 24 commits and 0 merged PRs in 90 days; 0 open issues, 0 open PRs; latest release 2026-12-03",
    "open_issues": 0,
    "open_prs": 0,
    "reply_share": null,
    "reply_threads": 0,
    "verdict": "maintained"
  },
  "dependencies": [
    "Python 3.12.3 (README requires Python 3.10+)",
    "Python standard library only at runtime",
    "pip/setuptools build tooling"
  ],
  "local_or_hosted": "local",
  "readme_deviations": [],
  "safety": {
    "version": "z2x-1",
    "summary": "Nothing suspicious seen in this run.",
    "limitations": [
      "A short run cannot establish that code is safe.",
      "Connections show IP addresses; proxies can hide the final hostname.",
      "Tracing covers dispatched commands and their children, not the whole OS; guest root can interfere with tracing."
    ]
  },
  "observed": {
    "traced": true,
    "trace_truncated": false,
    "network_rule": true,
    "unsorted_contacts": false,
    "protocols_recorded": false,
    "lookups_recorded": true,
    "unsorted_blocked_ports": [],
    "contacts": [],
    "contacts_not_listed": 0,
    "lookups": [
      {
        "owner": "installer",
        "programs": [
          "git-remote-https"
        ],
        "names": [
          "github.com"
        ]
      },
      {
        "owner": "installer",
        "programs": [
          "python"
        ],
        "names": [
          "files.pythonhosted.org",
          "pypi.org"
        ]
      }
    ],
    "credential_reads": [],
    "outside_writes": 0,
    "download_and_run_lines": 0,
    "malware_advisories": [],
    "vulnerabilities": [],
    "secrets": 0,
    "secrets_in_tests": 0,
    "download_lines_in_tests": 0,
    "dependency_versions": 0,
    "scanned": {
      "secrets": true,
      "dependencies": true,
      "source": true
    },
    "capped_kinds": [],
    "findings_capped": false,
    "malware_checked": true,
    "scan_skips": {},
    "compiled": {
      "counts": {},
      "paths": []
    },
    "installed": {
      "packages": 3,
      "malicious": [],
      "vulnerabilities": [
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-4xh5-x5gv-qwph"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-58qw-9mgm-455v"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-6vgw-5pg2-w6jp"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-jp4c-xjxw-mgf9"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-qwm4-qh6w-59xr"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "GHSA-wf93-45jw-7689"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-1795"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-1796"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-196"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-2875"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-2876"
        },
        {
          "package": "pip",
          "version": "24.0",
          "advisory": "PYSEC-2026-3721"
        }
      ]
    },
    "installed_inventory": true,
    "installed_partial": false
  },
  "platform": "linux",
  "test_version": "readme-4243f19282e59714a358f5d27849c5ebf3ef413d1667fe1ae5969f004abbb1d7",
  "touched": {
    "evidence_file": "touched.json.gz",
    "linked_files": [
      "agent-events.jsonl.gz",
      "command-output.jsonl.gz"
    ],
    "network": {
      "allowed_hosts": [
        "files.pythonhosted.org",
        "pypi.org"
      ],
      "blocked_hosts": [],
      "canary_checked": true,
      "canary_sent": false,
      "canary_sent_to": [],
      "hosts": [
        "files.pythonhosted.org",
        "pypi.org"
      ],
      "package_registries": [
        "files.pythonhosted.org",
        "pypi.org"
      ],
      "private_address_attempts": 0,
      "recorded": true,
      "repo_hosts": [],
      "unanswered_hosts": [],
      "unattributed": [],
      "hosts_withheld": 2
    },
    "secret_files": {
      "opened_by_agent": [],
      "opened_by_other": [],
      "opened_by_repo": [],
      "planted": [
        "~/.env",
        "~/.ssh/id_ed25519",
        "~/.aws/credentials",
        "~/.config/gh/hosts.yml"
      ],
      "recorded": true
    },
    "version": 1
  },
  "evidence_strength": "readme_checked"
}
