Agentic Editor · Study Guide

Mega Interview Q&A Bank: Agentic Coding Editors

This is the capstone question bank for the 16-section guide. It pulls the strongest, deduped questions from every section, then adds 25+ cross-cutting questions (marked ⚡) that span subsystems — the ones interviewers use to separate people who memorized a chapter from people who understand the system. Answers are deliberately tight; the section files carry the long-form reasoning.


1. Fundamentals

Q. Why can't an editor just store a file as a flat string? A single-char insert is O(n) — every byte after the cursor shifts, so typing in a large file blows the 16 ms frame budget. Editors use a rope (balanced tree, O(log n) edits, cheap immutable snapshots — Zed, CodeMirror) or a piece table (append-only buffers + ordered spans, characters never move, undo nearly free — VS Code's piece tree). Goal: edit cost independent of file size.

Q. Why does VS Code run extensions out-of-process? Three reasons: responsiveness (extension CPU can't block the renderer's typing loop), stability (an extension crash takes down the Extension Host, not the editor; unsaved buffers survive in the renderer), and API discipline (because extensions are remote, the whole API is async over IPC — no synchronous call can stall rendering). Every chat panel is a sandboxed webview that must go through WorkspaceEdit to mutate files.

Q. Fork vs. extension — what's the decision rule? Fork when your differentiation lives in the editing surface (inline apply, Tab edits, custom diff UX — Cursor, Windsurf). Build an extension when your differentiation is the model/backend and reach matters (Copilot, Continue, Cline). Forking buys total UX control but costs a permanent monthly rebase tax against upstream VS Code. Claude Code/Aider dodge it entirely as terminal+Git tools; Zed went native.

Q. LSP vs. Tree-sitter — when does each fire and why both? Tree-sitter runs in-process, every keystroke, sub-millisecond, tolerates broken code via ERROR nodes — syntactic questions (structure, brackets, chunking). LSP runs out-of-process, slower, answers semantic project-wide questions (types, cross-file definitions, real diagnostics). They're complementary: paint with Tree-sitter instantly, refine with LSP semantic tokens a beat later. LSP also solves the M×N editor×language explosion → M+N via one JSON-RPC protocol.

⚡ Q. A user reports typing lag only when the AI agent is "thinking." Walk through every layer that could be at fault and how the architecture should prevent it. The prime directive is that nothing on the keystroke→paint path may do I/O, call a model, or run unbounded CPU. If typing lags during agent work, the seam leaked. Check: (1) is the agent running on the renderer thread instead of a separate process/worker? (2) Is suggestion rendering mutating the buffer instead of drawing non-destructive decorations/ghost text? (3) Is a synchronous LSP or apply call blocking? (4) Is the buffer a flat string, so a large agent patch is O(n)? (5) Is the agent's multi-file edit landing as 200 keystroke-sized transactions instead of one undoable WorkspaceEdit? The fix at each layer: off-thread the model work with cancellation tokens, render as decorations, keep edits async, use a rope/piece-tree, and batch the patch into one transaction applied bottom-up by offset.


2. Retrieval & Indexing

Q. Why not just paste the whole repo into a 1M-token window? Scale (real monorepos are 10M+ tokens), cost (you pay per input token every turn), and quality/latency ("lost in the middle" degrades reasoning and TTFT grows with input length). 8K tokens of exactly-right code beats 200K of mostly-irrelevant code.

Q. Fixed-window vs. AST-aware chunking? AST/Tree-sitter chunking on function/class boundaries — each chunk is a coherent unit with symbol+line metadata. Fixed windows are simple but slice a signature from its body, producing semantically broken vectors. Split oversized functions, pack tiny siblings.

Q. Explain hybrid retrieval and the retrieve-then-rerank funnel. Run dense (embedding/ANN, semantic) and sparse (BM25/ripgrep, exact identifiers and error strings) in parallel, fuse with Reciprocal Rank Fusion. Then a cross-encoder reranker scores ~100 candidates jointly to pick the final ~10. The funnel exists because cross-encoders are accurate but too slow to run over millions of chunks; cheap ANN narrows first.

