Run terminal commands carefully in Copilot agent mode

A VS Code user had Copilot agent mode run shell commands, but it often missed output or got stuck until they changed the shell setup.

Done with GitHub Copilot· Intermediate· Jun 2025

What they did
A user launched GitHub Copilot agent mode in VS Code from WSL and asked it to work in the terminal. The agent sometimes failed to notice command output or never saw the command finish, so commenters suggested pressing Enter, saving output to a file, adding guidance in copilot-instructions.md, or using a simpler shell instead of themed prompts like Powerlevel10k.
How it went
A GitHub engineer later linked the problem to older Powerlevel10k versions and said VS Code fixes were on the way. Even so, people on plain bash and Windows still reported hangs, and in some cases the agent rolled back code that was already correct.
Tips
If the agent needs terminal results, keep the shell prompt simple and update Powerlevel10k if you use it. Treat long agent loops as expensive, because failed reads can burn premium requests without making progress.

Try it yourself with GitHub Copilot

In [project path], run [build/test command] in the terminal and fix only the issues that the command reveals. If the terminal output is unclear or the command seems stuck, stop and tell me what you can see instead of guessing. Do not modify code that already passes. Before any irreversible action, such as deleting files, submitting changes, or sending anything, ask me to confirm. When the task is complete, list every file you changed and summarize the command results.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.