Which AI coding tools can iterate on LSP/ESLint/tsc errors automatically until the project is clean?
AI Coding Agent Platforms

Which AI coding tools can iterate on LSP/ESLint/tsc errors automatically until the project is clean?

10 min read

Most TypeScript and JavaScript teams eventually ask the same thing: is there an AI coding tool that can just run the project, read all LSP/ESLint/tsc errors, fix them, re-run checks, and keep iterating until everything is clean? The short answer is: yes, but with caveats—and some tools are much better than others at this kind of automated error-clearing loop.

Below is a practical overview of which AI coding tools come closest to “auto-fix until green,” how they work with LSP, ESLint, and tsc, and what workflows actually succeed in real projects.


What “automatic iteration until clean” really means

Before naming specific tools, it’s important to define what you’re actually asking for:

  • Read errors programmatically
    The tool needs access to:

    • TypeScript compiler output (tsc, ts-node, vite build, next lint, etc.)
    • ESLint diagnostics (via eslint CLI or editor-integrated LSP)
    • LSP errors/warnings (TypeScript language server, VS Code, etc.)
  • Modify the codebase
    It must be able to:

    • Edit multiple files
    • Refactor types, imports, and interfaces
    • Update config (e.g., tsconfig.json, .eslintrc, package.json scripts)
  • Re-run checks in a loop
    After each round of edits, it should:

    • Re-run tsc and/or eslint
    • Parse new errors
    • Decide what to fix next
    • Stop when the project is “clean” (or no further progress is possible)

Tools that can do all three—especially on larger codebases—are usually autonomous or agentic AI dev tools, not just “inline AI autocomplete” in your editor.


Categories of AI tools that can iterate on errors

At a high level, tools that can iterate on LSP/ESLint/tsc errors fall into three buckets:

  1. Editor copilots with limited iteration
  2. Terminal/CLI AI agents that can run commands and edit files
  3. Full dev environments with autonomous agents (cloud or local)

Let’s look at concrete options in each category and how they handle error loops.


1. Editor copilots: great at fixes, weak at full automation

Editor-integrated AI tools are excellent at fixing specific errors, but most don’t fully automate the “run → fix → re-run until clean” loop for an entire project.

GitHub Copilot (VS Code, JetBrains, Neovim)

  • Strengths
    • Extremely good at:
      • Fixing individual LSP and TypeScript errors as you go
      • Suggesting refactors to satisfy strict tsconfig settings
      • Applying ESLint “rules of thumb” in code suggestions
    • With Copilot Chat, you can:
      • Paste tsc/ESLint output and ask: “Fix these errors”
      • Let it propose edits across multiple files
  • Limitations
    • No built-in automatic loop like:
      • “Run npm test → fix errors → re-run until green”
    • You still manually:
      • Run tsc or eslint
      • Feed the errors into chat
      • Accept/review the changes

Best use case: Semi-automated cleanup. You run tsc/ESLint, Copilot helps fix what you point it at, but the iteration is human-driven.


Cursor IDE (VS Code fork with AI focus)

Cursor is one of the closest editor-based tools to what you’re asking for.

  • Why Cursor stands out

    • Has powerful project-wide AI refactors
    • Can:
      • Read whole error logs (tsc, eslint)
      • Modify multiple files at once
      • Use “Continue running until tests pass” style workflows (depending on version/feature set)
    • Some users script a workflow:
      1. Run tsc/eslint in an integrated terminal
      2. Select errors and ask Cursor to “fix these until clean”
      3. Iterate manually by re-running the command
  • Limitations

    • Out-of-the-box, it doesn’t always:
      • Execute the full loop autonomously
      • Manage infinite/failing loops automatically
    • Still benefits from your supervision, especially on large refactors

Best use case: Editor-native solution for “almost automatic” error cleanup, especially in TypeScript/React projects.


Other editor copilots (Codeium, Tabnine, JetBrains AI, etc.)

  • Typically:
    • Improve error-fixing while you code
    • Don’t autonomously:
      • Run tsc or eslint
      • Parse outputs
      • Loop until the project is fully clean

They can help you fix LSP/ESLint/tsc errors quickly, but not fully automate the process end-to-end.


2. CLI/terminal AI agents: closer to true automation

If your goal is truly:

“Run one command, and let AI handle tsc + ESLint errors until the project is clean,”

