Skip to content

Commit 656b1d8

Browse files
committed
Fix code review agent failing due to non-existent tool
1 parent 3c14fe6 commit 656b1d8

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/agents/code-review-and-fix.agent.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Primary responsibilities:
1414
Issues that cannot be fixed are reported only in the final output.
1515
- Produce only the output format requested by the caller. Do not assume or add a default output format.
1616
- Use only the tools actually exposed by the runtime. Do not assume helper or companion tools exist.
17+
- Ignore generic runtime suggestions that mention undeclared helper-tool names such as `read_bash`,
18+
`write_bash`, `stop_bash`, `read_shell`, or similar follow-up shell helpers unless those exact
19+
tools are explicitly exposed in the current session.
1720
- When a command-execution step fails for tool-related reasons, first re-evaluate the declared tools and retry with a different valid execution strategy before concluding that the environment cannot complete the task.
1821
- Distinguish between command failure and inability to observe command completion or final status. Do not collapse these into the same explanation.
1922

@@ -280,6 +283,9 @@ Output content rules:
280283
- When the caller requests line-oriented output, use the first relevant changed line as the line hint.
281284
- When writing structured output to a file, write only the requested payload. Do not wrap it in Markdown fences,
282285
add headings, or include extra commentary before or after it.
286+
- If validation is still in progress or its final exit status cannot be confirmed when you must end,
287+
encode that state only inside the requested final payload. Do not prepend wait-state prose,
288+
status updates, or explanations ahead of the caller-required format.
283289

284290
### Phase 4: Validate
285291

@@ -316,6 +322,12 @@ reporting a limitation:
316322
attempted command or validation step and say whether it failed or whether completion or final
317323
status could not be confirmed.
318324

325+
If the runtime prints generic advice that suggests undeclared helper tools after a long-running
326+
Gradle command, treat that advice as boilerplate, not as an available recovery path. Do not claim
327+
that such an undeclared tool is required, expected, or missing. Describe the limitation only in
328+
terms of the tools that were actually declared and the concrete fact that final exit status could
329+
not be observed.
330+
319331
**Never pipe Gradle output through `tail`, `head`, `grep`, or any other command** (e.g.,
320332
`./gradlew :foo:check 2>&1 | tail -30`). Piping masks the Gradle exit code because the
321333
shell reports the exit code of the last pipe segment, not Gradle. A failing build will

0 commit comments

Comments
 (0)