Repository navigation
Goals: a met goal says how long the work took - #396
Merged
Merged
Conversation
When the judge confirms a goal, the agent now ends with "✓ goal met — worked 1h12m over 3 runs": the working time of every run at the goal (runDuration: approval waits left out), carried in goal.json across /goal go resumes and restarts, and how many runs that was. A goal replaced with different text starts its own count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
addGoalWork saves the goal: a run that failed never reached finishGoal's save, and its time was lost to the next restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
When the judge confirms a goal, the agent now ends with a line like:
What it counts:
runDuration, which already leaves out time spent waiting on an approval prompt. It is stored ingoal.json(worked_ns,runs), so the total survives/goal goresumes and restarts.goal_doneevent emitted after the answer. Plain mode prints it after the answer.Tests are in
cmd/agent/goal_time_test.go:42s,4m05s,1h12m);runTaskStreamingrun with a fake model whose judge says DONE. It checks thatgoal_donecarries this run's time.A sabotage pass made 10 mutations, and every one failed a test. The plain-mode print in
runOnehas no test, because it writes straight to stdout.🤖 Generated with Claude Code