Skip to main content

Don't know what to do while your agents work? The VS Code team has an answer.

Agents write most of my code these days. That leaves me with this question: what do I do with all this free time?

I considered learning a new framework, but that sounds suspiciously like work. Luckily, the VS Code team has a better idea. They gave me something to take care of.

What is the VS Code pet?

The pet is an interactive character that sits above the chat input box. It reacts to chat activity and to whatever you do to it.

So while the agent works, the pet watches. Before, I was the only one staring at the progress indicator while pretending to supervise. Now I have company.


Remark: The pet is marked as experimental, so it might change or be removed. Don't get too attached. (I got attached within five minutes.)

Adopting your pet

Type /vscode-pet in the chat input to show or hide it.

In the new-session view of the Agents window, you can also right-click outside the input box and select Pet (/vscode-pet).

Show or hide. That's the entire commitment. As far as I can tell, there is no feeding schedule, no vet, and no 3 AM walks. Compared to my Kubernetes cluster, it's remarkably low maintenance.

Spending quality time

My calendar is suddenly wide open, so let's see what we can do together:

  • Select it to trigger a reaction. With the keyboard, press Tab to focus it, then Enter or Space. Yes, the pet is accessible. Your accessibility audit will be thrilled.
  • Drag it around the chat and drop it wherever you like. It's like rearranging the furniture, except the furniture has opinions.
  • Flick it to throw it. Don't worry, the pet comes back.
  • Hop it with the Left and Right arrow keys while it has focus.
  • Throw it at a wall by holding Shift with an arrow key.

That last one is officially documented. I'm not sure what it says about the creators, but I hope they are feeling well. 

Right-click the pet (or press Shift+F10 when it has focus) and you get a context menu where you can:

  • view its achievements
  • send it on the run
  • resize it
  • switch between Stable and Insiders colors

Achievements are the interesting part. For the first time, there is a way to measure how well I'm doing as a pet owner. Finally, a metric I can bring to my next performance review. "Delivered 14 microservices" doesn't land like "Unlocked all pet achievements."

One pet, many sessions

Only one pet appears at a time in the active chat surface. Its position and size are shared across chats and windows, and they persist after you restart VS Code.

So, the pet remembers where you left it. That's more than I can say for most of my agents, who forget everything the moment the context window fills up. 😁

Remark: VS Code supports running multiple agent sessions in parallel. Parallel pets are not supported. I think the priorities are clear.

So, what now?

Does this mean I should spend my newly found free time playing with a pet in my editor? Probably not.

But right now, my agent is refactoring a legacy module, my pet is hopping around, and I'm drinking coffee. One of us is being productive, and I have a strong suspicion it's not me.

That's it. Back to work. Or at least back to the pet.

More information

Popular posts from this blog

Podman– Command execution failed with exit code 125

After updating WSL on one of the developer machines, Podman failed to work. When we took a look through Podman Desktop, we noticed that Podman had stopped running and returned the following error message: Error: Command execution failed with exit code 125 Here are the steps we tried to fix the issue: We started by running podman info to get some extra details on what could be wrong: >podman info OS: windows/amd64 provider: wsl version: 5.3.1 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:2655: connectex: No connection could be made because the target machine actively refused it. That makes sense as the podman VM was not running. Let’s check the VM: >podman machine list NAME         ...

Cache stampede: when our cache turned against us

While investigating some performance issues, we ran into an ASP.NET Core API that cached a fairly expensive aggregation query for 60 seconds. Under normal load, that was fine: one request rebuilds the cache, everyone else reads from it. Under peak load, dozens of requests would arrive in that same expiry window, all see a cache miss, and all fire the same expensive query in parallel. The database didn't like that. That was the moment when our caching layer stopped helping and started hurting. A burst of requests comes in at the same time, all miss the cache, and all go hammer the database or the downstream API at once. That's a cache stampede . The cache was supposed to protect our backend, and for a few hundred milliseconds it did the opposite. Why this happens IMemoryCache.GetOrCreate (and its async sibling) looks like it protects you, but it doesn't add any locking on its own. Look at the naive version: public async Task<Report> GetReportAsync(string key) ...

VS Code Planning mode

After the introduction of Plan mode in Visual Studio , it now also found its way into VS Code. Planning mode, or as I like to call it 'Hannibal mode', extends GitHub Copilot's Agent Mode capabilities to handle larger, multi-step coding tasks with a structured approach. Instead of jumping straight into code generation, Planning mode creates a detailed execution plan. If you want more details, have a look at my previous post . Putting plan mode into action VS Code takes a different approach compared to Visual Studio when using plan mode. Instead of a configuration setting that you can activate but have limited control over, planning is available as a separate chat mode/agent: I like this approach better than how Visual Studio does it as you have explicit control when plan mode is activated. Instead of immediately diving into execution, the plan agent creates a plan and asks some follow up questions: You can further edit the plan by clicking on ‘Open in Editor’: ...