Repository navigation
Conversation
StepEfficiency counted redundant *tool calls* but divided by the number of *steps*. A step holding several redundant calls drove the ratio below zero and the documented 0.0-1.0 score went negative (future-agi#60), which also pulled the composed TrajectoryScore down. Divide by total_calls instead — the same denominator the failure term uses — so the ratio is bounded by construction. Rename the diagnostic details key to redundant_calls to match what is counted; nothing in the repo consumes the old key. Generated with Devin Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StepEfficiencyis documented to return 0.0–1.0 but could go negative:redundant_countis incremented once per redundant tool call while the ratio divided by steps. One step with 5 identical calls produced-0.2, andTrajectoryScore(30% weight) inherited the deficit (#60).Per maintainer direction on the issue — option 1, no clamp: the redundancy term now divides by
total_calls, matching thefailed_calls / total_callspattern directly below it. The ratio is bounded by construction.One extra rename:
details["redundant_steps"]→details["redundant_calls"]. The counter was always counting calls; the key name was part of the same confusion. Nothing in the repo reads it (greppedsrc/,tests/,typescript/).Verification
uv run ruff check .— clean on changed filesuv run pytest tests/test_agent_step_efficiency.py— 6/6 pass; covers the issue repro (5 redundant calls in 1 step → 0.76), the single-call-per-step case (→ 0.8), zero-tool-call steps, andTrajectoryScorecomposition boundsuv run pytest -q— not run; repo suite is large and the change is confined to one method inmetrics.py+ its new test filetypescript/changesagent-learn release-proof— N/A, no release-candidate behavior touchedChecklist
detailsdiagnostic key renamedCloses #60.