<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nitin Kalra</title>
    <description>The latest articles on DEV Community by Nitin Kalra (@nkalra0123).</description>
    <link>https://dev.to/nkalra0123</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F159292%2Fecd62477-0bf0-4b11-9e60-7e4ac8893b92.png</url>
      <title>DEV Community: Nitin Kalra</title>
      <link>https://dev.to/nkalra0123</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nkalra0123"/>
    <language>en</language>
    <item>
      <title>I Used Gemma 4 as a Private Log Analyst for App Crashes</title>
      <dc:creator>Nitin Kalra</dc:creator>
      <pubDate>Sun, 24 May 2026 13:04:34 +0000</pubDate>
      <link>https://dev.to/nkalra0123/i-used-gemma-4-as-a-private-log-analyst-for-app-crashes-5ddn</link>
      <guid>https://dev.to/nkalra0123/i-used-gemma-4-as-a-private-log-analyst-for-app-crashes-5ddn</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Write About Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4hnk2fjwwelgfw5ro6gu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4hnk2fjwwelgfw5ro6gu.png" alt="Cover image showing a local Gemma 4 log analyst reading crash logs and surfacing findings" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most AI debugging workflows are still &lt;strong&gt;on demand&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A year ago, that usually meant copying a stack trace, pasting it into a large model, and asking what went wrong.&lt;/p&gt;

&lt;p&gt;Now the workflow is better. I can ask Codex, Claude Code, or another coding agent to inspect the repo, read the relevant files, explain the failure, and even make the fix.&lt;/p&gt;

&lt;p&gt;But the first step is still mostly the same:&lt;/p&gt;

&lt;p&gt;Something breaks. I notice the stack trace, Gradle error, crash line, or suspicious log message. Then I bring that evidence to the agent and ask it to start from there.&lt;/p&gt;

&lt;p&gt;That works, but it is still reactive.&lt;/p&gt;

&lt;p&gt;The problem is that this is not how crashes actually happen during development.&lt;/p&gt;

&lt;p&gt;Crashes happen while the app is running.&lt;/p&gt;

&lt;p&gt;Gradle failures happen while I am switching branches.&lt;/p&gt;

&lt;p&gt;Warnings pile up before the actual failure.&lt;/p&gt;

&lt;p&gt;Sometimes the real issue is not the red stack trace. It is a swallowed exception inside a &lt;code&gt;try/catch&lt;/code&gt; block, a suspicious warning 200 lines earlier, or a lifecycle message that only makes sense when you look at the surrounding code.&lt;/p&gt;

&lt;p&gt;So I built around a different idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Gemma 4 runs locally on my dev laptop as a continuous log analyst.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not a replacement for a large model.&lt;/p&gt;

&lt;p&gt;Not a chatbot I manually open after everything breaks.&lt;/p&gt;

&lt;p&gt;Just a small local model watching logs, clustering noise, catching suspicious patterns, and telling me when something deserves attention.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Local Matters For Logs
&lt;/h2&gt;

&lt;p&gt;Logs are messy, repetitive, and often private.&lt;/p&gt;

&lt;p&gt;Android logs can contain package names, API paths, device details, feature flags, user identifiers, request IDs, internal class names, and business logic clues. Gradle output can expose project structure, dependency names, local file paths, signing configuration mistakes, and CI environment details.&lt;/p&gt;

&lt;p&gt;That makes logs a strange fit for always-on cloud analysis.&lt;/p&gt;

&lt;p&gt;For one-off debugging, I am comfortable invoking a stronger hosted model when I choose to. But I do not want every log line from my development machine streamed to a remote API just in case something interesting happens.&lt;/p&gt;

&lt;p&gt;This is where Gemma 4 becomes useful in a very specific way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It can run locally.&lt;/li&gt;
&lt;li&gt;It can be cheap enough to call repeatedly.&lt;/li&gt;
&lt;li&gt;It can inspect noisy text without needing a perfect prompt every time.&lt;/li&gt;
&lt;li&gt;It can sit near the developer loop instead of behind a manual copy/paste step.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That changes the product shape.&lt;/p&gt;

&lt;p&gt;A large cloud model is a consultant.&lt;/p&gt;

&lt;p&gt;A local Gemma 4 process can be a background reviewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Gemma 4 Locally With Ollama
&lt;/h2&gt;

&lt;p&gt;For this workflow I used Ollama:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama run gemma4:26b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I chose the 26B Mixture-of-Experts model because my laptop has enough headroom for it, and this task benefits from more than tiny-model pattern matching.&lt;/p&gt;

&lt;p&gt;The smaller Gemma 4 models are attractive for phones, Raspberry Pi projects, and very low-friction local apps. But a log analyst is doing a slightly different job. It needs to read noisy context, connect earlier warnings to later crashes, decide whether to use tools, and produce structured findings without constantly interrupting me.&lt;/p&gt;

&lt;p&gt;That is why I picked the MoE option: the challenge describes it as a highly efficient 26B model designed for high-throughput, advanced reasoning. On my machine, Ollama reports it as &lt;code&gt;gemma4:26b&lt;/code&gt;, a 25.8B Q4_K_M local model, about 18GB on disk.&lt;/p&gt;

