What is asked in a Harness Engineer interview?
- Authors
- Name
- Amit Shekhar
- Published on
A Harness Engineer interview checks whether we can build and debug the environment around an AI agent, which means the tools, permissions, sandbox, context management, feedback loops, and evaluation that make the agent safe and reliable.
In this blog, we will learn about what is asked in a Harness Engineer interview. We will also see the rounds in order and what each round tests, the practical build round where we work with a coding agent, the fundamentals and debugging questions, the design round, the behavioral questions, and the common mistakes to avoid.
We will cover the following:
- What is a Harness Engineer?
- The rounds in a Harness Engineer interview
- Round 1: Recruiter screen
- Round 2: Practical build round
- Round 3: Harness fundamentals
- Round 4: Reliability and debugging
- Round 5: Harness design
- Round 6: Behavioral questions
- Common mistakes in a Harness Engineer interview
I am Amit Shekhar, Founder @ Outcome School, I have taught and mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos.
I teach AI and Machine Learning at Outcome School.
Let's get started.
What is a Harness Engineer?
A Harness Engineer builds the environment around an AI agent: the tools it can call, the permissions it has, the sandbox it runs in, the way its context is managed, the feedback loops that correct it, the evaluation that measures it, and the loop that runs it.
The LLM never runs a tool by itself. It recommends a tool and its input, and the harness, which is our code, decides whether to run it, runs it, and feeds the result back.
So, the interview is about whether we can build this environment and fix it when it fails.
The rounds in a Harness Engineer interview
Most interview loops for this role have six rounds, in this order:
- Recruiter screen
- Practical build round with a coding agent
- Harness fundamentals
- Reliability and debugging
- Harness design
- Behavioral questions
We will go through them one by one, with sample questions and short model answers.
Round 1: Recruiter screen
The recruiter screen is a short call that checks that we have actually built or operated an agent harness, and that we can describe it in plain words.
Sample question: "Tell me about an agent harness you have worked on."
Model answer: "I built the loop that runs a coding agent for our team. The agent gets a task, the LLM recommends a tool call, my harness checks the permission, runs the tool inside a sandbox, and sends the result back. I added a tool call timeout, session logs, and a test set that runs before every harness change."
Here, we can notice that the answer names the parts of the harness: loop, permission check, sandbox, timeout, logs, and evaluation.
Round 2: Practical build round
This is the most important round. We get a small agent harness of a few hundred lines and a coding agent such as Claude Code. The interviewer asks us to add one safety feature and prove that it works.
A common task is: "Add a timeout to tool calls. If a tool runs longer than thirty seconds, the harness must stop it and tell the agent that the tool timed out."
Another common task is a permission check: the agent must ask the user before running any shell command that deletes a file.
We direct the coding agent to write the code. The interviewer watches how we work with the agent and how we verify the result.
A strong candidate works like this:
Step 1: We read the harness first. We find the agent loop, the place where a tool call is executed, and the place where the result is sent back to the LLM.
Step 2: We describe the task to the coding agent clearly: "Add a timeout of thirty seconds around the tool execution in run_tool. On timeout, return a tool result with the text Tool timed out after 30 seconds. Do not change any other function."
Step 3: We review the diff. We check that the timeout really stops the tool, and that the error goes back to the agent as a normal tool result and does not crash the loop.
Step 4: We ask the coding agent to write a test with a fake tool that sleeps for sixty seconds, and we run it. The test must pass in about thirty seconds. Then we run the existing tests to confirm that nothing else broke.
Sample question during this round: "Why did you return the timeout as a tool result instead of raising an error?"
Model answer: "Because the agent must get a chance to recover. If we raise an error, the loop stops. If we return a tool result, the LLM can try a smaller command or ask the user."
This is how we show the skill the role needs: describe the task clearly to the coding agent, review the output, test it, and explain the decision.
A quick note for you
No matter which tech domain you work in, get familiar with these topics:
- LLM
- RAG
- MCP
- Agent
- Fine-tuning
- Quantization
We put it all together in one video:
AI Engineering Explained: LLM, RAG, MCP, Agent, Fine-Tuning, and Quantization
No need to stop reading - bookmark it and watch later when you get time. Future you will thank you.
Now, let's get back to the topic.
Round 3: Harness fundamentals
This round covers the building blocks of a harness.
Sample question: "Explain the agent loop."
Model answer: "We send the task and the context to the LLM. The LLM replies either with a final answer or with a tool call recommendation. If it is a tool call, the harness checks permission, runs the tool, appends the result to the context, and goes back to the LLM. The loop ends when the LLM gives a final answer or when a stopping rule fires."
Sample question: "What is a tool schema and why does it matter?"
Model answer: "A tool schema is the description of a tool that we give to the LLM: its name, what it does, and the exact inputs it takes with their types. The LLM uses the schema to decide when to recommend the tool and how to fill the inputs. A vague schema produces wrong tool calls."
Sample question: "How do permissions and sandboxing differ?"
Model answer: "Permissions decide what the agent can do, such as read files but not delete them, or run tests but not push code. Sandboxing limits what the agent can reach even if a permission check is wrong. Permissions are the rule. The sandbox limits the harm when the rule fails."
Sample question: "What is context compaction?"
Model answer: "Every tool result is added to the context, so a long session fills the context window. Compaction replaces the older part of the conversation with a short summary that keeps the task, the decisions made so far, and the current state."
Sample question: "What stopping criteria do you put in a harness?"
Model answer: "A maximum number of loop turns, a maximum token or cost budget per session, a rule that stops the loop when the same tool call repeats with the same input, and a final-answer signal from the LLM."
Want to become a Harness Engineer?
These are the skills this role needs, and we teach them in our AI and Machine Learning Program at Outcome School:
- Harness Engineering
- Context Engineering
- Tool use in Agents
- Subagent
- Loop Engineering
- Evaluation of LLMs and Agents
We take you from the fundamentals to building real AI systems, step by step.
Round 4: Reliability and debugging
This round tests whether we can handle an agent that misbehaves in production. The interviewer describes a failure and asks what we would do.
Sample question: "An agent is stuck in a loop. It runs the same test, sees the same failure, and edits the same line again and again. What do you do?"
Model answer: "First, I look at the session log to confirm the repeated tool call. Then I add a loop detector in the harness: if the same tool is called with the same input three times, the harness injects a message that asks the agent to try a different approach. If it still repeats, the harness stops the session and reports to the user."
Sample question: "A session cost ten times more than usual. How do you find out why?"
Model answer: "I read the session log and look at the token count per turn. Usually one of three things happened: a tool returned a huge output, compaction did not run, or the agent looped. The fix depends on the cause: truncate large tool outputs, trigger compaction earlier, or add a loop detector. And, I add a hard cost budget per session."
Sample question: "A tool hangs and the agent waits forever. What is the fix?"
Model answer: "Every tool call gets a timeout. On timeout, the harness kills the process and returns a tool result that says so."
Sample question: "How do you make the agent correct its own mistakes?"
Model answer: "We add feedback loops. After the agent edits code, the harness runs the tests and the linter automatically and sends the output back as a tool result. The agent sees the failure and fixes it in the next turn. The harness does not need to understand the code, it only runs the checks and reports the result."
Sample question: "You changed the compaction logic. How do you know it made the harness better and not worse?"
Model answer: "We keep a task set with known correct results. We run the harness before and after the change on the same tasks and compare the pass rate, the cost, and the number of turns. If the pass rate drops, the change does not ship."
Here, we can see that every answer has three parts: look at the log, fix the harness so the agent can recover, and add a rule so it cannot happen again.
Round 5: Harness design
This is the system design round. The interviewer gives an open problem and we design on a whiteboard.
Sample question: "Design the harness for a coding agent that a team of fifty engineers will use every day."
A model answer covers these parts:
Tools: A small set with strict schemas: read file, edit file, search code, run a shell command, and run tests. Each tool has a timeout and a maximum output size.
Permissions: Three levels. Read operations run without asking. Edits inside the repo run without asking but are logged. Anything that deletes files, touches the network, or pushes code needs the user to approve.
Sandbox: Each session runs in a container with a copy of the repo, no access to secrets, and network access only to the package registry.
Context management: Tool outputs are truncated at a fixed size. Compaction runs when the context passes a threshold and keeps the task, the decisions, and the current state.
Session logs: Every tool call, its input, its output, its duration, and its token cost are logged, so that an engineer can replay a session.
Evaluation: A task set that runs on every harness change, reporting pass rate, cost, and number of turns.
A typical follow-up is: "Why not make the agent ask permission for every edit?"
Model answer: "Because the team would stop using it. Asking for every edit makes the agent slower than doing the work manually. We ask only for actions that are hard to undo, and the repo history makes everything else reversible."
Stay updated: Subscribe to our newsletter to get our latest AI and Machine Learning blogs straight to your inbox.
Round 6: Behavioral questions
This round checks how we work with agents and how we think about safety.
Sample question: "How do you use coding agents in your daily work?"
Model answer: "I give the coding agent a clear task with the files it must touch, I review every diff, and I run the tests before I accept. For bigger changes, I ask it to write the plan first and I approve the plan before any code."
Sample question: "Tell me about a time a gap in the harness caused a real problem."
Model answer: "Our harness had no output size limit on the shell tool. An agent ran a command that printed a huge log, the context filled up, and the session failed after spending a large budget. I added a truncation rule for tool outputs and a cost budget per session, and I added the case to our evaluation set."
Here, the interviewer wants to see that we owned the fix and turned the incident into a permanent check.
Sample question: "How do you trade safety against speed?"
Model answer: "I ask one question about each action: can it be undone? Reversible actions run without asking. Irreversible actions need approval. This keeps the agent fast on the common path and safe on the risky path."
Common mistakes in a Harness Engineer interview
Accepting the coding agent's output without reading it. If we skip the diff and go straight to running it, we have failed the round even if the code works.
Not writing a test for the safety feature. A timeout that is never tested with a slow tool is not proven.
Describing the LLM as the thing that runs tools. The LLM recommends. The harness runs.
Having no evaluation story. If we cannot explain how we would measure a harness change on a task set, we cannot show that our change helped.
Now we must have understood what is asked in a Harness Engineer interview, what each round tests, and how to answer each round.
Frequently Asked Questions
Do we write the code by hand in a Harness Engineer interview?
No. In the practical build round, we direct a coding agent such as Claude Code to write the code. The interviewer watches how we describe the task, how we review the diff, and how we test the result. Accepting the output without reading it fails the round even if the code works.
Does the LLM run the tools in an agent harness?
No. The LLM never runs a tool by itself. It recommends a tool and its input, and the harness decides whether to run it, runs it, and feeds the result back. Describing the LLM as the thing that runs tools is a common mistake in this interview.
Which agent actions should need approval in a harness?
Only the actions that are hard to undo should need approval. Reversible actions run without asking, and irreversible actions, such as deleting files or pushing code, need the user to approve. Asking for every edit makes the agent slower than doing the work manually, so the team would stop using it.
How do we prove that a harness change made things better?
We run the harness before and after the change on the same task set with known correct results. Then we compare the pass rate, the cost, and the number of turns. If the pass rate drops, the change does not ship.
That's it for now.
Thanks
Amit Shekhar
Founder @ Outcome School
You can connect with me on:
Follow Outcome School on:
