Question bank
Interview Questions — Harness Engineering
75 questionsWhat the provenance labels mean
In this bank
Round: GenAI/LLM depth (required) · GenAI system design (required) · project follow-ups · agent-platform and AI-infrastructure roles Provenance: every section below is labelled Common industry pattern (topics that recur in agent-engineering discussions) or Generated practice. None is verified as asked by a named company. The term “harness engineering” is recent (early 2026) and attribution is disputed, so wording varies: expect “agent infrastructure” or “agent scaffolding” too. Priority: ★★★ expect it · ★★ common · ★ a differentiator for senior or platform roles. These stars are our judgment, not data. How to use: answer aloud for 60 to 90 seconds, then compare with the key points. The lessons are in the Harness engineering module, and the drills are in Harness engineering: interview drills Open the course to learn this.
A. Fundamentals
Provenance: Common industry pattern. Teaching: What is an agent harness? Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| A1 | ★★★ | What is an agent harness?Label: Common industry pattern | Everything around the model that makes it an agent: loop, tools, state, sandbox, permissions, verification, orchestration, observability. Agent = model + harness. | Why is a model alone not an agent? |
| A2 | ★★★ | What is harness engineering?Label: Common industry pattern | Designing the environment, constraints and feedback loops so an agent stays reliable, and improving them from observed failures. The unit of improvement is the environment, not the prompt. | Who popularised the term, and why say “popularised”? |
| A3 | ★★★ | Harness versus prompt versus context engineering?Label: Common industry pattern | Nested: prompt (one call’s wording) inside context (what the model sees now) inside the harness (adds persistence, enforcement, orchestration, the improvement loop). | Where does an instruction file sit? |
| A4 | ★★★ | Name the main harness components.Label: Common industry pattern | Instructions, tools, infrastructure, orchestration, enforcement, observability. | Which would you build first, and why? |
| A5 | ★★ | Inner versus outer harness?Label: Common industry pattern | The inner one ships with the tool or model; the outer one is what you add: instruction files, servers, skills, hooks, linters, tests. | Which do you control? |
| A6 | ★★ | Why does the harness matter more for long tasks?Label: Common industry pattern | Errors compound: success is about p^n, so recovery and verification dominate. | Compute 0.98^25. |
| A7 | ★★ | “Harness” has other meanings.Label: Common industry pattern | Test harness, evaluation harness, a reinforcement-learning environment wrapper, and the agent harness. | How do you disambiguate in the first fifteen seconds? |
| A8 | ★★ | Classify failures by layer.Label: Common industry pattern | Context, constraint, verification, planning; fix the layer that broke. | Give an example of each. |
| A9 | ★★ | What is the ratchet?Label: Common industry pattern | Each real mistake becomes a permanent check, rule or hook, with its incident noted; remove it when a stronger model makes it redundant. | What goes wrong if you never prune? |
| A10 | ★ | What does “assumptions decay” mean?Label: Common industry pattern | Each component assumes something the model cannot do; re-test it when the model changes. | Give an example of a component that could become redundant. |
B. The loop, tools and errors
Provenance: Common industry pattern. Teaching: The agent loop and tool design Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| B1 | ★★★ | Walk through the agent loop.Label: Common industry pattern | Assemble context, call the model, check permission, execute, observe, log, run the stop checks; a reply with no tool call goes to a verification check. | What does the harness do that the model cannot? |
| B2 | ★★★ | What stop conditions do you need?Label: Common industry pattern | Steps, budget, time, repeated-call detection, a verified exit, a human fallback. | How do you detect a loop? |
| B3 | ★★★ | How do you handle tool errors?Label: Common industry pattern | Return actionable messages; validate arguments; retry transient errors inside the harness; cap repair attempts; idempotent side effects. | What if the model claims a result it did not get? |
| B4 | ★★★ | How do you design good tools for a model?Label: Common industry pattern | Few and non-overlapping, descriptions for a new colleague, hard to misuse, short readable output, read and write split. | Ten tools or fifty? |
| B5 | ★★ | How do you keep a large tool catalog from filling the window?Label: Common industry pattern | Load definitions on demand with a search step; tier tools by risk. | What is the trade-off? |
| B6 | ★★ | A shell as a general tool: pros and cons?Label: Common industry pattern | Capable and compact, but a large blast radius and noisy output; needs a sandbox, allow and deny lists, timeouts, output caps. | How do you approve shell commands? |
| B7 | ★★ | How do you handle huge tool outputs?Label: Common industry pattern | Keep head and tail, offload the rest to a file, summarise noisy sources, redact first. | What is lost? |
| B8 | ★★ | Why do edit tools take the expected text?Label: Common industry pattern | Optimistic concurrency: a stale edit fails instead of corrupting. | What other protections make a retry safe? |
| B9 | ★★ | What risks does a tool server add?Label: Common industry pattern | Descriptions and results enter the prompt, so they can carry instructions; pin and review servers, scope credentials, limit outbound traffic. | How would you vet one? |
| B10 | ★ | Why can changing a tool schema change behaviour?Label: Common industry pattern | A model’s behaviour can depend on tool names and shapes; version the schema and re-run your tasks. | How do you roll out a tool change? |
C. Context and long-running agents
Provenance: Common industry pattern. Teaching: Context and long-running agents Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| C1 | ★★★ | What is context rot and how does the harness fight it?Label: Common industry pattern | Recall falls as the window fills; cap outputs, clear old tool results, compact late, isolate with subagents, load on demand. | When do you compact and when do you restart? |
| C2 | ★★★ | What should a compaction keep?Label: Common industry pattern | Goal and criteria, constraints, decisions and reasons, open to-dos, files touched, the last error; point to raw output. | What are the risks? |
| C3 | ★★★ | How does an agent work across many sessions?Label: Common industry pattern | Externalise state: a feature list, a progress file, version control, an init script, a startup routine. | Why an initializer step? |
| C4 | ★★ | What failure modes did Anthropic report for long-running agents?Label: Common industry pattern | Doing too much at once, declaring the job finished from earlier progress, marking features done without end-to-end tests. | Why a JSON feature list? |
| C5 | ★★ | Why is “change only passes” not enough?Label: Common industry pattern | It is a prompt instruction, not a lock; the harness should reject other edits. | How would you enforce it? |
| C6 | ★★ | Why not one giant instruction file?Label: Common industry pattern | It crowds the window, flattens priorities and goes stale; keep a short map into documents and tie rules to failures. | How do you keep documents fresh? |
| C7 | ★★ | What is agent legibility?Label: Common industry pattern | What the agent cannot read does not exist for it; write decisions into the repository. | What would you move out of chat first? |
| C8 | ★ | Memory design in a harness?Label: Common industry pattern | Small files read at the start and written at the end, scoped, failing closed, expiring, no secrets. | Memory versus retrieval? |
| C9 | ★ | Context budget arithmetic.Label: Common industry pattern | Threshold share of (window minus output reserve), minus fixed prompt, divided by tokens per step. | What does uncapped output do to it? |
| C10 | ★ | How does compaction interact with caching?Label: Common industry pattern | Changing early context can defeat prefix caching, so compact once rather than rewriting each turn. | What else breaks a cached prefix? |
D. Guides, sensors, enforcement and security
Provenance: Common industry pattern. Teaching: Guides, sensors and enforcement Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| D1 | ★★★ | Guides versus sensors; computational versus inferential?Label: Common industry pattern | Before versus after; deterministic versus a model’s judgment; use both. | Where is each strongest? |
| D2 | ★★★ | How do you stop an agent editing tests?Label: Common industry pattern | Make them unwritable for it, a hook on protected paths, success criteria out of its reach, an independent check in CI. | What if the test is wrong? |
| D3 | ★★★ | What is a hook and why use one?Label: Common industry pattern | Code at a defined point; a guarantee, not a suggestion; success silent, failure verbose. | Give examples. |
| D4 | ★★ | Which hook points can block?Label: Common industry pattern | Before a tool call can block; after cannot undo; a stop hook can refuse “done”. | Which would you use for a lint check? |
| D5 | ★★ | Enforcing architecture with agents?Label: Common industry pattern | Fixed layers, structural tests and linters with fix instructions, invariants not implementations. | Why put the fix in the message? |
| D6 | ★★ | What runs where (“keep quality left”)?Label: Common industry pattern | After an edit, before commit, CI, continuous drift scans, runtime signals. | Cost trade-offs? |
| D7 | ★★ | A permission model for an agent.Label: Common industry pattern | Tiers, allow lists, approval for irreversible actions, fail closed. | What is approval fatigue? |
| D8 | ★★ | Sandbox design.Label: Common industry pattern | Files and network both limited, disposable, no secrets inside, limits on CPU, memory and time, a working copy per task. | How are credentials used then? |
| D9 | ★★ | Prompt injection and the lethal trifecta.Label: Common industry pattern | Private data, untrusted content and external communication together allow theft; remove one leg, separate by trust, least privilege. | Design for an agent that reads public issues. |
| D10 | ★★ | Why not let the agent grade itself?Label: Common industry pattern | It is a conflict; use a test or a separate check. | What does that cost? |
| D11 | ★ | Maintainability versus architecture versus behaviour checks.Label: Common industry pattern | Easiest to hardest; behaviour relies on tests that are not yet reliable alone. | What would you add? |
| D12 | ★ | A sensor never fires. Good or bad?Label: Common industry pattern | Quality or blindness; seed a known fault to find out. | How do you measure coverage? |
E. Orchestration
Provenance: Common industry pattern. Teaching: Orchestration, subagents and people in the loop Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| E1 | ★★★ | Workflow versus agent versus multi-agent?Label: Common industry pattern | Simplest design that works; add complexity only for measured gains. | Your decision criteria? |
| E2 | ★★★ | Why subagents?Label: Common industry pattern | Context isolation, parallelism, independent checks; paid for in total tokens. | When not to? |
| E3 | ★★ | What goes in a delegation contract?Label: Common industry pattern | Objective, constraints, tools, output format, stop condition, where artefacts go. | What happens with vague delegation? |
| E4 | ★★ | Builder and checker as separate roles?Label: Common industry pattern | Agree what done means first; a separate checker or a test; a second pass of cost. | Who writes the checks? |
| E5 | ★★ | Model routing.Label: Common industry pattern | Strong for planning and ambiguity, smaller for routine work, with a fallback; re-test on each new model. | What does it do to caching? |
| E6 | ★★ | Parallel agents on one repository.Label: Common industry pattern | A working copy per task, ownership by module, a queue, small changes, an integration step. | Failure modes? |
| E7 | ★★ | Where do people go in the loop?Label: Common industry pattern | Intent, irreversible actions, escalations, the steering loop; an autonomy ladder. | How is autonomy earned? |
| E8 | ★ | When is minimal blocking review acceptable?Label: Common industry pattern | High throughput, cheap corrections, strong tests; not for low-volume or high-risk work. | State the conditions. |
F. Evaluation and operations
Provenance: Common industry pattern. Teaching: Evaluating and operating a harness Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| F1 | ★★★ | How do you evaluate a harness change?Label: Common industry pattern | One change, the same held-out tasks, several trials, a state-based grader, pass^k and cost per resolved task. | pass@k versus pass^k? |
| F2 | ★★★ | Compute pass^k and pass@k for p = 0.8 and k = 5.Label: Common industry pattern | pass^5 ≈ 0.328 and pass@5 ≈ 0.9997. | Which matters to a user who relies on it daily? |
| F3 | ★★ | Cost per resolved task.Label: Common industry pattern | Attempt cost divided by success rate; a pricier attempt can be cheaper per result. | A worked example? |
| F4 | ★★ | Ablation design.Label: Common industry pattern | Fix the model, vary one component, same tasks, measure variance. | Confounders? |
| F5 | ★★ | The failure-analysis loop.Label: Common industry pattern | Traces, cluster, classify by layer, structural fix, regression check, re-run. | Why not prompt patches? |
| F6 | ★★ | What goes in a trace?Label: Common industry pattern | Versioned prompts, model, tool calls and results, permission decisions, tokens, cost, stop reason, in a standard format. | What about privacy? |
| F7 | ★★ | A model-upgrade playbook.Label: Common industry pattern | Re-baseline on held-out tasks, ablate old compensations, check tool shapes, roll out gradually. | Success flat and cost up 40 percent? |
| F8 | ★★ | Reliability engineering for agents.Label: Common industry pattern | Checkpoint and resume, idempotent tools, budgets and timeouts, a kill switch, rollback, safe degradation, a runbook. | What if the verifier is down? |
| F9 | ★ | Reward hacking in agent evaluations.Label: Common industry pattern | An agent may edit tests, hard-code outputs or exploit the grader or the environment; read transcripts of successes too. | How do you seal the environment? |
| F10 | ★ | Reading benchmark claims.Label: Common industry pattern | Gains reported in posts often lack full methodology; replicate on your own tasks. | How would you test a claim that a harness-only change moved a ranking? |
G. Scenarios (diagnose aloud)
Provenance: Generated practice.
| # | Priority | Scenario | Key points |
|---|---|---|---|
| G1 | ★★★ | The agent declares victory early.Label: Generated practice | Tie “done” to a checklist the agent cannot edit, a verifier and a stop hook; give sessions a startup routine. |
| G2 | ★★★ | It passes unit tests but the UI is broken.Label: Generated practice | Add browser end-to-end checks and a staging smoke test. |
| G3 | ★★ | It loops for 40 steps.Label: Generated practice | Repeated-call detection, a step cap, escalation, a plan review. |
| G4 | ★★ | The context blows up on large logs.Label: Generated practice | Truncate and offload, summarise noisy sources, clear old results. |
| G5 | ★★ | A secret leaks through a tool result.Label: Generated practice | Redaction, scoped credentials, outbound limits, trace scrubbing. |
| G6 | ★★ | Costs doubled for the same tasks.Label: Generated practice | Read traces by stage: output caps, fan-out, cache layout, loops. |
| G7 | ★★ | Quality fell after adding more rules.Label: Generated practice | Crowding and contradiction; ablate; tie each rule to a failure. |
| G8 | ★ | A tool server update changed behaviour.Label: Generated practice | Pin and review servers, scope credentials, limit outbound traffic, roll out gradually. |
H. System design prompts
Provenance: Generated practice. Teaching: Harness engineering: interview drills Open the course to learn this
| # | Priority | Prompt | Key points |
|---|---|---|---|
| H1 | ★★★ | Design a coding-agent harness for a very large repository.Label: Generated practice | The eight-part framework in the drills lesson: clarify, context, tools and environment, loop and state, enforcement, verification, orchestration, evaluation. |
| H2 | ★★★ | Design a support agent that can issue refunds.Label: Generated practice | Read, propose and commit tools; a policy engine and approval above thresholds; idempotency keys; untrusted ticket text; audit log; kill switch. |
| H3 | ★★ | Design a long-running research agent that works across sessions.Label: Generated practice | A plan file, a source list, a progress file, checks that each claim and citation is supported, resets seeded from files. |
| H4 | ★★ | Design an overnight agent that merges pull requests.Label: Generated practice | Scope, tests, risk tiers, rollback, observability, a kill switch, a morning report. |
| H5 | ★ | Design an internal platform that offers harnesses as a service.Label: Generated practice | Templates, a tool registry, a policy engine, sandbox pool, evaluation service, trace store, cost controls, tenancy. |
I. Project and behavioural angle
Provenance: Generated practice. See also Projects and behavioural questions.
| # | Priority | Question | Key points |
|---|---|---|---|
| I1 | ★★ | Tell me about a time an agent failed in production and what you changed.Label: Generated practice | Use a real incident; classify the layer; show the ratchet. Never invent figures. |
| I2 | ★ | How do you decide how much autonomy to give an agent?Label: Generated practice | Reversibility, blast radius, strength of verification, evidence so far, an autonomy ladder. |
Coding-round variants
- Implement an agent loop with a step cap, a budget and tool error handling.
- Implement a
truncate_and_offload(output, limit)helper. - Write a repeated-call detector.
- Compute pass@k and pass^k from a table of trial results.
- Write a before-tool hook that blocks writes outside the workspace and edits to protected paths.
Study order (suggested)
- The ★★★ items in sections A to F: answer aloud, then compare.
- One scenario from G and one design prompt from H, timed.
- The ★★ items in the sections that match your next interview, then the ★ items.
Pair with Advanced, Scenario Based and the Top 100 priority questions.