Interaction resource carries the steps and the
token usage. EvalGate reads saved interactions offline into the same
evalgate.agent-run.v2 runs as Claude Code, so a view or report can compare
them.
1. Save the interactions
Fetch each interaction of the task withinteractions.get and write its JSON
on one line of a file, for example with jq -c .. Include every interaction
in the previous_interaction_id chain. The resources contain prompts,
thoughts, outputs, tool arguments and tool results; treat the file as
sensitive and delete it after the import.
2. Import the interactions
previous_interaction_id chain becomes one run, whatever order the lines
are in; --run-id folds every chain into one run. Use
--runtime-host google_agent_platform for the Managed Agents API on Agent
Platform. When you give a runtime host, the hosting comes from the
interaction’s environment (remote or mode: self_hosted) unless you pass
--runtime-hosting, and the environment id is kept only as a salted digest.
EvalGate never infers the host or the sandbox provider.
What the run contains
An unfinished interaction’s usage is not counted, and any interaction without
a count makes that run total
n/a with reason not_exported instead of an
undercount. One interaction can hold several model calls, so API requests and
retries stay not_exported, as do cache writes, cost (the offline price
snapshot covers Anthropic models only), file reads and edits, subagent
measures and time waiting on a person.
Text, thoughts, signatures, tool arguments and results, error messages,
system instructions and labels are never read into the run. Interaction ids
are replaced by salted digests. Every number is self-reported by the Gemini
API and is not verified against billing data. To compare runs, continue with
cost of quality for coding agents.