Repository navigation
Description
Problem or Motivation
The first end-to-end implement run on #2656 (Job devops-cli-runner-20261030-034947-9476, 2026-10-30) stopped after about four minutes with this reason:
Stopped at group 1. Reason: UnexpectedModelBehavior. Last message of the agent: Let me run the test directly in the project directory:
The reason holds only the class name of the exception. implement_step.py builds it with type(stopped).__name__ for UsageLimitExceeded and UnexpectedModelBehavior. The message of the exception names the real cause, for example that a tool exceeded its retries (CONST_ROADMAP_IMPLEMENT_TOOL_RETRIES is 5) or that the model's output was invalid. The Job log holds only the summary, with no line for a tool call, so a person cannot tell which of these happened. The diff that the stop comment now shows (#2744) is a scratch test script and no fix, which fits a model that kept calling a command the shell refused, but nothing proves it.
Proposed Solution & Architectural Design
- The stop reason holds the class name and the message of the exception, masked with
mask_secretsand cut to a constant size. The existing cut of the reason (CONST_ROADMAP_IMPLEMENT_REASON_CHARS) applies. - The Job log gets one line for each tool call of the agent: the tool name, the first word of a shell command, and the outcome (
ok,refusedwith the reason, orretry). The line holds no file content and no output. It is the evidence a person needs when a step stops. - A refused shell command and a tool that raises a retry are counted apart in the stop reason: "N refused commands, M other retries", so the person sees at once when the model keeps asking for a program that the allowlist refuses.
Target Subsystem
src/devops_cli/roadmap/implement_step.py, src/devops_cli/roadmap/implement_run.py, src/devops_cli/lang/en/messages.py.
Existing Tool Considered
pydantic-ai's run messages (capture_run_messages, already used by the refine investigation) and its capability hooks for tool calls (Hooks with before_tool_execute or after_tool_execute, as the project's spend capability uses after_model_request). Nothing new is built.
Acceptance criteria
- With the model faked as a pydantic-ai
FunctionModel, a model that calls a refused program until the retry limit ends the step stopped, and the reason holds the exception's message and the count of refused commands. - A secret-looking string in the exception message is masked in the reason.
- A step logs one line per tool call with no file content.
uv run devops cipasses, anddevops docs generate --sync-readmeis run.
Evidence: Job devops-cli-runner-20261030-034947-9476 and the stop comment on #2656 at 03:54 UTC.
Activity
dan-petty commentedon Oct 30, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.Operators cannot diagnose why an implement step stopped, but the step still halts safely and no data is lost.Faster diagnosis of implement step failures reduces operator time, but it does not change user-facing behaviour.Three files change, the design is specified, and pydantic-ai hooks already exist, but masking, counting, and log formatting add work.Both fix vague failure reasons that show only the exception class name, but #2562 targets refine warnings while the candidate targets the implement step stop reason and adds tool-call logging.chore(main): release 0.22.1 (#2765)