agent-think: use observability preview and 250 steps#1960
Merged
Conversation
|
agents
@cloudflare/ai-chat
@cloudflare/codemode
create-think
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
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
be4f7abcstoreMessagesandstoreToolsWhy
The latest review/demo run for #1718 exhausted the 100-step cap after 104 successful bash calls and two recovered container errors. Production currently emits no custom
invoke_agent,chat, orexecute_toolspans, so the terminal status shows only that another tool was requested at step 100, not the model/tool topology that led there.This PR gives agent-think the same tracing behavior consistently through pinned dependencies rather than deploying the #1860 source branch directly.
Dependency provenance
Top-level dependencies are pinned to PR #1860 commit
be4f7abcf892a39449ec630b24e7f19e61309e92:agents@cloudflare/ai-chat@cloudflare/thinkTheir transitive preview family is recorded in
pnpm-lock.yamlwith exact pkg.pr.new URLs and integrity hashes. A one-time local resolver override was used only to create the lock entry; normalpnpm install --frozen-lockfilesucceeds with the repository's default exotic-subdependency policy.Verification
pnpm run check: exports, formatting, lint, and all 117 TypeScript projects passedProduction plan
After review, deploy code-only with
--containers-rollout none, preserving the existing container image. Then continue the existing failedcloudflare-agents-1718session through the command center without adding another GitHub comment and inspect the resultinginvoke_agent,chat, andexecute_tooltrace.Depends on #1860.
Production validation
Deployed this exact PR commit (
4628163d) code-only as Worker versionb602b2a9-b85a-4a33-8a96-dd2ec99cc189; the existing container image was preserved.Continued the existing
cloudflare-agents-1718session without a new comment.The continuation completed after 39 tool calls (27 before one runtime interruption, then 12 after automatic recovery); the 250-step limit was not reached.
The trace captured GPT-5.6 Sol
chatspans plus fullexecute_toolarguments/results and one completedinvoke_agentspan after recovery.The completed review found a residual stacked-near-match polynomial scan and opened fix(worker-bundler): bound stacked import scans (#1718) #1961 with commit
229b8b3f; worker-bundler tests/build and the temporary live demo passed. CI on fix(worker-bundler): bound stacked import scans (#1718) #1961 is green.Trace diagnosis
The 100-step failure was not one repeated command. It was an unbounded review/fix/test/demo workflow amplified by environment recovery:
The original turn used 110 tools across 100 model steps.
A container failure removed the checkout mid-turn; the model recloned and reconstructed its work.
GitHub authentication disappeared with that container, but agent-think retained its in-memory “already authenticated” marker for the turn, so later push attempts failed and the model spent its final steps diagnosing credentials and preserving the patch.
The final successful tool at the cap exported the patch; the model had not transitioned to a final response.
The actionable bug is container-generation-aware auth/workspace recovery, plus an explicit completion/finalization budget. Raising the cap provided diagnostic headroom but was not itself the fix.