<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Observability on vrajat</title><link>https://vrajat.com/tags/observability/</link><description>Recent content in Observability on vrajat</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 25 May 2026 22:15:00 +0530</lastBuildDate><atom:link href="https://vrajat.com/tags/observability/index.xml" rel="self" type="application/rss+xml"/><item><title>Observing Claude Code with Hooks and Transcripts</title><link>https://vrajat.com/posts/claude-code-hooks/</link><pubDate>Mon, 25 May 2026 22:15:00 +0530</pubDate><guid>https://vrajat.com/posts/claude-code-hooks/</guid><description>&lt;p>When you submit a prompt to Claude Code, it enters an agent loop with two distinct phases:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Reasoning&lt;/strong>: Claude evaluates the prompt, conversation history, available tools, and system instructions to determine whether to provide a final answer or execute a tool call.&lt;/li>
&lt;li>&lt;strong>Action&lt;/strong>: If a tool is called, the result is appended to the context, and the loop repeats.&lt;/li>
&lt;/ol>
&lt;p>A file edit typically requires 3-4 iterations, while complex refactors can exceed 30. To observe this loop, we have two primary data sources: &lt;strong>Lifecycle Hooks&lt;/strong>, which fire during execution to capture real-time events, and &lt;strong>Session Transcripts&lt;/strong>, which store the complete state and token usage on disk.&lt;/p></description></item></channel></rss>