mech.app

The mech.app newsletter

Agentic AI, minus the noise.

Get practical field notes on AI agents, automation, developer tools and security delivered to your inbox.

No spam. Unsubscribe anytime.

Security

20-50x Faster Shipping: What One Engineer's AI Workflow Reveals About Editor-Free Agent Orchestration

How moving AI out of the editor and into a two-agent review loop changes context boundaries, diff management, and cross-stack velocity.

Source: news.ycombinator.com
20-50x Faster Shipping: What One Engineer's AI Workflow Reveals About Editor-Free Agent Orchestration

A developer posted a 270-point HN thread claiming 20-50x productivity gains by moving AI out of the editor and into a two-agent browser workflow. The claim is bold, but the architecture is simple: one agent builds, one agent reviews, and both operate on full file context instead of cursor snippets.

The interesting part is not the speed number. It is the orchestration shape and what it reveals about context boundaries, diff handoffs, and failure modes when you separate reasoning from the IDE.

The Two-Agent Loop

The workflow uses two browser tabs (ChatGPT, Claude, or similar) and a terminal. No plugins, no LSP integration, no inline completions.

Agent 1: Builder

  • Receives entire files or modules (often cross-language).
  • Explains approach and tradeoffs before writing code.
  • Generates diffs or full rewrites based on explicit instructions.

Agent 2: Reviewer

  • Receives only the diff.
  • Looks for regressions, missing updates, signature mismatches, and subtle breakage.

The developer pastes code into the builder, gets a diff, pastes the diff into the reviewer, and manually applies changes. No file watchers, no automatic writes, no shared state between agents.

Why This Works (and When It Breaks)

Context Boundaries

Editor-integrated AI tools (Copilot, Cursor, Cody) operate inside a single file or a narrow window. They see the current buffer, maybe a few imports, and whatever the LSP can index. They optimize for low-latency completions, not cross-stack reasoning.

Moving AI into the browser lets you paste:

  • Multiple files from different languages (Swift, Objective-C, JavaScript).
  • Backend and frontend code in the same prompt.
  • Configuration, schema, and implementation together.

The tradeoff: you lose automatic context. You have to manually select what the agent sees. If you forget a dependency or a caller, the agent will not catch it.

Diff Handoff and State Management

The builder agent does not write files. It returns a diff or a rewritten block. The developer copies that into the editor and applies it manually.

This introduces a human approval gate, but it also creates a failure mode: if the diff is large or touches many files, manual application becomes error-prone. The developer has to track which changes were applied and which were skipped.

The reviewer agent mitigates this by checking the final diff, but it only sees what you paste. If you apply half the changes and forget to paste the rest, the reviewer will not know.

Cross-Stack Velocity

The biggest win is cross-boundary work. When a change spans Swift, Objective-C, and JavaScript, editor tools struggle because they do not share context across language servers. The browser-based agent sees all three at once.

Example flow:

  1. Paste Swift view controller, Objective-C bridge, and JavaScript API client.
  2. Ask the builder to add a new parameter to the API call and propagate it through all layers.
  3. The agent returns diffs for all three files.
  4. Paste the combined diff into the reviewer to check for missed call sites.

This works because the agent has full context. It breaks if the codebase is large enough that you cannot paste all relevant files into a single prompt (most models cap at 128k-200k tokens).

Failure Modes and Guardrails

Failure ModeCauseMitigation
Missed callersAgent does not see all files that import the changed functionPaste all known callers or use grep to find them before prompting
Partial applicationDeveloper applies some changes but not others, reviewer only sees partial diffAlways paste the full intended diff into the reviewer, not just what was applied
Context overflowCodebase too large to fit in a single promptBreak into smaller tasks or use a retrieval layer (vector DB, file chunker)
Stale diffsAgent generates a diff, developer edits files, then applies the diff on top of new changesApply diffs immediately or regenerate them after manual edits. Use git stash before applying diffs to avoid conflicts.
No rollbackManual application means no automatic undo if the change breaks testsUse Git branches and commit after each agent-generated change

The developer mentions “surgical edits” as a guardrail: instead of letting the agent rewrite entire files, ask for exact line numbers and changes. This keeps diffs small and reviewable, but it requires the developer to know the codebase well enough to guide the agent.

Observability and Debugging

There is no observability layer. The developer does not log prompts, track token usage, or measure agent accuracy. The workflow is entirely manual.

This simplicity is intentional: fewer moving parts means fewer failure modes. The developer relies on manual review and testing instead of automated metrics.

If something breaks:

  • The developer reads the diff.
  • The developer runs tests.
  • If tests fail, the developer pastes the error into the builder agent and asks for a fix.

This works for solo developers or small teams, but it does not scale. There is no audit trail, no way to replay a session, and no way to measure which agent (builder or reviewer) introduced a bug.

For production use, you would want:

  • Prompt logging (store every input and output).
  • Diff versioning (track which diffs were applied and when).
  • Test integration (automatically run tests after applying a diff and feed failures back to the agent).

Deployment Shape

