The New Developer Workflow: Editor Agent Tests Pull Request
Learn to set up an AI coding agent in VS Code, generate tests, and open a pull request with a reproducible workflow.
The problem: your editor is no longer just an editor
You have heard the pitch: AI coding agents write code, tests, and even open pull requests. But when you try it, you end up with a messy diff, no tests, and a pull request that your reviewer rejects. The tools are powerful, but the workflow is not obvious.
This article walks through a concrete setup that takes a feature request from your editor to a pull request with passing tests. You will use VS Code, the Continue extension, and a minimal agent loop that you can run locally. No cloud IDE required.
By the end, you will have a reproducible pipeline: you write a failing test, the agent implements the code, you run the tests, and you open a pull request with a clean diff.
- Use Continue with a local model or an API key.
- Define a custom agent with a system prompt and tool access.
- Generate tests before implementation to guide the agent.
- Run tests locally and iterate until green.
- Commit and push with a generated message.
Before you start: what you need
You need Node.js 18 or later, VS Code, and the Continue extension installed. Optionally, you can use a local model like Ollama with codellama or a cloud model like GPT-4o-mini. The setup works with either, but I recommend a small cloud model for speed.
You also need Git initialized in your project folder. The agent will create files and run commands, so you want a clean working tree before starting.
node --version
npm init -y
npm install --save-dev jest
code .- Node.js 18+
- VS Code with Continue extension
- A model provider: OpenAI API key or Ollama with codellama
- Git initialized in your project
Step 1: Configure Continue with a custom agent
Continue lets you define custom agents in a JSON config file. Open the Continue config by running the command palette and typing Continue: Open Config. Add an agent named 'coder' with a system prompt that instructs it to write code, run tests, and iterate.
The agent needs access to tools like file read/write and terminal execution. Continue provides these by default, but you can restrict them in the config.
{
"name": "coder",
"systemPrompt": "You are a senior software engineer. Write clean, tested code. When asked to implement a feature, first check for a failing test. If none exists, write one. Implement the code, run the tests, and fix any failures. Use the terminal tool to run tests.",
"model": "openai/gpt-4o-mini",
"tools": ["read", "edit", "terminal"]
}- The model field uses the provider/model format.
- Tools list controls what the agent can do.
- You can add more tools like web search later.
Step 2: Write a failing test first
Start with a failing test. This gives the agent a target and ensures you have a verification step. For this example, we implement a function that calculates the factorial of a number.
Create a file named factorial.test.js with a test that expects factorial(5) to equal 120. Run the test to confirm it fails because factorial is not defined.
const { factorial } = require('./factorial');
test('factorial of 5 is 120', () => {
expect(factorial(5)).toBe(120);
});Step 3: Ask the agent to implement the feature
In VS Code, open the Continue chat panel, select your 'coder' agent, and type a prompt like: Implement the factorial function in factorial.js to make the test pass. The agent will read the test, create the implementation, and run the test.
You can watch the agent work in the terminal output. It should create factorial.js with a recursive or iterative solution.
npx jest factorial.test.js- If the agent fails, provide the error message in the chat.
- You can ask it to refactor the code after tests pass.
- Keep the test file as the source of truth.
Step 4: Generate additional tests for edge cases
One test is not enough. Ask the agent to add edge cases: factorial of 0, negative numbers, and large numbers. The agent should update the test file and run the suite.
This is where the agent loop shines: it can iterate on tests and implementation together.
const { factorial } = require('./factorial');
test('factorial of 0 is 1', () => {
expect(factorial(0)).toBe(1);
});
test('factorial of negative throws', () => {
expect(() => factorial(-1)).toThrow();
});
test('factorial of 10 is 3628800', () => {
expect(factorial(10)).toBe(3628800);
});Step 5: Run the full test suite and fix failures
Run the full test suite with npx jest. If any test fails, ask the agent to fix the implementation. The agent should be able to read the error and adjust the code.
This loop of test, implement, fix is the core of the new workflow. It shifts your role from writing code to reviewing and directing.
npx jest --coverageStep 6: Commit and open a pull request
Once tests pass, commit the changes. You can ask the agent to generate a commit message, or use a tool like the Commit Message Generator on code.live. Then push to a branch and open a pull request.
For this example, we use git commands directly. Create a branch, add the files, commit, and push.
git checkout -b feature/factorial
git add factorial.js factorial.test.js
git commit -m "Implement factorial function with tests"
git push origin feature/factorial- Use a descriptive branch name.
- Keep the commit focused on one feature.
- Reference the issue number in the commit message if applicable.
What I would do: recommended setup
For a production setup, I would add a CI pipeline that runs tests on every push. Use GitHub Actions with a simple workflow that installs dependencies and runs Jest. This ensures the agent's changes are verified before merge.
Here is a starter GitHub Actions workflow you can paste into .github/workflows/test.yml.
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm install
- run: npx jest --ciTroubleshooting common issues
If the agent cannot run tests because it lacks permission, check your Continue config and ensure the terminal tool is enabled. Also verify that Jest is installed locally.
If the agent generates code that does not match your style, add style rules to the system prompt or use a linter in the pipeline.
If the model is slow, switch to a smaller model or use a local one.
- Agent cannot run tests: enable terminal tool in config.
- Tests fail intermittently: check for flaky tests and fix them.
- Agent produces too much code: ask for minimal implementation.
- Model rate limits: use a local model or increase API limits.
FAQ
Answers to the questions that come up most often on this topic.
- Q: Do I need a powerful GPU to run a local model? A: No, you can use a small model like codellama 7B on a CPU, but it will be slower than a cloud API.
- Q: Can I use this workflow with other editors? A: Yes, Continue works with JetBrains IDEs too, and you can adapt the agent config.
- Q: How do I prevent the agent from touching files it should not? A: Restrict the tools in the agent config and use a clean working tree.
- Q: Is this workflow suitable for large codebases? A: It works best for small, well-scoped tasks. For large refactors, break them into smaller steps.
Next action: try it on your next task
Create a new branch, write a failing test for a small feature, and ask your agent to implement it. Run the tests, commit, and open a pull request. This workflow takes practice, but it will change how you approach routine coding tasks.
Key takeaways
- Apply one concrete change from this post before collecting more reading.
- Prefer browser-side tools when the work involves secrets, tokens, or PII.
- Document the why next to the how so the next reviewer inherits context.
FAQ
- Who is this guide on ai-coding for?
- Working developers who need a practical take on the new developer workflow: editor agent tests pull request — not a marketing overview. Skim the sections, apply one tip, then come back when you hit an edge case.
- Do I need an account to use the related tools?
- No. code.live tools run in your browser with no signup. Nothing you paste is uploaded to a server for the client-side utilities linked from this post.
- How often is this article updated?
- This post was published September 30, 2026. Fundamentals stay stable; check linked tool pages and official docs when version-specific behavior matters.