Urgent.News

What's breaking now, across thousands of outlets.

AI

Turn Agent Tool Calls Into Run Receipts

The fastest way to debug a failing agent is not a better prompt; it's a better record of what the tools changed. Chat logs capture what the model said. A run receipt captures what the workspace did. Keep the second, and the first becomes optional. Most agent debugging starts too late. The run fails, the transcript scrolls away, and you're left reconstructing history from git blame and guesswork.…

Debugging a failing agent often requires more than improving prompts; it demands an improved record of the tools' actions. While chat logs show what the model said, run receipts record what the workspace did. Recording run receipts at each tool call prevents the loss of valuable transcripts when the run fails. Observability for an agent run should be written down immediately after each tool call using a wrapper that doesn't depend on the model that produced the call.

This concept is similar to a courier's tracking system, which records the status of each stop but doesn't reveal the driver or location of each stop. An agent that emits a JSON line per tool call serves as this courier, providing a simple and auditable way to track the agent's actions. To implement this, the minimal version requires three components: a stable run ID, a git workspace, and a wrapper around the tool-call boundary.

The provided example code demonstrates how to create a receipt file for each tool call using Node.js. The receipt file includes fields such as the run ID, the current git commit hash, the number of files changed, the number of added and deleted files since the last snapshot, and a duration measurement for each step. By using this approach, developers can efficiently debug failing agents and maintain a clear audit trail of the agent's actions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Silent Regressions Have No Stack Trace: A Minimal Prompt Eval Harness

A prompt regression is the only production bug that never throws an exception and never writes to your error log. When you change a prompt, the API still returns 200, the JSON still parses, and the…

  • Prompt regression is silent defect without error messages
  • API returns 200 status, JSON parses properly, latency unchanged
  • Minimal test harness catches regressions missed by manual testing

Inside India's AI Ambitions | Bloomberg Tech: Asia 8/28/2026

India is aiming to become a global AI powerhouse, backed by billions of dollars in chipmaking and technology investment. But major challenges remain, including a shortage of computing infrastructure, shifting venture capital priorities, and growing concerns over job displacement.

More from Friday 28 August →