Q. How does Merkle-tree sync avoid re-embedding everything? Hash each file, hash hashes up the directory tree to a root. Diff local vs. indexed roots; only subtrees with changed hashes contain changed files, so you re-embed O(changes), not O(repo). Same trick as Git/Dropbox; Cursor described it publicly.

Q. Cursor's privacy model for server-side indexing? Embed server-side for speed but store only vectors + obfuscated relative paths, never plaintext at rest. At query time the server returns chunk identifiers (path + line range) and the client reads the actual files locally to assemble the prompt.

⚡ Q. Indexing and the apply model are usually discussed separately. How do they actually interact, and where's the failure? Retrieval picks where to edit; apply executes the byte mutation there. The coupling failure is staleness: the index lags the working tree during heavy editing, so retrieval surfaces a chunk at lines that have since moved — and a line-number-based apply then corrupts the file. Two design choices break the coupling: (1) layer live ripgrep over the stale vector index so exact matches reflect the current tree, and (2) use content-anchored search/replace edits so apply re-locates its target by content and fails loudly if it moved, rather than trusting retrieval's line numbers. The lesson: retrieval freshness and edit-anchoring are the same problem viewed from two ends.


3. Completions / Tab

Q. Why can't you use a chat model for inline autocomplete? Code is edited bidirectionally — you insert in the middle of functions. The model must condition on prefix AND suffix via Fill-in-the-Middle and sentinel tokens (<fim_prefix>/<fim_suffix>/<fim_middle>). A chat model fed a FIM hole writes prose or duplicates the suffix, and is far too slow for a 150–300 ms budget. Autocomplete uses small (1–7B), FIM-native models.

Q. What does the contextual filter model do and why is it separate? A lightweight classifier decides whether to show a candidate (features: language, mean log-prob, leading chars, recent acceptance). It's separate because suppression is a cheap binary decision protecting the north-star metric — a wrong suggestion is worse than none, costing attention and eroding trust. Tuning the show/hide threshold from telemetry doesn't require retraining the generator.

Q. How is Cursor Tab different from Copilot ghost text? Copilot answers "what text goes at the cursor?" Cursor Tab predicts the developer's next edit anywhere nearby — including modifying/deleting existing code — and predicts a cursor jump to the next location, so repeated Tab rides you through a refactor. It conditions on recent edit history, not just static file state.

Q. What's "neighboring tabs" and why does it sometimes matter more than the model? Copilot pulls relevant snippets from your other open tabs/recent files into the prompt, scored by cheap token overlap. Most completion quality comes from context selection, not model size — the model can only complete processOrder( if its definition is in the prompt. Better context routinely beats a bigger model on acceptance rate.

⚡ Q. Trace exactly what happens, end to end, the moment I press Tab to accept a completion. (1) Client logs an acceptance event with prompt-hash and context features. (2) The ghost text is committed into the buffer as a real edit, reindented to the cursor context and de-duped against the suffix so it doesn't double a brace already present. (3) If it's a next-edit model, it may immediately offer a cursor jump to the next predicted edit location. (4) The in-flight speculative request for the next completion (if any) is reconciled or cancelled. (5) Telemetry — shown/accepted plus eventual characters-retained-after-N-seconds — flows back to tune the contextual-filter threshold, reweight prompt assembly, and feed offline fine-tuning. Acceptance rate is simultaneously the scoreboard and the training label: the data flywheel.


4. Agents & Tools

Q. Walk through one iteration of an agent loop. Build a request from system prompt + tool definitions + message history. Call the model. It returns plain text (done — exit) or a tool_use block. The harness, not the model, parses and executes the real function, captures output, appends it as a tool_result keyed to the tool_use_id, and calls the model again with the longer transcript. Repeat until no tool call or a budget trips. The model is a function history → next action; the harness is the while loop.

