Repository navigation
Implement the high-priority backlog (items 7-12) - #13
Merged
Merged
Conversation
- Truncated tool calls never lower max_tokens, and stop with LoopBudgetExceeded(kind="max_tokens") / TOKEN_LIMIT once the budget cannot grow, instead of re-billing the same cut-off. - An empty turn cut off by max_tokens is a truncation the loop answers with a bigger budget, not a retryable ResponseInvalid. - Unregistered (model-invented) tool names are reported as "<unregistered>" to summaries, metrics, spans and the event trace. - ToolSpec.timeout_seconds bounds a single tool call. - OTelObserver takes redact / allow_unredacted like EventTraceObserver. - Refresh stale docs and add the hosted-tools guide. Co-Authored-By: Claude Sonnet 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.
What
Implements items 7-12 of the High priority section of
BACKLOG.md.Why
max_iterations, and a budget above the ceiling was lowered.max_tokenswas retried verbatim as a transient error.deadline_seconds.OTelObservercaptured content with no redaction, unlikeEventTraceObserver.Changes
LoopBudgetExceeded(kind="max_tokens")with the newConversationStatus.TOKEN_LIMIT.ModelResponse.contentmay be empty only whenstop_reasonisMAX_TOKENS. The loop treats it as a truncation and raises the budget. Any other empty turn is stillResponseInvalid.<unregistered>to observers, summaries, metrics, spans and the event trace. The model still gets the real name back.ToolSpec.timeout_secondsand@tool(timeout_seconds=...). A timed-out handler's daemon thread is abandoned, not killed.OTelObserver(redact=, allow_unredacted=). Capture without either raisesConfigurationError. Text is redacted and then clipped, a redactor that raises drops the attribute, and exceptions are recorded without a stack trace.Agent(trace=True)still never captures.docs/guides/hosted-tools.mdand the Responses andOriginsections, and updated the changelog and backlog.Breaking:
OTelObserver(capture_content=True)now needs a redactor. Theagentloop-toolsexamples in the hosted-tools guide were written from the backlog and not run. ruff and mypy are clean and 575 tests pass; the coverage gate was not run.🤖 Generated with Claude Code