you’re looking for tools that can run shell commands, read their output, edit your files, and repeat.

aider

aider is a terminal-based AI pair programmer designed for exactly this kind of loop.

  • How aider can work with tsc/ESLint

    • You can configure workflows like:
      1. Run tsc or npm run lint
      2. Paste the error output into aider or let aider read from files/logs
      3. Ask: “Fix all TypeScript and ESLint errors until tsc and eslint pass”
    • Aider will:
      • Edit multiple files
      • Re-run commands (with the right setup/flags)
      • Repeat until there are no errors or it can’t progress
  • Pros

    • Very good at:
      • Large TypeScript refactors
      • Complex cross-file type issues
      • Aligning code with strict tsconfig and ESLint rules
    • Keeps a clear record of diffs so you can review changes
  • Cons

    • Requires:
      • Some setup and familiarity with CLI
      • You to define the loop or use scripts/wrappers
    • Not a full zero-touch solution; you still supervise runs and confirm major changes

Best use case: Developers comfortable with the terminal who want as close as possible to “auto-fix until tsc/ESLint passes,” with strong control and auditability.


OpenAI’s “o3” style agents & custom scripts

If you’re comfortable building a small wrapper, you can use an LLM (like OpenAI’s o3 or similar reasoning models) to implement your own error-iteration loop:

  1. Write a script (Node, Python, or shell) that:

    • Runs tsc --pretty false and eslint .
    • Captures the output into a log file
    • Sends:
      • The log
      • Relevant source files
      • Your tsconfig.json, .eslintrc, package.json to the model via API
    • Applies the model’s patch suggestions to your repo
    • Re-runs the checks
  2. Stop criteria

    • No errors
    • A max number of iterations
    • Or when errors stop changing (stuck condition)

This is essentially building your own AI dev agent that can iterate until the project is clean.

  • Pros
    • Highly customizable:
      • Can target only TypeScript errors
      • Or only ESLint issues
      • Or only certain directories
    • You control:
      • Safety checks
      • Commit strategy (e.g., commit each iteration)
  • Cons
    • Requires:
      • Engineering effort to set up
      • Careful prompt + context management to avoid destructive changes

Best use case: Teams willing to invest in a custom “AI linter fixer” pipeline that runs locally or in CI.


Other CLI agents (e.g., Continue CLI, custom LangChain/AutoGen agents)

Many “agent framework” tools can be programmed to:

  • Run commands like pnpm lint and pnpm typecheck
  • Parse error output
  • Edit files
  • Loop

But out-of-the-box:

  • They’re frameworks rather than polished “push button and fix my TypeScript” tools.
  • You’ll need to write your own agent logic to make them robust in real projects.

3. Autonomous dev environments and AI platforms

Several solutions aim to act like “AI developers” inside a full environment—these can, in theory, run LSP/ESLint/tsc and iterate automatically.

Devin-like or “AI engineer” platforms

Tools in this emerging category (commercial “AI engineer” products) often demonstrate:

  • Cloning a repo
  • Running npm install
  • Running npm run lint / npm run build
  • Fixing errors until the project builds

However, there are important caveats:

  • Availability
    • Many are:
      • Not generally available
      • In closed beta
      • Very expensive
  • Control
    • They can:
      • Make wide-ranging changes
      • Require careful review before merging into production
  • TS/ESLint support
    • Most rely on running your existing commands, so:
      • If you can run tsc and eslint, so can they
      • Looping until clean is possible, but reliability on large codebases varies

Best use case: Experimenting with a “hands-off” AI developer on non-critical or well-tested codebases, where the cost and access model make sense.


Cloud-based AI IDEs and code workspaces

Some browser-based AI IDEs integrate:

  • File editing
  • Terminal
  • Tests/build commands
  • AI agents that can:
    • Run npm test, npm run lint, tsc
    • Fix issues
    • Re-run until error-free

Again, the reality:

  • They can do this in principle, but:
    • Success heavily depends on:
      • Project size and complexity
      • Model quality
      • How well your scripts and errors are surfaced
    • They still require your oversight and review

What about LSP errors specifically?

LSP (Language Server Protocol) errors are often:

  • The same issues that tsc reports
  • Or editor-only diagnostics from ESLint or TypeScript

