Agents that have been stuck for more than 5 minutes (or 300 simulated seconds) are listed below. You can hand them off to a human.
How do token consumption, flat blended rates, and inactivity heuristics model autonomous agent execution costs and handoffs?
This interactive dashboard simulates execution tracking for multi-step AI agents by logging input and output tokens, step counts, and duration alongside an inactivity threshold for human intervention. The simulator applies a flat blended rate of $0.002 per 1,000 tokens across both prompt and completion tokens. When an agent's last activity exceeds 300 seconds (5 minutes), the dashboard flags the execution as stuck, surfacing it in the Stuck Handoff tab where human intervention can mark the job completed.
In production environments, LLM APIs enforce asymmetric pricing where generated output tokens cost substantially more than input prompt tokens, and static context prefixes can receive deep discounts via prompt caching. Additionally, real agent monitoring frameworks track heartbeat pings, tool call timeouts, and protocol errors rather than relying solely on a client-side elapsed millisecond threshold.
Click the '+ Add Run' button located next to the filter input. The dashboard generates a new synthetic run (such as RUN-008) with randomized step count, token counts, and execution status, increasing the 'Total Runs' metric card from 7 to 8 and updating the encoded share link.
The dashboard models cost with a single blended rate of $0.002 per 1k tokens, calculated as ((tokens_in + tokens_out) / 1000) * 0.002. In commercial LLM deployment, model providers charge distinct tiers for input prompt processing versus output generation, with output token generation commanding a significant premium over base input rates. Pricing | OpenAI API
Furthermore, iterative agent loops frequently re-send large system prompts, tool schemas, and cumulative conversation histories. Modern inference APIs provide prompt caching mechanisms that discount repeated context reads by up to 90% or more, creating cost structures that deviate significantly from static un-cached token counts. Prompt caching - Claude Platform Docs
In this application, any run whose recorded last activity is older than 300 seconds is flagged as 'stuck' and listed in the handoff queue. Triggering the handoff button transitions the run status to 'completed' and resets its timestamp, illustrating a human-in-the-loop intervention pattern.
Production orchestrators differentiate between active long-running tool executions, external webhook waits, and true execution deadlocks. Real-world handoffs typically pass conversational checkpoints, intermediate scratchpads, and execution logs to human operators rather than simply marking stalled runs as completed. Prompt caching - Claude Platform Docs
Commercial LLM API pricing structures document distinct input, cached input, and output token rates across model families.
Multi-turn agent tool use contexts, prefix cache breakpoints, cache hit pricing, and multi-turn message history dynamics.
The saved run dashboard contains seven fixture rows: two completed, two running, two stuck and one failed. At fifty pixels per row, completed, running and stuck bars each measure one hundred. Text filtering changes visible cards but the summary counts and cost totals still use all rows. Thus filtering to stuck can show two cards alongside a total of seven. These statuses are locally stored labels, not observations of real worker processes. The dashboard does not connect to an actual supervisor or provider usage stream. A fixture marked running is not proof an agent is generating. The seven rows have twenty two thousand two hundred input tokens and six thousand five hundred fifty output tokens, totaling twenty eight thousand seven hundred fifty. Their stored costs sum zero point one one eight currency units, and average cost per run rounds to zero point zero one six nine. At one pixel per one hundred assigned tokens, input and output bars measure two hundred twenty two and sixty five point five. Stored cost is summed directly rather than recomputed from a single token price. The Add Run path instead assigns two thousandths per thousand tokens, so a synthetic ten-thousand-token addition gets zero point zero two. These figures are code fixtures and not current model prices or billed account usage. The handoff renderer selects rows already marked stuck, despite UI wording about a five-minute inactivity condition. It does not apply an additional three-hundred-second predicate in that function. Share serialization omits last activity and reconstructs it from status when loading a link; it is not a precise monitoring history. With external Chart blocked offline, run cards, summary and cost text update first, then chart creation throws before handoff and share rendering. Filtering and deletion can still modify those earlier sections, but absent share output must not be counted as a working export. This narrated explainer preserves that ordering and does not send a human handoff or access any live agent.