Set Copilot to code in a branch before it pushes
A developer used GitHub Copilot to work issues, but learned to give tighter instructions after it wrote weak first PRs and pushed to the wrong place.
- What they did
- A developer assigned issues to GitHub Copilot coding agent and watched it handle the work. They found it understood the codebase well and could make sensible changes, but the first pull requests were poor when the instructions were vague. In a separate example, a commenter told the agent to push the finished work to the repository and continue without more prompts.
- How it went
- The main complaint was that the agent pushed to a branch and left main empty, then kept checking for hours and looking through empty folders. The original poster also said it could not open attachments or follow org PR links, so those had to be pasted into the issue instead.
- Tips
- Set Copilot instructions before giving it the first task, and keep the work off main until you have reviewed the branch name and plan. If a task depends on files or linked context, paste the content directly into the issue and ask for approval before any push or submit step.
Try it yourself with GitHub Copilot
In [owner/repo], help me complete [feature or issue]. First, review the issue and any pasted context, then tell me the branch name you plan to use, the files you expect to touch, and a short summary of your approach. Wait for my approval before creating or pushing anything. After I approve, make the changes on a new branch, push them, and open a pull request. Stop before any irreversible step such as pushing to the default branch, submitting, merging, deleting, or sending anything, and tell me exactly what you changed and where it was pushed.
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.
Related agent uses
Run Copilot CLI in loops and split multi-part work
Daniel Ward used GitHub Copilot’s autopilot and /fleet features to finish larger jobs and divide separate chunks across parallel agents.
Use Copilot to handle small site edits in draft PRs
A developer handed GitHub Copilot two minor website tweaks and got back separate draft pull requests that were easy to test and merge.
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.
Break a runtime migration into tiny reviewable PRs
GitHub engineers had Copilot agents carry out most of a large TypeScript-to-Rust runtime rewrite.
Use an agent to inspect and explain COBOL on z/OS
A desktop agent connected to a mainframe to read COBOL, submit jobs, and summarize failures from spool output.
Use Claude Code from a phone with a remote VM
They accessed Claude Code on an iPhone by pairing a Tailscale-only Vultr VM with Termius, mosh, and tmux.