The Old Way Was Painful
You hit a bug in your web app. Maybe a fetch call is returning a 401 you didn't expect, or a button click isn't doing what you wired it to do, or a JS error is swallowing your state silently. So you open DevTools, flip to the Network tab, reproduce the bug, scroll through the noise, find the right request, copy the headers and body, switch to your AI chat, paste it all in, add some context about what you were doing, and finally ask the question you had five minutes ago.
That whole process is friction. It's not hard, but it adds up when you're doing it ten times a day chasing down one stubborn bug.
/watch in lac-cli cuts out most of that loop.
What /watch Actually Does
/watch is a browser monitoring command that runs inside lac agent. Once you start it, it injects a monitoring script into your browser session that listens for:
- Clicks — which element, when, what it triggered
- Input events — what fields are being filled
- Navigation — every route change or page load
- XHR and fetch calls — full request headers, body, response status, and response body
- JS errors — the actual error message, file, and line number
All of that gets assembled into a session timeline. A chronological record of everything that happened from the moment you started watching to the moment you stopped. Nothing is cherry-picked — you get the full picture.
The "Send to AI" Button
Here's the part that makes it actually useful rather than just a fancier DevTools: there's a floating Send to AI button injected into your browser while /watch is active. When something goes wrong — or when you've reproduced the behavior you're trying to explain — you hit that button and the entire session timeline gets pushed directly to lac agent.
No copying. No pasting. No describing what happened. The agent gets the raw data: every click leading up to the error, the exact fetch call that failed (headers included), and the JS exception that followed. It has enough context to actually reason about the problem rather than asking you follow-up questions.
A Real Scenario
Say you're building a dashboard and your paginated API calls work fine on page load but break when a user filters by date. You've looked at the code, nothing obvious jumps out. This is the exact situation where /watch saves you twenty minutes.
You start lac agent, run /watch, open the dashboard, apply the date filter, watch it break, and hit Send to AI. The agent gets the timeline showing the filter input event, the fetch request with the query params that were actually sent, the 400 response with the error body, and any JS error that followed. It can tell you whether the params are malformed, whether a header is missing, whether the response error message points somewhere specific — all from one button press.
How to Get Started
If you don't have lac-cli yet, install it with:
pip install lac-cli
or with the one-liner:
curl -fsSL https://lacai.io/install.sh | bash
Then run the setup wizard to connect your provider (Claude, OpenAI, or a local Ollama model):
lac agent --setup
Once you're in an agent session, just type /watch to activate browser monitoring. The floating Send to AI button appears in your browser immediately.
What the Agent Can Do With the Timeline
Because lac agent already has your project files in context (via .lac-memory.json), it's not just looking at the network data in isolation. It can cross-reference the failing request against the actual route handler, check your auth middleware, look at how you're constructing the query params on the frontend, and point to the specific line that's producing the wrong output.
That combination — live browser data plus codebase context — is what makes this more than a DevTools wrapper. It's closer to having someone sit next to you who's already read every file in your project and is now watching your screen.
A Few Things Worth Knowing
The monitoring script runs in your browser tab's context, so it sees what that tab sees. Cross-origin requests are captured at the fetch/XHR layer, so you get headers and status even for third-party API calls your frontend makes. JS errors surface with stack traces, not just the top-level message.
The timeline is sent on demand when you press Send to AI — it doesn't stream continuously to the agent. That's intentional. You control when the session snapshot lands, so you're not flooding the agent with noise from normal browsing before you hit the bug.
And since lac-cli is MIT-licensed and open source, if you want to see exactly what the monitoring script injects, it's all there on GitHub.
The Practical Tip
Get in the habit of starting /watch before you reproduce a bug rather than after. It sounds obvious but the instinct is usually to try to fix it first and only pull out monitoring tools when you're stuck. Starting it upfront costs nothing and means the agent gets the full click-to-error sequence, not just the aftermath. The context of what a user was doing right before a fetch fails is usually the most important part.
Try it next time you're chasing a flaky API call. It's one of those features that feels small until the first time it shows you exactly what went wrong in about thirty seconds.