&lt;p&gt;The watcher does not call &lt;code&gt;ollama run&lt;/code&gt; directly each time. I keep the model warm, then call Ollama's local HTTP API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;http://127.0.0.1:11434/api/chat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;content-type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemma4:26b&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That keeps the setup simple: local model, local logs, local code, local findings.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a small local workflow around three inputs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;adb logcat&lt;/code&gt; output from an Android app&lt;/li&gt;
&lt;li&gt;Gradle build failures&lt;/li&gt;
&lt;li&gt;Nearby source files when the log points to a class or line number&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal was not to make Gemma 4 fix code automatically. The goal was narrower:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Read the logs continuously, ignore obvious noise, identify likely root causes, ask for missing context when needed, and suggest the next debugging step.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The loop looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adb logcat / Gradle output
        |
        v
small rolling buffer
        |
        v
noise filter + event grouping
        |
        v
Gemma 4 local analysis
        |
        v
structured issue summary
        |--------------------|
        v                    v
bell notification      localhost:3001 viewer
        |
        v
optional source lookup through tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is the rolling buffer. Instead of sending one isolated stack trace, the local watcher can keep the last few hundred or thousand lines around the failure.&lt;/p&gt;

&lt;p&gt;That matters because the most useful clue is often before the crash.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctonrtamuqwpbg77w1w7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctonrtamuqwpbg77w1w7.png" alt="Diagram showing the local Gemma 4 debugging loop from logs to bell notification, localhost viewer, and read-file tools" width="799" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Making The Background Process Noticeable
&lt;/h2&gt;

&lt;p&gt;One problem with a background log analyst is obvious:&lt;/p&gt;

&lt;p&gt;If it is running in a separate terminal, how do I notice it found something?&lt;/p&gt;

&lt;p&gt;I did not want another terminal tab that quietly fills with text while I am focused on code. So I added two small tools around the model.&lt;/p&gt;