AI tools don’t usually “hook into LSP” directly. Instead, they:

  • Read files and config
  • Use their own understanding of TypeScript + ESLint rules
  • Optionally read command output from:
    • tsc
    • eslint
    • Editor integrated tasks

So, if your editor shows LSP errors, practically speaking you want tools that:

  • Can see the same files & configs
  • Respond to your prompts like:

    “Fix all TypeScript errors shown in my editor for this project”

  • Or use CLI-based checks as the “source of truth”

Practical workflows to “clean a project” with AI

Regardless of which tool you pick, these workflows tend to work best for cleaning up LSP/ESLint/tsc errors:

Workflow 1: Semi-automatic cleanup in your editor

Works well with: Cursor, GitHub Copilot, JetBrains AI

  1. Run:
    pnpm lint && pnpm typecheck
    # or
    npm run lint && npm run typecheck
    
  2. Copy the error output into your AI chat panel.
  3. Prompt:

    “Fix all these TypeScript and ESLint errors. You may modify any files in the project, but please keep changes minimal and don’t relax ESLint/TypeScript rules unless strictly necessary.”

  4. Apply the suggested edits.
  5. Re-run the commands.
  6. Repeat until clean.

Not fully automatic, but in practice, 2–3 loops often clean most issues.


Workflow 2: Terminal-driven iteration with aider

Works well with: aider

  1. Start aider in your repo:
    aider .
    
  2. In aider, instruct:

    “We’re going to clean all TypeScript and ESLint errors. Use pnpm lint and pnpm typecheck to find issues. Keep running them and fixing all errors until both commands pass or you’re stuck.”

  3. Let aider:
    • Run the commands
    • Edit files
    • Repeat
  4. Periodically:
    • Review diffs
    • Commit accepted changes

This is one of the closest available experiences to a “push-button, iterate until clean” loop.


Workflow 3: Custom CI/CLI AI fixer

Works well with: teams building internal tools

  1. Create a fix-errors.ts or fix-errors.py script that:
    • Runs tsc + eslint
    • If there are errors, sends them + relevant code to an AI API
    • Applies patches
    • Loops with a max iteration count
  2. Run locally or in CI:
    node scripts/fix-errors.js
    
  3. Use git diff and code review to approve changes.

This gives you maximum control and repeatability, at the cost of some initial engineering effort.


Limitations and risks to keep in mind

Even the best AI coding tools that can iterate on LSP/ESLint/tsc errors automatically until the project is clean have important constraints:

  • Infinite or unproductive loops

    • A tool might:
      • Fix one error
      • Introduce another
      • Bounce between states without fully resolving issues
  • Overly aggressive fixes

    • To make tsc and ESLint happy, AI might:
      • Loosen types excessively (any everywhere)
      • Disable ESLint rules
      • Delete code that seems unused
  • Context limits

    • Very large repos with complex monorepos may exceed token/context limits, making it hard for the AI to see enough of the project at once.
  • Tooling alignment

    • Tools work best when:
      • Your TypeScript and ESLint configs are clean and conventional
      • Scripts like npm run lint and npm run typecheck are well defined

Always keep:

  • Version control (git) with frequent commits
  • Code reviews to prevent regressions
  • Automated tests to catch behavioral changes, not just type/lint errors

Summary: which AI tools actually do this well?

If you’re choosing specifically based on “Which AI coding tools can iterate on LSP/ESLint/tsc errors automatically until the project is clean?”:

  • Best editor-native experience

    • Cursor: strong project-wide refactors and error-driven fixes, semi-automated iteration
    • GitHub Copilot + Copilot Chat: great assistance, but you drive the iteration loop
  • Best CLI/agent experience

    • aider: terminal-based AI that can run commands, read errors, edit files, and iterate—closest to “auto-fix until clean” for TypeScript + ESLint
    • Custom agent with an LLM API (e.g., o3 reasoning models): can be built to exactly match your workflow and run tsc/ESLint in a loop
  • Autonomous platforms

    • Emerging “AI engineer” tools and cloud dev environments can, in principle, do this, but they are often:
      • Beta/experimental
      • Expensive
      • Best used under close supervision

For most teams today, the pragmatic path is:

  • Use Cursor or Copilot for interactive cleanup in the editor, and
  • Combine that with aider or a custom agent when you need more fully automatic iteration across a large TypeScript/ESLint codebase.