# Giving Claude Code a /goal

I recently use the `/goal` command in Claude Code for the first time. I was struggling to reproduce a bug that I already had a theoretical understanding of from investigating the codebase, but had previously been unable to reproduce it despite that. I gave Claude my notes and set it the goal of reproducing the bug, and an hour later it managed it. When asked, it gave me the details of all the actions it took (including those which turned out to be irrelevant) and was able to tell me how to reliably reproduce the bug.

I set up a new Chrome profile for Claude to use, and installed the [Claude extension](https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn). My aim here is to keep Claude away from all the sites I'm logged into, and limit the damage it could do if something went wrong. This is still new territory to me, and I plan to continue being cuatious. With that set up, I ran `claude --chrome` which gives Claude access to the browser. I opened and logged into the QA site where I wanted the reproduction to happen, and let Claude loose.

I had also recently given Claude read-only access to my Microsoft 365 account, including my emails. I'd done a quick test to verify that it could indeed access them, but hadn't done anything useful with it yet. However, I was glad to have set it up because I'd forgotten that at one point in the bug reproduction I would be sent an MFA code via email, and Claude was able to use it without me needing to intervene.

It was worth keeping an eye on Claude. I wasn't watching it the whole time, but at one point I did notice that it was basically using trial & error to find test data. I told it to write SQL I can run against the QA database to find suitable test data, which was much faster. There were also times that Claude struggled to navigate the UI and work out how to get to specific functionality. On one occasion it did ask me how to find the button it needed to click. On other times I noticed the confusion and proactively stepped in to explain more. I probably needed to intervene about 4 or 5 times in total.
