Your Cart
Loading

How to inspect repeated OpenCode tool calls from a session export

How to inspect repeated OpenCode tool calls from a session export

An OpenCode run that sits there repeating the same tool call — or dies on a provider error — is hard to diagnose from the terminal alone. The session data exists, but reading it by hand means digging through the session database. This post shows one concrete workflow: export the session, generate a report, and read the repeated-call findings.

1. Export the session


opencode export ses_abc123 > session.json

Tested with OpenCode 1.18.x. Other versions run best-effort and the report says so explicitly.

2. Generate the report

With Agent Run Inspector (the tool we publish; see the disclosure at the end):


runinspector session.json

You get one self-contained HTML file. No server, no account, no network requests — and the input file is never modified.

3. Read the repeated-call findings

The report classifies identical repeated calls into three practical buckets:

  • Failing retry — the same call repeated with no success in between.
  • Repeat after success — the call succeeded earlier and keeps being
  • re-issued; often polling or verification rather than a loop.
  • Recovered retry — failures followed by a success; something wobbled and
  • recovered.

It also separates recovered from unresolved failures, and reports the run's completion state: finished, finished with unresolved items, or stopped mid-step. Missing evidence is reported as unknown — never guessed as a failure or a success.

What the report cannot tell you

  • It detects and reports; it does not fix or prevent anything.
  • Token and cost figures are as reported by OpenCode in the export — useful
  • for trends, not invoice-grade.
  • It analyzes one export at a time and does not decide whether your coding
  • task was correct.
  • Claude Code JSONL is not supported (other tools cover that).

Try it on the sample pack first

The free sample pack contains four synthetic sessions and their generated reports — including a repeated-failure loop and a recovered-failure case — so you can see the output before deciding anything:

https://payhip.com/b/I6OnS

The full build (Python source + installable wheel + README + examples) is a one-time purchase — Individual $49, Team $149 (up to five named users):

https://payhip.com/Superkamoubot

Privacy note

Transcript content is escaped in the report, so nothing from an export can execute. The report still contains your session content — review it before sharing with anyone.

---

Disclosure: we publish Agent Run Inspector. The screenshots in this post come from the synthetic sample pack, not from a customer's session.