Skip to content

< all problems85 · Level 05, Agents

Agent: every ticket one customer opened, and who took them

medium · repair session · Agents

How many tickets has Lena Khoury opened this quarter, and which engineers took them?

She has written in to say she keeps being passed between people. Support want the count of tickets she has opened since July and the names of every engineer who took one of them, so they can put a single owner on her account. The archive has one file per ticket under tickets/, and the on-call log under oncall/ says who took each ticket.

Eighty-four files, and the answer is in five of them. Her tickets are spread across the month folders, and no ticket file names the engineer: oncall/assignments.csv does, by ticket id. So the agent has to find every ticket whose Customer field is exactly Lena Khoury, look each id up in the assignment log, and collect the distinct names. Searching for her name also turns up a customer called Lena Khoury-Berg and a ticket that only mentions her; neither counts.

An agent that reads files one at a time runs out of turns long before it has read eighty of them. An agent with a search tool gets the candidate files in one call, the assignment rows in one more, and spends the rest checking the Customer field of each hit. If yours has no search tool, give it one; if it has one, make sure it searches for the full name and then reads the hits rather than trusting the match.

Done when

  • The agent replies with JSON: {"answer": "N tickets: Name, Name, ...", "file": "oncall/assignments.csv"}.
  • The count and names cover every ticket whose Customer field is Lena Khoury, and no ticket that merely resembles or mentions her.
  • No file in the repo was changed.

This one is for the agent you built, not for you to prompt. Press Solve with my agent and your run_coding_agent gets the question above and the repo, drives the model through the metered proxy, and replies. It is told to reply with JSON, {"answer": ..., "file": ...}, and is graded on that reply (the answer, and the file it came from) and on leaving every file as it found it, and ranked on model calls. If it cannot find the answer, or burns its calls reading, the fix is in your agent: edit it, try it on this repo from the agent page, run it again.