Q. Why are tool error messages part of the contract? There's no human in the loop each turn — the model recovers from failures using only the tool's output. "Error: edit failed" gives it nothing; "search string not found; file changed; here are 3 closest matches with line numbers; re-read and retry" lets it self-correct next turn. Well-designed errors turn fatal failures into routine recovery, raising the whole agent's success rate.

Q. Thin harness vs. heavy scaffolding — which and why? Thin (Claude Code): few general tools, big system prompt, trust the model. Heavy: forced plan/execute/review phases, validators, state machines. Heavy wins today on determinism and lets you use cheaper models; thin gets better for free with every model upgrade (the "bitter lesson") and carries fewer brittle assumptions. Default thin for frontier models, scaffold surgically only where telemetry shows reliability problems.

Q. What are sub-agents and when do you use one? A fresh agent loop with its own context window, spawned for a scoped, noisy subtask (e.g. "find every call site of parseConfig"), returning only a condensed result. The win is context isolation — dozens of file-reads don't pollute the main context. Cost: extra tokens and coordination.

Q. Why prefer run_terminal_cmd over many specialized tools, and the cost? A shell is universal — compose git status, tests, lint without separate tool definitions, lowering token cost and selection mistakes (keep tools under ~15–20). Cost: a raw shell is hard to sandbox/permission and is the prime prompt-injection target, so security-focused products narrow it back with allow/deny lists.

⚡ Q. Two harnesses run the identical frontier model; one scores 15 points higher on SWE-bench. With identical weights, what differs? Everything in the harness/tool layer — which is the point: action space matters as much as the model. Likely: (a) edit format (search/replace vs. unified diff vs. dedicated apply model — Aider's data shows this alone moves success rates); (b) error-feedback quality (does a failed edit return the current file + near-misses?); (c) output truncation (does the loser drown its own context in raw logs?); (d) search quality (semantic+lexical vs. grep-only); (e) loop policy (turn caps, parallelism, whether it runs tests to verify). When an agent underperforms, profile the harness before blaming the model.

⚡ Q. How does the agent loop interact with prompt caching, and how can a naive loop accidentally destroy 5–10× of cost savings? Each turn re-sends the whole transcript, so cost grows ~quadratically; prompt caching of the stable prefix (system + tools + early history) is the #1 mitigation. The trap: caching is exact-prefix matching. If the loop injects anything volatile early — a live timestamp, a fresh random request ID, reordered retrieval results, or a tool list that re-sorts — the first differing byte invalidates the entire cache every turn, silently 5–10×-ing cost and TTFT. Fix: freeze the prefix, push all volatility (new message, fresh retrieval) to the tail, and verify with the API's cache_read_input_tokens field.


5. Apply / Edits

Q. Why not just have the model output a unified diff like git? Models are bad at the arithmetic. Hunk headers (@@ -41,7 +41,9 @@) encode exact line counts; miscount the context by one and the patch won't apply, and line numbers drift the moment surrounding code shifts. Tools that accept diffs (Aider, OpenAI's apply_patch) survive by ignoring the headers and fuzzy-matching context lines. Content-based formats sidestep the arithmetic entirely.

Q. What is the unique-match requirement and why does it matter? In search/replace and str_replace, the find text must match exactly one location. Zero → can't locate. More than one → ambiguous, you'd corrupt the wrong copy. So the matcher errors on non-uniqueness, forcing the model to include enough anchor context. It converts a positional problem into a content-uniqueness contract.

Q. Explain the lazy-edit + fast-apply two-model architecture. The frontier model emits only changed regions, eliding the rest with // ... existing code ... — cheap, few output tokens, good at intent. A smaller fine-tuned apply model takes (original file + lazy sketch) → full merged file — pure mechanical splicing. Division of labor by cost/skill: expensive model does hard reasoning with few tokens; cheap model does easy reasoning with many tokens.