&lt;p&gt;The first one is intentionally simple: &lt;strong&gt;ring a bell&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When Gemma 4 classifies something as a real finding instead of noise, the watcher can play a short bell sound. Not for every warning. Not for every repeated stack trace. Only when the model thinks the event crosses a threshold:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a new crash signature&lt;/li&gt;
&lt;li&gt;a Gradle failure with a clear source location&lt;/li&gt;
&lt;li&gt;a swallowed exception that later becomes a visible failure&lt;/li&gt;
&lt;li&gt;repeated warnings that are likely connected&lt;/li&gt;
&lt;li&gt;a missing file, permission, or dependency that blocks the app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The implementation can be as small as this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ring_bell&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;reason&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;u0007&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;GEMMA_BELL_CMD&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;GEMMA_BELL_CMD&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;execFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;appendFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bell-events.log&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\n`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;alerted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reason&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second tool is a tiny local viewer.&lt;/p&gt;

&lt;p&gt;I run it on &lt;code&gt;localhost:3001&lt;/code&gt; and open it in Chrome. It shows recent Gemma 4 findings as a small debugging inbox:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft0uy19jyh3ua3k1hejxp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft0uy19jyh3ua3k1hejxp.png" alt="Screenshot of the local Gemma 4 log viewer running in Chrome with sample crash findings" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;latest issue summary&lt;/li&gt;
&lt;li&gt;severity&lt;/li&gt;
&lt;li&gt;first seen / last seen time&lt;/li&gt;
&lt;li&gt;related log lines&lt;/li&gt;
&lt;li&gt;suspected root cause&lt;/li&gt;
&lt;li&gt;suggested files to inspect&lt;/li&gt;
&lt;li&gt;next debugging step&lt;/li&gt;
&lt;li&gt;whether the bell already fired for that issue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That made the workflow much more practical. Gemma 4 can run in the background, but I do not have to keep staring at its terminal output. The bell tells me something needs attention. The browser view gives me the short version when I am ready to look.&lt;/p&gt;

&lt;h2&gt;
  
  
  Giving Gemma 4 Small Tools
&lt;/h2&gt;

&lt;p&gt;Logs are useful, but they often point to code.&lt;/p&gt;

&lt;p&gt;So I gave the local analyzer a small tool surface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;function&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;read_file&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Read a local source file by path or basename.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;startLine&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;endLine&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;function&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ring_bell&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Notify me when a high-confidence finding needs attention.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;reason&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;function&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;save_finding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Save a structured finding for the localhost viewer.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;finding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The most important one is &lt;code&gt;read_file&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When a stack trace includes &lt;code&gt;HomeAdapter.kt:88&lt;/code&gt;, Gemma 4 can ask for that file instead of guessing what the adapter does. When a Gradle error points to &lt;code&gt;CheckoutViewModel.kt:44&lt;/code&gt;, it can read the surrounding code and give a more grounded suggestion.&lt;/p&gt;

&lt;p&gt;I kept the tools deliberately boring.&lt;/p&gt;

&lt;p&gt;No automatic edits.&lt;/p&gt;

&lt;p&gt;No deleting files.&lt;/p&gt;

&lt;p&gt;No running random commands.&lt;/p&gt;

&lt;p&gt;Just enough local context to move from "this log looks bad" to "read this file and check this assumption."&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 1: The Stack Trace Was Obvious
&lt;/h2&gt;

&lt;p&gt;The easy case is a normal crash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FATAL EXCEPTION: main
Process: com.example.notes, PID: 18342
java.lang.IllegalStateException: Fragment NotesFragment not attached to a context.
    at androidx.fragment.app.Fragment.requireContext(Fragment.java:967)
    at com.example.notes.NotesFragment.showEmptyState(NotesFragment.kt:118)
    at com.example.notes.NotesFragment$loadNotes$1.invokeSuspend(NotesFragment.kt:92)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Gemma 4 did not need to be brilliant here. The root cause is already in the stack trace.&lt;/p&gt;

&lt;p&gt;The useful output was the structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"severity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"crash"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"likely_root_cause"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"NotesFragment calls requireContext() after the fragment is detached."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"noisy_lines"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"process restart messages"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"unrelated Choreographer skipped-frame warning"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"next_step"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Check whether loadNotes() completes after onDestroyView() or after navigation away from the fragment."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"code_to_read"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"NotesFragment.loadNotes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"NotesFragment.showEmptyState"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Fragment lifecycle around onDestroyView"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is already more useful than a raw stack trace sitting in a terminal.&lt;/p&gt;

&lt;p&gt;It converts the crash into a short debugging task.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 2: The Real Problem Was Hidden Above The Crash
&lt;/h2&gt;

&lt;p&gt;The more interesting case was a noisy sequence like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;W/ConfigRepository: Failed to parse remote config, using defaults
org.json.JSONException: No value for max_items
    at org.json.JSONObject.get(JSONObject.java:398)
    at com.example.app.ConfigRepository.parse(ConfigRepository.kt:61)
    at com.example.app.ConfigRepository.refresh(ConfigRepository.kt:42)

W/HomeViewModel: Config refresh failed, continuing with cached config

E/RecyclerView: No adapter attached; skipping layout

FATAL EXCEPTION: main
java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 0
    at com.example.app.HomeAdapter.onBindViewHolder(HomeAdapter.kt:88)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I only pasted the fatal exception into a model, the answer would probably focus on &lt;code&gt;HomeAdapter&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But the rolling log window shows a better story:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Config parsing failed.&lt;/li&gt;
&lt;li&gt;The app swallowed the exception and continued.&lt;/li&gt;
&lt;li&gt;The fallback state was empty or malformed.&lt;/li&gt;
&lt;li&gt;The adapter crashed later.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is exactly the kind of issue that a continuous local analyst is better positioned to catch.&lt;/p&gt;

&lt;p&gt;Gemma 4's summary was more useful when I asked it to separate &lt;strong&gt;trigger&lt;/strong&gt;, &lt;strong&gt;root cause&lt;/strong&gt;, and &lt;strong&gt;visible crash&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"visible_crash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"IndexOutOfBoundsException in HomeAdapter.onBindViewHolder"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"probable_trigger"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Remote config parsing failed because max_items was missing."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"root_cause_hypothesis"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The app continues after ConfigRepository.refresh() fails, but downstream UI code assumes the config produced a non-empty item list."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"risk"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The try/catch hides the real failure and converts it into a later UI crash."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"suggested_fix"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Return a typed error or safe default from ConfigRepository instead of swallowing the exception."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Make HomeViewModel expose an error/empty state when config parsing fails."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Guard HomeAdapter binding against mismatched item counts."&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the moment where the local model became more interesting than a manual prompt.&lt;/p&gt;

&lt;p&gt;It was not just answering a question.&lt;/p&gt;

&lt;p&gt;It was watching enough context to notice that the question I would have asked was incomplete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Letting It Read Nearby Code
&lt;/h2&gt;

&lt;p&gt;Logs alone are useful, but logs plus a small amount of local source context are much better.&lt;/p&gt;

&lt;p&gt;When the analyzer saw &lt;code&gt;ConfigRepository.kt:61&lt;/code&gt;, the next step was to read that file locally and include the surrounding function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ConfigRepository&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;refresh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rawJson&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nc"&gt;AppConfig&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rawJson&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;Log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;w&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"ConfigRepository"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Config refresh failed, continuing with cached config"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nc"&gt;AppConfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;empty&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rawJson&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nc"&gt;AppConfig&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;json&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JSONObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rawJson&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;AppConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;maxItems&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"max_items"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is where the suggestion became more like code review than log parsing.&lt;/p&gt;

&lt;p&gt;Gemma 4 pointed out that &lt;code&gt;AppConfig.empty()&lt;/code&gt; was not a neutral fallback. It changed the state shape in a way the UI did not expect. The crash happened later, but the bug was born here.&lt;/p&gt;

&lt;p&gt;The suggested improvement was not "catch fewer exceptions" in the abstract. It was more specific:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;sealed&lt;/span&gt; &lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;ConfigRefreshResult&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;data class&lt;/span&gt; &lt;span class="nc"&gt;Success&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;AppConfig&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ConfigRefreshResult&lt;/span&gt;
    &lt;span class="kd"&gt;data class&lt;/span&gt; &lt;span class="nc"&gt;Failed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;fallback&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;AppConfig&lt;/span&gt;&lt;span class="p"&gt;?)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ConfigRefreshResult&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the UI layer can make an explicit decision:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;show cached config if it exists&lt;/li&gt;
&lt;li&gt;show an empty state if there are no items&lt;/li&gt;
&lt;li&gt;show an error state if the config is invalid&lt;/li&gt;
&lt;li&gt;avoid binding an adapter with impossible assumptions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the workflow I care about:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;notice the crash&lt;/li&gt;
&lt;li&gt;find the earlier suspicious log&lt;/li&gt;
&lt;li&gt;read the nearby source&lt;/li&gt;
&lt;li&gt;suggest a safer boundary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is more useful than "here is what &lt;code&gt;IndexOutOfBoundsException&lt;/code&gt; means."&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 3: Gradle Failures Are Mostly Triage
&lt;/h2&gt;

&lt;p&gt;Gradle output is a different kind of problem. It is usually long, repetitive, and full of noise.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Execution failed for task ':app:compileDebugKotlin'.
&amp;gt; A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   &amp;gt; Compilation error. See log for more details

e: file:///Users/me/project/app/src/main/java/com/example/CheckoutViewModel.kt:44:21
Type mismatch: inferred type is String? but String was expected
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The useful job for Gemma 4 is not to explain Kotlin nullability from scratch.&lt;/p&gt;

&lt;p&gt;The useful job is to reduce the build output to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Primary failure:
- CheckoutViewModel.kt:44 passes a nullable String into a non-null parameter.

Likely fix:
- Check whether user.email can be null.
- Either validate before calling submitOrder(), provide a fallback, or change the called function to accept String? if null is valid.

Ignore:
- Gradle worker wrapper stack
- Generic "Compilation error" line
- Repeated task execution noise
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a small thing, but small things matter when they happen 30 times a day.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Ring Buffer
&lt;/h2&gt;

&lt;p&gt;The watcher does not send my entire terminal history to the model.&lt;/p&gt;

&lt;p&gt;It keeps a rolling window:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;RingBuffer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;maxLines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;maxLines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;maxLines&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;line&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\r?\n&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;line&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;maxLines&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;maxLines&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;snapshot&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That sounds basic, but it is the key difference from manual copy/paste. The model sees what happened around the crash, not only the final red line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Would Not Use A Large Model For This First
&lt;/h2&gt;

&lt;p&gt;Large models are better at deep reasoning. I still use them when the failure crosses multiple modules, touches architecture, or needs a careful patch.&lt;/p&gt;

&lt;p&gt;But continuous log analysis has different constraints.&lt;/p&gt;

&lt;p&gt;It needs to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cheap&lt;/li&gt;
&lt;li&gt;private&lt;/li&gt;
&lt;li&gt;low-friction&lt;/li&gt;
&lt;li&gt;always available&lt;/li&gt;
&lt;li&gt;good at summarizing repetitive noise&lt;/li&gt;
&lt;li&gt;able to run before I know there is a problem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the important distinction.&lt;/p&gt;

&lt;p&gt;For deep debugging, I use the strongest model I can get.&lt;/p&gt;

&lt;p&gt;For continuous debugging, I keep the model close to the logs.&lt;/p&gt;

&lt;p&gt;Gemma 4 on a developer laptop fits that second role.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Prompt Shape That Worked Best
&lt;/h2&gt;

&lt;p&gt;The most reliable prompt was not conversational. It was closer to a small incident-report contract:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a local crash-log analyst.

Analyze the log window below.

Return JSON with:
- severity: "ignore" | "warning" | "crash" | "build_failure"
- primary_signal: the line or event that matters most
- likely_root_cause: concise hypothesis
- noisy_lines: log patterns that are probably irrelevant
- missing_context: files, commands, or runtime state needed to confirm
- next_steps: 1 to 3 concrete debugging steps
- source_files_to_read: likely files/classes/functions

Rules:
- Do not invent files.
- If the log is insufficient, say what is missing.
- Separate the visible crash from earlier suspicious events.
- Treat swallowed exceptions as suspicious.
- Prefer practical debugging steps over generic explanations.
- Use read_file only when a log points to a concrete local file.
- Ring the bell only for new or high-confidence findings.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last rule mattered:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Treat swallowed exceptions as suspicious.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Without that, the model often focused too much on the final crash. With it, the model started paying attention to warning/error logs that appeared earlier but did not crash the app immediately.&lt;/p&gt;

&lt;p&gt;The actual loop is a normal tool-calling loop: call Ollama, execute any tool calls, send the tool results back, and stop when the model returns a final JSON finding.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;system&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SYSTEM_PROMPT&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;buildUserPrompt&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ringBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;snapshot&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;round&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;round&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;round&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ollama&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tool_calls&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;call&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tool_calls&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;executeTool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;call&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tool&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my test, &lt;code&gt;gemma4:26b&lt;/code&gt; used the &lt;code&gt;read_file&lt;/code&gt; tool when the prompt asked it to inspect &lt;code&gt;ConfigRepository.kt&lt;/code&gt;, then continued from the tool result. That is the part that makes the log watcher feel less like a summarizer and more like a local debugging assistant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Gemma 4 Helped
&lt;/h2&gt;

&lt;p&gt;Gemma 4 was useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;compressing noisy logs into a short issue summary&lt;/li&gt;
&lt;li&gt;grouping repeated errors&lt;/li&gt;
&lt;li&gt;separating primary failures from wrapper stack traces&lt;/li&gt;
&lt;li&gt;noticing earlier warnings before a crash&lt;/li&gt;
&lt;li&gt;suggesting which source files to inspect&lt;/li&gt;
&lt;li&gt;producing structured JSON that the local dashboard renders&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The biggest win was not raw intelligence.&lt;/p&gt;

&lt;p&gt;The biggest win was &lt;strong&gt;presence&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because the model can run locally, it can be part of the normal dev loop. It does not need me to decide that a log line is important enough to upload somewhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where It Was Not Enough
&lt;/h2&gt;

&lt;p&gt;Gemma 4 was less reliable when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the log needed domain knowledge that was only in the codebase&lt;/li&gt;
&lt;li&gt;the crash involved async ordering across several classes&lt;/li&gt;
&lt;li&gt;the real issue depended on backend state&lt;/li&gt;
&lt;li&gt;the stack trace pointed to generated code&lt;/li&gt;
&lt;li&gt;the logs were too aggressively filtered before reaching the model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix was not to pretend the local model could know everything.&lt;/p&gt;

&lt;p&gt;The fix was to let it ask for context:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"missing_context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"HomeViewModel.loadHome()"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"ConfigRepository.refresh()"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"HomeAdapter.getItemCount()"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"The JSON payload used for remote config"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the right boundary.&lt;/p&gt;

&lt;p&gt;Gemma 4 should not hallucinate the code. It should tell the developer or tool which code to read next.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Workflow I use now
&lt;/h2&gt;

&lt;p&gt;The workflow I use now is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A local watcher tails &lt;code&gt;adb logcat&lt;/code&gt;, Gradle output, and test output.&lt;/li&gt;
&lt;li&gt;Gemma 4 continuously turns noisy streams into issue candidates.&lt;/li&gt;
&lt;li&gt;The tool groups repeated failures instead of spamming me.&lt;/li&gt;
&lt;li&gt;New high-confidence findings ring a bell so I actually notice them.&lt;/li&gt;
&lt;li&gt;The local viewer on &lt;code&gt;localhost:3001&lt;/code&gt; shows recent findings in Chrome.&lt;/li&gt;
&lt;li&gt;When a suspicious event points to code, Gemma 4 uses &lt;code&gt;read_file&lt;/code&gt; to inspect the local source.&lt;/li&gt;
&lt;li&gt;It suggests one small next step.&lt;/li&gt;
&lt;li&gt;If the problem is deep, I escalate the compact summary and selected files to a stronger model.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That gives each model the right job.&lt;/p&gt;

&lt;p&gt;Gemma 4 handles continuous private observation.&lt;/p&gt;

&lt;p&gt;A bigger model handles expensive reasoning on demand.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Take
&lt;/h2&gt;

&lt;p&gt;Before trying this, I thought of local models mostly as a privacy story.&lt;/p&gt;

&lt;p&gt;That is still true, but it is not the whole story.&lt;/p&gt;

&lt;p&gt;Local models also change &lt;strong&gt;when&lt;/strong&gt; we can use AI.&lt;/p&gt;

&lt;p&gt;If every model call is expensive, remote, and deliberate, AI becomes something we invoke after we notice a problem.&lt;/p&gt;

&lt;p&gt;If a capable enough model is running on the same machine as the logs, AI can start watching for weak signals before the problem becomes obvious.&lt;/p&gt;

&lt;p&gt;That is especially useful for mobile development, where crashes are surrounded by lifecycle noise, device noise, framework noise, and build-tool noise.&lt;/p&gt;

&lt;p&gt;Gemma 4 does not need to be the smartest debugger in the world to be useful here.&lt;/p&gt;

&lt;p&gt;It just needs to be local, cheap, private, and good enough to say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"This crash is probably not where the bug started. Read the warning 40 lines above it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a small sentence.&lt;/p&gt;

&lt;p&gt;But during a debugging session, it can save an hour.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemma" rel="noopener noreferrer"&gt;Gemma on Google AI for Developers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ollama.com/" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/tools/logcat" rel="noopener noreferrer"&gt;Android Debug Bridge logcat&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
    <item>
      <title>WebMCP Is the Quiet Google I/O Announcement That Could Make Web Apps Agent-Ready</title>
      <dc:creator>Nitin Kalra</dc:creator>
      <pubDate>Sun, 24 May 2026 11:54:22 +0000</pubDate>
      <link>https://dev.to/nkalra0123/webmcp-is-the-quiet-google-io-announcement-that-could-make-web-apps-agent-ready-1p9l</link>
      <guid>https://dev.to/nkalra0123/webmcp-is-the-quiet-google-io-announcement-that-could-make-web-apps-agent-ready-1p9l</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-io-writing-2026-05-19"&gt;Google I/O Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8p6zcj79nu3bkengcgsy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8p6zcj79nu3bkengcgsy.png" alt="WebMCP cover image showing agent-ready web apps and structured tool panels" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At Google I/O 2026, the loud announcements were easy to spot: Gemini 3.5, Antigravity 2.0, Android agents, AI Studio upgrades, and a lot of new ways to build software with AI.&lt;/p&gt;

&lt;p&gt;The announcement I kept coming back to was much quieter:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.chrome.com/docs/ai/webmcp" rel="noopener noreferrer"&gt;WebMCP&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Chrome docs describe it as a proposed open web standard that can be tested locally behind a Chrome flag and explored with demo apps.&lt;/p&gt;

&lt;p&gt;But the idea underneath it is important:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if websites stopped forcing agents to guess what buttons and forms mean, and started exposing structured, typed actions directly?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That sounds small until you compare it with the tool that exists today: &lt;a href="https://github.com/ChromeDevTools/chrome-devtools-mcp" rel="noopener noreferrer"&gt;Chrome DevTools MCP&lt;/a&gt;, Google's official MCP server that lets coding agents control and inspect Chrome through DevTools.&lt;/p&gt;

&lt;p&gt;After looking at both, my take is simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chrome DevTools MCP helps agents understand the web we already built. WebMCP asks us to build a web that agents can use without guessing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That difference matters for every web developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Current Web Is Still Built For Eyes And Fingers
&lt;/h2&gt;

&lt;p&gt;Most web apps assume the user is a human looking at pixels and moving through a UI one click at a time.&lt;/p&gt;

&lt;p&gt;That model works for people. It is much less reliable for agents.&lt;/p&gt;

&lt;p&gt;An agent can try to inspect the DOM. It can use the accessibility tree. It can take a screenshot. It can click buttons. It can fill fields. But unless the app exposes clearer intent, the agent still has to infer a lot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is this button destructive or reversible?&lt;/li&gt;
&lt;li&gt;Does this date field expect &lt;code&gt;MM/DD/YYYY&lt;/code&gt;, &lt;code&gt;YYYY-MM-DD&lt;/code&gt;, or a custom picker flow?&lt;/li&gt;
&lt;li&gt;Is the visible price final, or does tax appear later?&lt;/li&gt;
&lt;li&gt;Does this form submit immediately, or save a draft?&lt;/li&gt;
&lt;li&gt;Is this disabled button waiting on validation, auth, inventory, or JavaScript state?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Humans handle ambiguity with context. Agents handle ambiguity with retries, brittle heuristics, and occasional nonsense.&lt;/p&gt;

&lt;p&gt;WebMCP is interesting because it tries to reduce that ambiguity at the source.&lt;/p&gt;

&lt;h2&gt;
  
  
  What WebMCP Adds
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://developer.chrome.com/docs/ai/webmcp" rel="noopener noreferrer"&gt;Chrome WebMCP documentation&lt;/a&gt; describes WebMCP as a way for web pages to expose structured tools for AI agents. A page can register JavaScript functions or annotate HTML forms so an agent can discover available actions, understand input schemas, and call those actions inside the current browser context.&lt;/p&gt;

&lt;p&gt;In other words, the website can say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual example, not exact production code&lt;/span&gt;
&lt;span class="nf"&gt;registerTool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;searchFlights&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Search available flights&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;passengers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a different contract from "look for a textbox that probably means origin, type into it, tab somewhere, hope the custom date picker behaves, and click the blue button."&lt;/p&gt;

&lt;p&gt;The official docs call out support for discovery, JSON Schema, and page state. They also give examples like support flows, travel booking, structured forms, date pickers, and hidden diagnostic actions.&lt;/p&gt;

&lt;p&gt;The important word is &lt;strong&gt;structured&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The web already has APIs. But WebMCP is not a backend API. It lives in the browser context. The tool call can update the same UI the user sees. That keeps the user in the loop and preserves the visible product experience, while giving the agent a more reliable path than raw actuation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Compared It With Chrome DevTools MCP
&lt;/h2&gt;

&lt;p&gt;The Google I/O developer keynote put WebMCP and Chrome DevTools for agents in the same broader section: "Redefining web development in the agentic era." That pairing is useful.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.chrome.com/docs/devtools/agents" rel="noopener noreferrer"&gt;Chrome DevTools for agents&lt;/a&gt; gives coding agents the ability to interact with Chrome, inspect pages, debug runtime behavior, emulate real-world user experiences, run audits, inspect console messages, analyze network requests, take accessibility-tree snapshots, and run performance workflows.&lt;/p&gt;

&lt;p&gt;The GitHub README for &lt;code&gt;chrome-devtools-mcp&lt;/code&gt; describes it as an MCP server that lets agents such as Antigravity, Claude, Cursor, Copilot, and Codex control and inspect a live Chrome browser. The tool reference includes navigation, input automation, emulation, network inspection, console inspection, screenshots, accessibility snapshots, Lighthouse audits, performance traces, memory tools, extension tools, and experimental WebMCP tools.&lt;/p&gt;

&lt;p&gt;That is a lot of power.&lt;/p&gt;

&lt;p&gt;But it is a different layer.&lt;/p&gt;

&lt;p&gt;Chrome DevTools MCP is mostly a &lt;strong&gt;developer-side debugging and automation tool&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;WebMCP is a &lt;strong&gt;site-side capability contract&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;One lets an agent inspect what is there. The other lets a site declare what can be done.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpr3seg1rpnm2bt0p9tzg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpr3seg1rpnm2bt0p9tzg.png" alt="Chrome DevTools MCP compared with WebMCP: inspecting rendered pages vs exposing product tools" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Small Test
&lt;/h2&gt;

&lt;p&gt;I wanted a hands-on check instead of writing another "AI will change everything" post.&lt;/p&gt;

&lt;p&gt;The WebMCP docs point to demos covering both imperative and declarative implementations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WebMCP zaMaker&lt;/strong&gt;, which uses the WebMCP Imperative API.&lt;/li&gt;
&lt;li&gt;A travel demo, also using the WebMCP Imperative API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Le Petit Bistro&lt;/strong&gt;, which uses the WebMCP Declarative API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I started with WebMCP zaMaker because the imperative version makes the core idea very visible. Instead of asking an agent to infer pizza controls from pixels, the page registers explicit tools that the inspector can discover.&lt;/p&gt;

&lt;p&gt;I enabled WebMCP testing in Chrome, opened the zaMaker demo, and used the &lt;strong&gt;WebMCP - Model Context Tool Inspector&lt;/strong&gt; extension.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frsmlde55c58xwmktv5j6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frsmlde55c58xwmktv5j6.png" alt="WebMCP zaMaker demo with Model Context Tool Inspector showing registered pizza tools" width="799" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The extension surfaced several page-defined tools, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;add_topping&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;manage_pizza&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remove_topping&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;set_pizza_size&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;set_pizza_style&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the part that clicked for me. These are not generic browser actions like "click at coordinate X" or "type into input Y." They are product-level capabilities exposed by the page.&lt;/p&gt;

&lt;p&gt;For example, the inspector showed &lt;code&gt;add_topping&lt;/code&gt; with a schema that included a &lt;code&gt;topping&lt;/code&gt; enum and a &lt;code&gt;size&lt;/code&gt; enum. It also showed &lt;code&gt;set_pizza_size&lt;/code&gt; with a structured &lt;code&gt;size&lt;/code&gt; input, plus a &lt;code&gt;number_of_persons&lt;/code&gt; field that could help infer the right size.&lt;/p&gt;

&lt;p&gt;Then I used natural language prompts in the inspector:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;add pizza with large toppings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The inspector translated that into a tool call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"size"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Large"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"topping"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"🍕"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I tried:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;make the pizza extra large
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The extension called:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"size"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Extra Large"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The page responded by changing the pizza state.&lt;/p&gt;

&lt;p&gt;That small demo made the difference clearer than the docs alone. A browser automation agent can click around a pizza builder. A WebMCP-aware page can instead say, "Here are the actions this product supports, here are the allowed parameters, and here is what happened when you called one."&lt;/p&gt;

&lt;p&gt;For contrast, Chrome DevTools MCP felt like a developer-side lens. It can inspect a page, read the accessibility tree, look at console output, automate interactions, and help an agent debug what is already rendered in Chrome.&lt;/p&gt;

&lt;p&gt;That is powerful, but it is still looking at the page from the outside. The zaMaker demo showed the other side of the idea: the page itself can publish a small set of intentional actions for agents to use.&lt;/p&gt;

&lt;p&gt;So my hands-on result was:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chrome DevTools MCP is practical today for inspecting and testing pages. The WebMCP inspector shows what changes when the page itself exposes product-level tools.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  WebMCP vs Chrome DevTools MCP
&lt;/h2&gt;

&lt;p&gt;Here is the cleanest way I now think about the difference:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;WebMCP&lt;/th&gt;
&lt;th&gt;Chrome DevTools MCP&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Who exposes the capability?&lt;/td&gt;
&lt;td&gt;The website or web app&lt;/td&gt;
&lt;td&gt;The browser / DevTools layer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who is it mainly for?&lt;/td&gt;
&lt;td&gt;Browser-based user agents acting inside a site&lt;/td&gt;
&lt;td&gt;Coding agents, QA agents, and developer workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What does it make explicit?&lt;/td&gt;
&lt;td&gt;App-defined tools, inputs, outputs, and page state&lt;/td&gt;
&lt;td&gt;Browser state, DOM/a11y snapshots, console, network, performance, screenshots&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What problem does it reduce?&lt;/td&gt;
&lt;td&gt;Agents guessing how to use a product&lt;/td&gt;
&lt;td&gt;Developers manually inspecting and debugging browser behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best current use&lt;/td&gt;
&lt;td&gt;Experimental agent-ready product flows&lt;/td&gt;
&lt;td&gt;Real debugging, QA, performance, accessibility checks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Biggest limitation&lt;/td&gt;
&lt;td&gt;Requires browser support and app implementation&lt;/td&gt;
&lt;td&gt;Still often acts through page structure, snapshots, and inferred intent&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If an agent is trying to debug why a checkout page is broken, Chrome DevTools MCP is the right tool.&lt;/p&gt;

&lt;p&gt;If an agent is trying to book a trip, submit a support request, configure a dashboard, or complete a multi-step workflow inside an app, WebMCP is the more interesting long-term answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Is Bigger Than "AI Can Click Buttons"
&lt;/h2&gt;

&lt;p&gt;Before WebMCP, the default browser-agent path looked like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;See the page.&lt;/li&gt;
&lt;li&gt;Guess the user's next action.&lt;/li&gt;
&lt;li&gt;Click or type.&lt;/li&gt;
&lt;li&gt;Observe the result.&lt;/li&gt;
&lt;li&gt;Retry if wrong.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That can work, but it is fragile. It is also slow and expensive because every step adds model reasoning, visual parsing, DOM interpretation, or both.&lt;/p&gt;

&lt;p&gt;WebMCP suggests a different path:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Discover the site's available tools.&lt;/li&gt;
&lt;li&gt;Pick the tool that matches the user's goal.&lt;/li&gt;
&lt;li&gt;Send typed parameters.&lt;/li&gt;
&lt;li&gt;Let the site execute the action in the visible browser context.&lt;/li&gt;
&lt;li&gt;Return structured output or a clear error.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is closer to an API, but with the user still looking at the product.&lt;/p&gt;

&lt;p&gt;This is why I think WebMCP matters. It is not only about making agents more powerful. It is about moving responsibility back to application developers. If we want agents to act safely and reliably, we cannot make them reverse-engineer every workflow from pixels.&lt;/p&gt;

&lt;p&gt;We need to expose intent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Developers Can Do Before WebMCP Is Everywhere
&lt;/h2&gt;

&lt;p&gt;Most of us cannot ship production WebMCP flows tomorrow. Browser support is early, and the proposal is still changing.&lt;/p&gt;

&lt;p&gt;But we can start building sites that are easier for both humans and agents to understand.&lt;/p&gt;

&lt;p&gt;The practical checklist I took from this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use semantic HTML before custom widgets.&lt;/li&gt;
&lt;li&gt;Make important buttons and forms clear in the accessibility tree.&lt;/li&gt;
&lt;li&gt;Give inputs stable names and labels.&lt;/li&gt;
&lt;li&gt;Avoid hiding critical state only in visual styling.&lt;/li&gt;
&lt;li&gt;Keep destructive actions behind explicit confirmation.&lt;/li&gt;
&lt;li&gt;Separate "preview", "save draft", "submit", and "purchase" flows clearly.&lt;/li&gt;
&lt;li&gt;Make validation errors machine-readable and human-readable.&lt;/li&gt;
&lt;li&gt;Test important flows with browser automation, accessibility snapshots, and Lighthouse.&lt;/li&gt;
&lt;li&gt;Think about which app actions would deserve structured tools later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If I were preparing a product for WebMCP, I would not start by exposing every button as a tool. I would start with the few workflows where ambiguity hurts most:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;search&lt;/li&gt;
&lt;li&gt;checkout&lt;/li&gt;
&lt;li&gt;booking&lt;/li&gt;
&lt;li&gt;support ticket creation&lt;/li&gt;
&lt;li&gt;return/refund initiation&lt;/li&gt;
&lt;li&gt;dashboard filtering&lt;/li&gt;
&lt;li&gt;diagnostics&lt;/li&gt;
&lt;li&gt;account settings changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are the places where agents guessing through the UI can create real user pain.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Security Question
&lt;/h2&gt;

&lt;p&gt;There is an obvious risk here: if websites expose actions to agents, bad tool design can make bad actions easier.&lt;/p&gt;

&lt;p&gt;That is why I like that the WebMCP model keeps actions in the browser context instead of turning every site into a blind backend API. Sensitive actions can still require visible UI, user confirmation, and page-level state.&lt;/p&gt;

&lt;p&gt;But developers will need discipline.&lt;/p&gt;

&lt;p&gt;A good WebMCP tool should have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a narrow purpose&lt;/li&gt;
&lt;li&gt;a clear name&lt;/li&gt;
&lt;li&gt;a strict schema&lt;/li&gt;
&lt;li&gt;useful error messages&lt;/li&gt;
&lt;li&gt;visible execution&lt;/li&gt;
&lt;li&gt;confirmation for irreversible actions&lt;/li&gt;
&lt;li&gt;no surprise side effects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal should not be "let agents do anything."&lt;/p&gt;

&lt;p&gt;The goal should be "let agents do the right thing with less guessing."&lt;/p&gt;

&lt;h2&gt;
  
  
  My Take
&lt;/h2&gt;

&lt;p&gt;Chrome DevTools MCP feels like the tool web developers can use now.&lt;/p&gt;

&lt;p&gt;WebMCP feels like the contract web developers may need to design for next.&lt;/p&gt;

&lt;p&gt;That is why I think it was one of the more important web announcements at Google I/O 2026. It points to a shift from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;agents as better screen scrapers&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;agents as first-class users of structured web capabilities&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That shift will not happen overnight. It needs browser support, standards work, developer tooling, security patterns, and a lot of real-world testing.&lt;/p&gt;

&lt;p&gt;But the direction is clear. If agents are going to use the web on our behalf, web apps need to become more than visually usable.&lt;/p&gt;

&lt;p&gt;They need to become understandable.&lt;/p&gt;

&lt;p&gt;They need to become inspectable.&lt;/p&gt;

&lt;p&gt;And eventually, they need to become agent-ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/ai/webmcp" rel="noopener noreferrer"&gt;WebMCP documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/ai/webmcp/imperative-api" rel="noopener noreferrer"&gt;WebMCP Imperative API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/devtools/agents" rel="noopener noreferrer"&gt;Chrome DevTools for agents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ChromeDevTools/chrome-devtools-mcp" rel="noopener noreferrer"&gt;ChromeDevTools/chrome-devtools-mcp on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.googleblog.com/all-the-news-from-the-google-io-2026-developer-keynote/" rel="noopener noreferrer"&gt;Google I/O 2026 Developer Keynote recap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/GoogleChromeLabs/webmcp-tools" rel="noopener noreferrer"&gt;GoogleChromeLabs WebMCP tools and demos&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>googleiochallenge</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
