Skip to content

Fix/judge framework tool awareness - #126

Merged
sinatayebati merged 9 commits into
mainfrom
fix/judge-framework-tool-awareness
Aug 9, 2026
Merged

sinatayebati merged 9 commits into
mainfrom
fix/judge-framework-tool-awareness

Conversation

@sinatayebati

@sinatayebati sinatayebati commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Provide a brief summary of the changes and the motivation behind them.

Related Issues

Link any related issues below (use Closes #123 to auto-close on merge).

  • Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / infrastructure change

Contributor Checklist

  • I have read the Contributing Guidelines
  • make lint passes with no errors
  • make test-unit passes
  • I have added or updated tests that cover my changes
  • I have updated documentation where necessary
  • My commits follow the project's commit message conventions

Screenshots / Logs

If applicable, add screenshots or log output to help reviewers.


Note

Medium Risk
Changes only LLM judge prompt text across multiple eval metrics, so scores and pass/fail thresholds may shift for harness-instrumented traces; no runtime API or auth impact.

Overview
Trace evaluation prompts were penalizing harness_* meta-tool calls (reading rules, notices, prior traces) as bad tool use, wasted steps, or failed task work. This PR adds shared HARNESS_TOOL_GUIDANCE in metrics/utils.py and threads it through the trace metric templates so judges treat those calls as neutral infrastructure, score only task-directed actions, and preserve exact tool names in extraction.

Argument correctness and tool correctness now keep verbatim harness_ names and avoid marking harness args or selection wrong when the call is only consulting harness state. Confidence, step efficiency, and plan adherence no longer count harness consultation as hesitation, redundancy, or plan deviation; plan extraction explicitly omits harness steps from the task plan. Task completion separates harness prep from task outcomes in extraction and verdict (no progress credit, but not a “failed attempt”); partial traces score incomplete progress rather than defaulting to zero. Plan quality documents that harness tools are out of scope for the plan text (no shared block, since it never sees raw tool calls). The Docker entrypoint banner version is bumped to v0.5.0.

Reviewed by Cursor Bugbot for commit 054bd6b. Bugbot is set up for automated code reviews on this repo. Configure here.

sinatayebati and others added 9 commits August 9, 2026 11:33
Introduce HARNESS_TOOL_GUIDANCE so trace metrics can consistently treat
harness meta-tools as neutral infrastructure rather than task attempts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve harness-prefixed tool names verbatim and score meta-tool arguments
on their own merits instead of penalizing calls that do not advance the task.

Co-authored-by: Cursor <cursoragent@cursor.com>
Consulting learned guidance before acting is deliberate preparation, not
hesitation or strategy abandonment.

Co-authored-by: Cursor <cursoragent@cursor.com>
Harness calls are operational infrastructure, not steps of the agent's task
plan, so they should not count as deviations or extraneous actions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Plans describe task work; omitting harness meta-tools is expected and this
prompt never sees tool calls directly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Judge efficiency over task-directed steps only; harness state checks are
sanctioned preparation, not redundant or superfluous steps.

Co-authored-by: Cursor <cursoragent@cursor.com>
…letion.

Distinguish harness preparation from task attempts, score partial progress
fairly, and reserve zero scores for outcomes that show no progress.

Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve harness-prefixed tool names verbatim and exclude meta-tools from
mis-selection and relevance penalties.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@sinatayebati
sinatayebati merged commit 0eb1332 into main Aug 9, 2026
14 checks passed
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.

1 participant