Harness Engineering Quiz: 12 Questions on AGENTS.md, Checks, and Hooks

Twelve situations from daily work with Claude Code or Codex: the agent gets something wrong, and you pick what to change. Each answer explains which part of the harness fixes the problem, from a short AGENTS.md map to a check the tool runs by itself.

About the Harness Engineering skill quiz

This Harness Engineering quiz is a Practical fundamentals check. It covers what a harness is, AGENTS.md as a map, skills, checks that can fail, visitor checks, error messages, Stop hooks, handoff notes. The quiz has 12 questions, takes about 8 minutes, and a score around 8 out of 12 means you have a workable baseline.

The 12 questions on this page are built for developers who have used Claude Code or Codex for a week and keep correcting the same mistakes. They focus on practical decisions you would make while building, debugging, querying, or operating real projects.

Related Harness Engineering Practice Questions

Frequently asked questions about the Harness Engineering skill quiz

What is harness engineering?+

An agent is a model plus a harness. The harness is everything in the agent except the model: the instruction files, the tools, the checks that test its work, and the notes kept between sessions. Harness engineering is the practice of changing that harness each time the agent makes a mistake, so the mistake does not repeat. Mitchell Hashimoto, who uses the term for his own work, describes it as taking the time to engineer a solution so the agent never makes that mistake again.

How is harness engineering different from prompt engineering?+

Prompt engineering changes the words you type in one request. Harness engineering changes what surrounds every request: a short AGENTS.md that names the files to read, a skill for repeated steps, a script that fails when the page is wrong, a hook that runs that script when the agent tries to finish, and a handoff note for the next session. A prompt is gone when the session ends. A file or a check stays in the project and works in every session.

What is an AGENTS.md file?+

AGENTS.md is a Markdown file in your project folder that coding agents read at the start of a session. Codex reads it before doing any work. Claude Code reads it by default when the project has no CLAUDE.md. Keep it short and treat it as a map: name the file that holds each detail instead of copying the details in. OpenAI's Codex team keeps theirs to roughly 100 lines, and Claude Code's docs recommend under 200 lines for CLAUDE.md, because longer files reduce how well the agent follows them.

What is a check, and why does it have to fail once?+

A check is a program that can report a failure, such as a script that reads every link on a page and prints each missing target. When an agent writes "all links verified," no program has necessarily tested the links. A check runs the test and shows the result. A check that has only ever passed could be one that passes on everything, so break something on purpose once and confirm the check reports it. After that, a pass from the check tells you the links work.

What is a Stop hook?+

A hook is a command your coding tool runs at a set moment. In Claude Code, a Stop hook runs when Claude finishes responding. If the hook's command exits with code 2, Claude Code prevents the stop and sends the stderr text back to Claude, which keeps working to fix it. Connecting a check to a Stop hook means the check runs every time, and nobody has to remember to ask. Codex also has Stop hooks, and exit code 2 makes Codex continue in the same way.

Which course does this quiz prepare for?+

This quiz is the free entry point for Harness Engineering from Scratch, a course of ten short lessons on learn.cloudyeti.io ($19 at the presale price). In the course you build a complete harness on one small practice site: a short AGENTS.md, a skill, a link checker you watch fail and pass, a tested Stop hook, and a handoff note. The last lesson applies the same steps to your own project in about 20 minutes. The quiz explains the ideas, and the course has you build each one.

Sample Harness Engineering questions

Three examples from the 12-question quiz. Answers stay hidden until you reveal them.

Sample Question 1Feedback and Hooks

You have a working link checker. The agent runs it when you ask, but in a long session it often says "done" without running it. You want the check to run every time, with nobody remembering. What should you add?

AThe check command in handoff.md, so the next session knows to run it
BA Stop hook that runs the check when the agent tries to finish
CA reminder at the end of each prompt: "run the check before you finish"
DThe line "always run the check before you say you are done" in AGENTS.md
Show answer
Answer: B — A Stop hook that runs the check when the agent tries to finish

A hook is a command that your tool runs on a named event, without being asked. In Claude Code, a Stop hook runs when Claude finishes responding. If the hook exits with code 2, Claude Code prevents the stop and sends the hook's stderr text back to the agent, so it keeps working on the fix. The tool holds the rule, and no one has to remember it. Codex has Stop hooks too, and exit code 2 with a reason on stderr also makes Codex continue.

Sample Question 2Feedback and Hooks

Each morning you spend ten minutes telling a new session what yesterday's session built, what still needs testing, and what to do next. How do you stop repeating this?

AAdd yesterday's progress to AGENTS.md at the end of each day
BBefore each session ends, have the agent write a ten-line handoff note
CPaste yesterday's full chat transcript at the start of each new session
DKeep one session open for weeks so the agent never forgets
Show answer
Answer: B — Before each session ends, have the agent write a ten-line handoff note

A new session knows nothing about yesterday. A handoff note of about ten lines, with three sections, fills the gap: Done (what works now), Not checked (what nobody tested), and Next (the first task). The next session starts with "Read handoff.md and continue." Anthropic's engineers use the same idea for long-running agents, which keep a progress file across sessions.

Sample Question 3Feedback and Hooks

Your AGENTS.md already says "Do not change prices unless asked." Twice this week the agent still changed the coffee price during an unrelated edit. Both times you noticed by reading the page and corrected it in chat. What should you do now?

ACorrect it a third time with a firmer, more detailed message
BSwitch to a different model, because this one is careless with numbers
CAdd a check that compares the page prices with the source file
DRewrite that rule in capitals and move it to the top of AGENTS.md
Show answer
Answer: C — Add a check that compares the page prices with the source file

The rule exists and the agent broke it twice, so the instruction alone is not enough. Reading the prices yourself is a check you do by hand. Turn it into code: a script that reads the prices from the source file and fails when the page shows a different or missing number. OpenAI's team calls this promoting the rule into code when documentation falls short. Once the check exists, a Stop hook can run it each time the agent finishes.

Try another tech quiz

Compare your skills across Git, AWS, Linux, SQL, Python, Docker, harness engineering, and loop engineering.

See all free quizzes