Q. How does speculative decoding make apply near-instant? Apply output is mostly identical to the input file, so you speculate the next tokens equal the original's, verify a whole run in one parallel pass, and only pay per-token cost where the file actually changed. Acceptance rates are huge → Cursor reported ~1000 tok/s, ~10× naive generation. Output distribution is provably unchanged — pure latency win.

⚡ Q. The lazy-edit format is what makes fast apply cheap, but it's also a footgun. Connect that single design choice to a data-loss bug and to a training-data strategy. The same elision (// ... existing code ...) that saves tokens can be interpreted too aggressively by the apply model and delete real code. This connects three subsystems: (1) apply must validate post-merge with a tree-sitter parse + a deletion-size guard + structural hash of regions that should be untouched; (2) diff/VCS review surfaces the Myers diff so a human catches large unexpected deletions before the write lands; (3) training specifically fine-tunes the apply model to treat placeholders as verbatim "copy from original," and logs validator rejections as a training/eval signal. One cheap encoding decision ripples into validation, review UX, and the training corpus.


6. Inference

Q. Why do prefill and decode have different bottlenecks? Prefill processes all prompt tokens in parallel → saturates matrix-multiply units → compute/FLOP-bound, sets TTFT. Decode generates one token at a time, streaming all weights + the growing KV cache out of HBM with tiny arithmetic → memory-bandwidth-bound, sets tokens/sec. Optimizations differ: prefill loves caching/prefix-sharing; decode loves speculative decoding and quantization. Some systems disaggregate them onto separate GPU pools.

Q. What is the KV cache and why does it limit serving? It caches attention keys/values for every seen token so you don't recompute each step. It lives in fixed GPU HBM and grows linearly with context (several GB for long coding contexts), so its size caps how many requests you can batch — capping throughput and driving cost. PagedAttention (vLLM) pages it OS-style for near-zero fragmentation + prefix sharing; continuous batching schedules at the token level to keep GPUs saturated.

Q. Why not use the best frontier model for everything? Cost (10–100× more) and latency (lower tokens/sec, higher TTFT). Most traffic — completions, simple applies — is high-volume/low-difficulty and perfectly served by a 1–7B specialized model at sub-200 ms. A flat subscription only stays profitable if the median request is cheap, so you route: tiny models hot-path, mid-tier easy chat, frontier for the hard reasoning tail.

⚡ Q. The same trick — speculative decoding — shows up in three sections (inference, apply, training). Explain the one underlying idea and its three faces. The idea: decode is sequential and memory-bound, leaving GPU compute idle; you can propose multiple tokens cheaply and verify them in one parallel pass, accepting any that match, with provably identical output distribution. Three faces: (1) Inference — a small draft model proposes k tokens for a big target (2–3× faster decode). (2) Apply — "prompt-lookup" speculation drafts by literally copying spans from the input file, hitting ~1000 tok/s because edits are mostly copies. (3) Training/serving — Medusa/EAGLE add prediction heads to the same model so no separate draft is needed. One principle, applied wherever output is predictable.


7. Safety

Q. Why can't you just "tell the model" to ignore injected instructions? The model has no principled way to separate instructions from data — they're all tokens in one context window. A system prompt saying "ignore malicious instructions" is itself just text a clever injection can out-argue. The real defense is architecture: restrict capabilities (egress), require human approval on consequential actions, sandbox, label provenance. Design assuming injection will sometimes succeed.

Q. What is the lethal trifecta and how do you defend it? Three capabilities that together enable exfiltration: private data access + exposure to untrusted content + ability to communicate externally. Any one is safe; all three is catastrophic. Cleanest defense: remove a leg — usually egress restriction (agent can only reach the model API and registries, so stolen data has nowhere to go). Stack with sandboxing, provenance labeling, and human gates on outbound actions.

Q. Which actions auto-approve vs. gate? By blast radius and reversibility. Read-only/local (read, grep, list) auto-approve — they can't hurt you and gating them creates approval fatigue. Writes are gated but low-stakes because git makes them reversible (batch-approve diffs). Shell and network egress get the hardest gate (bash is a universal escape hatch + the exfiltration channel). Special-case rm -rf, force-push, DROP TABLE to confirm/block even in auto modes.

⚡ Q. A user complains about too many approval prompts and wants to allowlist bash. Why is "approval fatigue" itself a security bug, and what do you do? Over-prompting trains users to click "approve" blindly, so the rare dangerous prompt gets rubber-stamped — over-prompting is a security failure, not just UX friction. But allowlisting all of bash reopens the entire attack surface including exfiltration. The fix: (1) auto-approve the safe read-only ops generating most prompts; (2) offer pattern-scoped allowlists (npm test, git status, edits under src/**) not whole-tool; (3) keep dangerous patterns and network gated; (4) run under an OS sandbox (seccomp/Landlock/Seatbelt) so you can safely auto-run more because the kernel bounds the blast radius. Make prompts rare and meaningful.


8. Evaluation

Q. Why is SWE-bench better than HumanEval for agents? HumanEval grades single-function synthesis from a docstring — narrow, saturated (90%+), contaminated. SWE-bench gives a real GitHub issue + actual repo, requiring multi-file navigation, tool use, and a patch passing the project's real FAIL_TO_PASS + PASS_TO_PASS tests in Docker isolation. It evaluates the whole agentic loop. SWE-bench Verified (500 human-validated instances) removes broken/underspecified tasks — the number vendors quote.

Q. pass@k vs. pass@1? pass@1 reflects everyday experience (one shot). pass@k (k=10,100) reflects potential with a perfect verifier. Quoting high pass@100 to imply day-to-day quality is misleading. Report pass@1 (or the actual k your product samples) for product decisions.

Q. Why is "cost per resolved task" better than raw resolve rate? Resolve rate ignores economics. 65% at $2.50/success beats 70% at $18/success — normalize cost by success, not attempt. Token cost and latency directly bound how aggressive a loop you can ship.

Q. LLM-as-judge pitfalls and mitigations? Position bias (favors first answer → swap order and average), verbosity bias (favors longer → binary checklists), self-preference (rates own family higher → cross-family/ensemble judge). Prefer pairwise over Likert, calibrate against human labels and report agreement, and use execution-based grading wherever a test can decide it.

⚡ Q. Acceptance rate appears as both a product metric (completions), a training signal (RLHF), and an eval metric. What's the one failure mode that poisons all three, and how do you defend it? Reward/metric hacking via "plausible but wrong." Users accept completions that look right, so: as a product metric it overstates quality; as a training label it teaches the model to produce "acceptable-looking" code rather than correct code; as an eval it greenlights a regression. The single defense that fixes all three is pairing acceptance with survival/retention — what fraction of accepted code is still present after N seconds/edits — plus execution verification (did it compile/pass tests) where possible. Accept-then-immediately-delete is a false positive everywhere it appears.


9. System Design

Q. Why route through a server-side proxy even in privacy mode? Protect vendor API keys (clients get session tokens), centralize model routing and prompt caching, enforce per-plan rate limits and abuse prevention, collect telemetry/run A/B tests, and host vendor-owned models (fast-apply, Tab). "Privacy mode" means zero-retention — code transits the proxy in memory under no-train agreements — not "code never leaves the machine."

Q. How do you keep inference workers stateless when chat/agents are stateful? LLM inference is stateless — you replay full context each call, so any worker serves any request. State (conversation history, agent run progress, repo index) lives in external stores: Redis (sessions/rate limits), Postgres (metadata), object storage (checkpoints), vector DB (index). Workers stay fungible; agent runs become resumable via persisted checkpoints.

Q. Why separate indexing from inference? Opposite resource profiles. Inference is GPU-bound, spiky, latency-critical (scale on GPU util, continuous batching). Indexing is CPU/IO-bound, throughput-oriented, bursty on repo open (scale on queue depth). Coupling means an indexing surge starves latency-sensitive inference.

⚡ Q. Design the full request path for "fix this failing test" in a forked-VS-Code product, naming which subsystem owns each hop. (1) Editor core captures the goal, snapshots touched files for checkpoint/undo. (2) Backend proxy starts an agent run with a trace ID, builds the prompt with a frozen cache prefix. (3) Retrieval (indexing service) does hybrid search + rerank to find the test and implicated code; LSP/Tree-sitter supplies exact definitions. (4) Agent loop (ReAct) reads files, edits via apply (search/replace → fast-apply model with speculative decode), runs the suite via the execution/sandbox service (PTY, ANSI-stripped, truncated output). (5) Diagnostics/exit code feed back as observations; loop until green or a budget trips. (6) Diff/VCS computes a histogram diff, surfaces per-hunk accept/reject as the trust surface; on accept, partial-stage and generate a commit message. (7) Safety gates the test run and any push; tracing records every LLM/tool/apply span for cost attribution. Each hop is a different chapter — the system is the integration.

⚡ Q. ⚡ Where does the same data — your source file — physically live and travel across the whole system, and what's the privacy boundary at each stop? The plaintext buffer lives locally in the editor core (rope/piece-tree). For retrieval, in Cursor's model only embeddings + obfuscated paths go server-side; plaintext is re-read client-side at query time. For chat/agent, the relevant slice transits the proxy in memory to the model provider under zero-retention terms — it does leave the machine. Diagnostics fed to a cloud model leak snippets. The index must skip .gitignore/.cursorignore files and .env so secrets never embed. Local-first setups (Continue+Ollama, on-prem Sourcegraph, JetBrains on-device completion) keep everything local at a quality cost. The boundary is drawn in the editor core's context-assembly step — architecturally the right place because it owns the buffer.


10. Cross-Cutting Rapid-Fire ⚡

⚡ Q. Three subsystems independently treat tool/file/web output as "untrusted data, not instructions." Name them and the shared principle. Tool design (section 6), the agent loop (5), and safety (13) all say it; MCP (12) adds tool descriptions as a surface ("tool poisoning"). Shared principle: the model can't distinguish instructions from data in one context window, so anything that arrives as data — file contents, fetched pages, tool results, tool descriptions — must be assumed potentially adversarial and never auto-trigger a side effect.

⚡ Q. "Lost in the middle" affects context management, retrieval ordering, and long-context training. How does one phenomenon drive three design choices? Transformers attend in a U-curve (best at edges, sags in the middle). Context management → put authoritative content front, the decisive question/file last, and "sandwich" critical instructions. Retrieval → rerank so the best chunks land at the prompt edges, not buried mid-context. Training → use repo-level FIM and RoPE scaling so the model is trained on long multi-file documents rather than stretched at inference, and prefer the right 8K tokens over a noisy 200K.

⚡ Q. Reconciliation (file changed under the agent) touches the editor core, the apply model, and VCS. Give the unified answer. Detect drift via hash/document-version snapshot at read time; before writing, compare. On mismatch, three-way merge (base = what the agent read, ours = disk now, theirs = the agent's result) — non-overlapping changes merge, overlaps become conflicts. Encode edits as content-anchored search/replace so they're position-independent and fail loudly if the target moved. The philosophy spanning all three subsystems: fail visibly rather than apply wrongly — a rejected edit beats a silent miswrite.

⚡ Q. Why do terminal agents (Claude Code, Aider) skip inline FIM autocomplete entirely, and what does that reveal about product architecture? Their interaction granularity is a whole task, not a keystroke — there's no caret to complete in real time. This reveals that the subsystem set you build is downstream of your interaction model: keystroke-granularity products (Cursor, Copilot, Zed, JetBrains) invest heavily in FIM models, the sub-300ms latency pipeline, and contextual-filter suppression; task-granularity products invest in the agent loop, edit formats, and Git checkpointing instead. Same goal (AI-assisted coding), orthogonal infrastructure.

⚡ Q. MCP, LSP, and DAP are all "M×N → M+N via JSON-RPC." Why does the same pattern keep recurring, and what's MCP's unique risk? Standardizing a protocol so M clients × N providers collapses to M+N is the classic interoperability flywheel (also HTTP). It recurs because the cost of bespoke integrations is quadratic and a good-enough open standard wins on network effects. MCP's unique risk: unlike LSP (which only navigates code locally), an MCP server can be arbitrary third-party code with the user's permissions and side effects — hence tool poisoning, rug pulls, confused-deputy, and token-bloat from injecting every tool schema each turn. The protocol is uniform; the trust/scoping/context-budget policy is where the engineering lives.


11. Behavioral & "Why did they build it this way?"

Q. Why did Cursor fork VS Code instead of shipping an extension, and what would you have asked before committing? Because "what it feels like to apply an AI edit" is the product — inline animated diffs, Cmd-K, Tab next-edit prediction all require control below the extension API. I'd have asked: is our differentiation in the editing surface or the backend? What's our team's appetite for a permanent monthly rebase tax? Can we isolate custom patches behind clean seams so rebases stay survivable? If the answer to differentiation is "backend/model," an extension's reach beats the fork's control.

Q. Why did Claude Code bet on a thin harness when heavy scaffolding scored better at the time? The "bitter lesson": general methods that ride compute/model improvement beat hand-engineered structure over time. Heavy scaffolding wins on a fixed model but actively fights a strong one and ages badly; a thin harness improves for free with every model upgrade. The bet is on the trajectory of model capability, not the current snapshot. The discipline is to start thin, instrument failures, and scaffold only where you've measured a reliability problem.

Q. Tell me about a tradeoff where the "obviously correct" technical answer is wrong in production. Maximizing context. The naive instinct is "more relevant code = better answers," but context rot means marginal tokens degrade reasoning, raise cost, and trigger lost-in-the-middle. The production-correct move is "less but right" — hard reranking, small top-k, just-in-time tool retrieval — and you detect the failure by running evals that vary top-k and watching accuracy peak then decline. The metric that looks like a knob to turn up is actually a curve with an optimum.

⚡ Q. The industry migrated from "context stuffing" to "lean prompt + tools + just-in-time retrieval." What changed, and what's the risk of over-rotating? What changed: frontier models got good enough at tool use and long-horizon reasoning that they navigate a repo more precisely than a blind top-k embedding dump, and context rot became a recognized first-class failure mode. The risk of over-rotating to pure agentic search: more LLM round-trips (latency, token cost) and the agent can wander or get lost. The mature answer is a hybrid — a small high-signal pre-retrieval (the active file, @-mentions) so the first turn isn't blind, then tools to pull more JIT. It's a latency-vs-quality dial tuned per surface: inline completion needs stuffing for speed, agentic editing favors JIT.

⚡ Q. If you joined one of these teams tomorrow and could fix one thing, where's the highest leverage, and how would you defend the choice? I'd profile before deciding, but my prior is the harness/tool layer (error messages, edit format, truncation, retrieval quality) over the model — because two harnesses on the same weights can differ 15+ points on SWE-bench, and harness fixes ship without retraining. I'd defend it with sliced telemetry: instrument apply-success by failure class, agent success by language/repo-size, and cost-per-resolved-task; then attack the biggest bucket. The throughline of this whole guide is that the integration is the product — the model is necessary but the seams are where it's won or lost.

Built from Markdown · 22 pages · Read it aloud and burn it in.