Skip to content

Add agent guidance on prek exit codes and output truncation#1718

Merged
nathanjmcdougall merged 2 commits intomainfrom
copilot/update-agent-config-prek-output
Apr 1, 2026
Merged

Add agent guidance on prek exit codes and output truncation#1718
nathanjmcdougall merged 2 commits intomainfrom
copilot/update-agent-config-prek-output

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

An agent ran uv run --frozen prek -a 2>&1 | tail -30, truncating output that hid hook failures and leading to a false-positive conclusion that checks passed.

  • Add "How to run prek correctly" section to usethis-qa-static-checks skill (v1.8 → v1.9):
    • Never truncate output — no piping through tail, head, etc.
    • Exit code is source of truth — zero means pass, non-zero means fail; don't infer status from visible output

…ecks skill

Update the usethis-qa-static-checks skill (v1.8 → v1.9) with a new
"How to run prek correctly" section that instructs agents to:
- Never truncate prek output (no tail/head piping)
- Use the exit code as the source of truth for pass/fail

Resolves #1632

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/f6f35d59-1dc0-4c13-87a8-d695523e7efc

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Copilot AI changed the title [WIP] Update agent config to discourage truncated prek outputs Add agent guidance on prek exit codes and output truncation Apr 1, 2026
Copilot AI requested a review from nathanjmcdougall April 1, 2026 11:17
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review April 1, 2026 11:25
@nathanjmcdougall nathanjmcdougall merged commit a8b9e7a into main Apr 1, 2026
1 check passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/update-agent-config-prek-output branch April 1, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent config to discourage truncated prek outputs

2 participants