The deployment is a developer’s local machine. No servers, no APIs, no orchestration framework. The “infrastructure” is:

  • Two browser tabs.
  • A terminal.
  • A text editor (used only to apply diffs, not to run AI).

This is the simplest possible agent orchestration: stateless, synchronous, human-in-the-loop. It works because the developer is the orchestrator.

If you wanted to automate this, you would need:

  • A file watcher to detect changes and trigger the builder agent.
  • A diff parser to extract changes and format them for the reviewer agent.
  • A merge tool to apply diffs automatically (with conflict resolution).
  • A rollback mechanism (Git integration or snapshot storage).

At that point, you are building Cursor or Copilot Workspace.

Code Example: Manual Diff Application

The developer does not share code, but the workflow implies something like this:

# builder_agent.py
import anthropic

client = anthropic.Anthropic(api_key="...")

def get_diff(files: dict[str, str], instruction: str) -> str:
    """Send multiple files to builder agent, get back a diff.
    
    Warning: This will consume tokens proportional to total file size.
    For large codebases, you may hit context limits (128k-200k tokens).
    Consider chunking or using a retrieval layer for production use.
    """
    context = "\n\n".join(f"// {name}\n{content}" for name, content in files.items())
    prompt = f"{context}\n\nTask: {instruction}\n\nReturn a unified diff."
    
    try:
        response = client.messages.create(
            model="claude-3-5-sonnet-20241022",
            max_tokens=8000,
            messages=[{"role": "user", "content": prompt}]
        )
        return response.content[0].text
    except anthropic.APIError as e:
        # Handle rate limits, context overflow, or API failures
        print(f"API error: {e}")
        return ""

def review_diff(diff: str) -> str:
    """Send diff to reviewer agent, get back a critique."""
    prompt = f"Review this diff for regressions, missing updates, or subtle bugs:\n\n{diff}"
    
    try:
        response = client.messages.create(
            model="claude-3-5-sonnet-20241022",
            max_tokens=4000,
            messages=[{"role": "user", "content": prompt}]
        )
        return response.content[0].text
    except anthropic.APIError as e:
        print(f"API error: {e}")
        return ""

# Usage
files = {
    "api.swift": open("api.swift").read(),
    "bridge.m": open("bridge.m").read(),
    "client.js": open("client.js").read(),
}

diff = get_diff(files, "Add a 'timeout' parameter to the API call")
print(diff)

critique = review_diff(diff)
print(critique)

# Developer manually applies diff and commits

No automation, no file writes, no state persistence. The developer is the glue.

Security Boundaries

The workflow has no explicit security boundaries. The developer pastes code into a third-party LLM (OpenAI, Anthropic, etc.), which means:

  • All code is sent to an external API.
  • The LLM provider can log prompts and responses.
  • If the code contains secrets (API keys, credentials), they are exposed.

This is the primary security risk. Every paste operation is a potential data exfiltration event. If you work on proprietary code, customer data, or anything covered by an NDA, this workflow violates most security policies.

For production use, you would need:

  • Secret scanning before pasting (regex or AST-based detection of API keys, tokens, passwords).
  • A self-hosted model (Llama, CodeLlama, or a fine-tuned variant running on your own infrastructure).
  • Prompt sanitization (strip comments, redact sensitive strings, remove PII).
  • Network isolation (block internet access from the agent runtime if using a local model).

The developer does not mention any of this, which suggests the workflow is used for side projects or non-sensitive code. If you handle production systems, customer data, or regulated environments, you cannot use this workflow without adding a security layer.

Additional risks:

  • Prompt injection: If the codebase contains user-generated content (comments, strings, config files), an attacker could craft a malicious prompt that tricks the agent into generating harmful code.
  • Model poisoning: If you fine-tune a model on your codebase, an attacker who gains access to your training data could inject backdoors.
  • Audit failures: No logging means no way to prove compliance with security policies or investigate incidents.

Technical Verdict

Use this workflow when:

  • You work solo or on a small team.
  • You need to make cross-stack changes that span multiple languages or frameworks.
  • You want full control over what the agent sees and what gets applied.
  • You trust yourself to manually review and test every change.
  • You work on non-sensitive code (side projects, open-source, or internal tools with no compliance requirements).

Avoid this workflow when:

  • You need audit trails, observability, or compliance (no logging, no replay).
  • You work on a large codebase (context limits will force you to break tasks into tiny pieces).
  • You want automation (this is entirely manual).
  • You handle sensitive code (no secret scanning, no isolation, all prompts sent to third-party APIs).
  • You work in a regulated environment (healthcare, finance, government) where data exfiltration is a compliance violation.

Best for: Solo full-stack engineers working across multiple languages on non-sensitive projects. Not suitable for teams requiring audit trails, compliance, or security isolation.

The 20-50x claim is hard to verify, but the architecture is sound for a specific use case: a developer who knows the codebase well, works across multiple languages, and prefers explicit control over automatic tooling.

If you want to scale this, you are building an orchestration layer. At that point, evaluate whether Cursor, Copilot Workspace, or a custom MCP server fits better than two browser tabs.