Build and deploy AI Agents on Cloudflare
This report summarizes scanner evidence for cloudflare/agents, a TypeScript project with 5,806 GitHub stars. SynthScan examined 738,430 lines of code across 2712 source files, recording 1696 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 5.4 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 695 finding(s).
Are imports declared and package/API names verified? 24 finding(s).
Are wrappers, guards, and repeated structures necessary? 1212 finding(s).
Which changes need focused human review? 1696 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1696 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | design/rfc-think-multi-session.md | 129 | // ── SQLite schema (managed internally) ────────────────────────── | COMMENT |
| MEDIUM | design/rfc-think-multi-session.md | 185 | // ── Search-provider hooks (for RemoteSearchProvider) ──────────── | COMMENT |
| MEDIUM | design/rfc-think-multi-session.md | 197 | // ── Spawning chats ────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/client.tsx | 51 | // ─── Helpers ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/client.tsx | 121 | // ─── Action Queue Panel ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/client.tsx | 279 | // ─── Customer Table ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/client.tsx | 334 | // ─── Chat Panel ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/client.tsx | 649 | // ─── App Root ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 20 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 22 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 50 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 55 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 105 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 107 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 120 | // ─── Sub-agent access ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 126 | // ─── Queue table ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 145 | // ─── State sync ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 165 | // ─── Gatekeeper API ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 247 | // ─── Chat ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-gatekeeper/src/server.ts | 344 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/client.tsx | 96 | // ─── Execution Log ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/client.tsx | 153 | // ─── Customer Table ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/client.tsx | 204 | // ─── Main ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 50 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 52 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 75 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 77 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 134 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 146 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 177 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 183 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 214 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 216 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 230 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 232 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 245 | // ─── Database sub-agent ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 270 | // ─── Tables ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 284 | // ─── State sync ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 296 | // ─── Trace delivery (from TailLoopback) ────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 308 | // ─── Code execution via LOADER ─────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 407 | // ─── Chat ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-sandbox/src/server.ts | 504 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/e2e/recovery.test.ts | 369 | // ── Settled-tool persist gate against a FOREIGN tool vocabulary ───────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 180 | // ── Handshake host state (shared with the streaming/broadcast loop) ───────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 208 | // ── Transcript persistence ────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 347 | // ── Model selection (faux default | real Workers AI) ─────────────────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 386 | // ── Turn execution (fiber-wrapped so a mid-stream crash is recoverable) ───── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 631 | // ── Scheduled recovery callbacks (engine-driven) ──────────────────────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 641 | // ── WebSocket wiring: drive the shared ResumeHandshake ────────────────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 733 | // ── Fiber recovery entry: drive the shared engine ─────────────────────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 800 | // ── Shared engine adapter ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/tanstack-agent.ts | 911 | // ── Inspection surface (server HTTP → e2e assertions) ─────────────────────── | COMMENT |
| MEDIUM | experimental/tanstack-recovery/src/ws-bridge.ts | 143 | // ── internals ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gateway-resume-think/src/layer-b.test.ts | 11 | // ── helpers ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gateway-resume-think/src/layer-b.test.ts | 58 | // ── planResume (Layer-B decision) ────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gateway-resume-think/src/layer-b.test.ts | 97 | // ── createResumableStream — cross-invocation re-attach ────────────────────── | COMMENT |
| MEDIUM | experimental/gateway-resume-think/src/layer-b.test.ts | 159 | // ── zero-loss reconstruction (parse-layer seam) ──────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-subagents/src/client.tsx | 102 | // ─── Perspective Card ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-subagents/src/client.tsx | 169 | // ─── Analysis Panel ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | experimental/gadgets-subagents/src/client.tsx | 259 | // ─── Main ────────────────────────────────────────────────────────────────── | COMMENT |
| 916 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pnpm-workspace.yaml | 32 | # Transitive dep of @cloudflare/tanstack-ai (tanstack-recovery harness). The | COMMENT |
| MEDIUM | experimental/gateway-resume-think/src/server.ts | 120 | // mismatch (RFC §9.4) it can drop the prefix. from=0 is the robust, | COMMENT |
| MEDIUM | experimental/gateway-resume/src/index.ts | 13 | * (RFC #1257). This harness verifies the contract empirically, across models, | COMMENT |
| MEDIUM | examples/next/harnesses/pi/src/sockets.ts | 61 | readonly #harness: PiHarness; | CODE |
| MEDIUM | examples/next/harnesses/pi/src/sockets.ts | 72 | this.#harness = harness; | CODE |
| MEDIUM | examples/next/harnesses/pi/src/sockets.ts | 97 | for (const { id } of await this.#harness.sessions.list()) { | CODE |
| MEDIUM | examples/next/harnesses/pi/src/sockets.ts | 125 | const stream = await this.#harness.session(session).events(); | CODE |
| MEDIUM | examples/next/harnesses/pi/src/sockets.ts | 173 | const handle = this.#harness.session(session); | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 99 | readonly #harness: OpenCodeHarness; | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 110 | this.#harness = harness; | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 133 | for (const { id, busy } of await this.#harness.sessions.list()) { | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 142 | const sessions = await this.#harness.sessions.list(); | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 200 | const handle = this.#harness.session(session); | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 232 | const created = await this.#harness.sessions.create(); | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 233 | const sessions = await this.#harness.sessions.list(); | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 253 | const handle = this.#harness.session(session); | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 257 | this.#harness.pending({ session }) | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 286 | const sessions = await this.#harness.sessions.list(); | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 290 | if (!(await this.#harness.session(session).busy())) { | CODE |
| MEDIUM | examples/next/harnesses/opencode/src/sockets.ts | 303 | for await (const event of this.#harness | CODE |
| MEDIUM | examples/next/channels/src/client.tsx | 23 | // The URL hash picks the agent and room: #<harness>/<room>. | COMMENT |
| MEDIUM | packages/think/src/harness/think.ts | 751 | if (!this.#handle) await this.harness.session().messages(); | CODE |
| MEDIUM | packages/think/src/harness/think.ts | 758 | this.#messages = await this.harness.session().messages(); | CODE |
| MEDIUM | …ages/agents/src/experimental/channels/conversations.ts | 173 | readonly #harness: HarnessConversations; | CODE |
| MEDIUM | …ages/agents/src/experimental/channels/conversations.ts | 183 | this.#harness = new HarnessConversations(options.harness, { | CODE |
| MEDIUM | …ages/agents/src/experimental/channels/conversations.ts | 231 | await this.#harness.attachAll(); | CODE |
| MEDIUM | …ages/agents/src/experimental/channels/conversations.ts | 244 | from.conversationId ?? this.#harness.defaultConversation(), | CODE |
| MEDIUM⚡ | …ages/agents/src/experimental/channels/conversations.ts | 337 | this.#harness.snapshot(conversationId) | CODE |
| MEDIUM⚡ | …ages/agents/src/experimental/channels/conversations.ts | 341 | defaultConversation: () => this.#harness.defaultConversation(), | CODE |
| MEDIUM⚡ | …ages/agents/src/experimental/channels/conversations.ts | 343 | listConversations: () => this.#runInHost(() => this.#harness.list()), | CODE |
| MEDIUM | …ages/agents/src/experimental/channels/conversations.ts | 362 | await this.#harness.onEvent(event, origin); | CODE |
| MEDIUM | …ages/agents/src/experimental/channels/conversations.ts | 406 | const harness = this.#harness; | CODE |
| MEDIUM | …ages/agents/src/experimental/channels/conversations.ts | 426 | this.#harness.snapshot(origin.conversationId) | CODE |
| MEDIUM⚡ | …nts/src/experimental/channels/harness-conversations.ts | 65 | readonly #harness: AgentHarness; | CODE |
| MEDIUM⚡ | …nts/src/experimental/channels/harness-conversations.ts | 70 | this.#harness = harness; | CODE |
| MEDIUM⚡ | …nts/src/experimental/channels/harness-conversations.ts | 76 | return this.#harness.session().id; | CODE |
| MEDIUM⚡ | …nts/src/experimental/channels/harness-conversations.ts | 162 | const sessions = await this.#harness.sessions.list(); | CODE |
| MEDIUM⚡ | …nts/src/experimental/channels/harness-conversations.ts | 172 | const session = await this.#harness.sessions.create(); | CODE |
| MEDIUM⚡ | …nts/src/experimental/channels/harness-conversations.ts | 179 | const session = await this.#harness.sessions.fork(from); | CODE |
| MEDIUM | …nts/src/experimental/channels/harness-conversations.ts | 217 | const session = this.#harness.session(conversationId); | CODE |
| MEDIUM | packages/agents/src/tests/retries.test.ts | 396 | // wrappers may not — the cause chain is the robust signal. | COMMENT |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 133 | readonly #harness: ThinkHarness; | CODE |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 153 | this.#harness = options.harness; | CODE |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 162 | this.#unobserve = this.#harness.observe((session, event) => { | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/chat.ts | 176 | return Response.json(await this.#harness.session(this.#session).messages()); | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/chat.ts | 187 | const session = this.#harness.session(this.#session); | CODE |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 228 | const session = this.#harness.session(this.#session); | CODE |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 360 | const inFlight = await this.#harness.session(this.#session).inFlight(); | CODE |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 401 | const messages = await this.#harness.session(this.#session).messages(); | CODE |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 522 | const messages = await this.#harness.session(this.#session).messages(); | CODE |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 532 | const session = this.#harness.session(this.#session); | CODE |
| MEDIUM | packages/agents/src/harness/think/chat.ts | 560 | const messages = await this.#harness.session(this.#session).messages(); | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/harness.ts | 2055 | readonly #harness: ThinkHarness; | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/harness.ts | 2064 | this.#harness = harness; | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/harness.ts | 2074 | return this.#harness.enqueue( | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/harness.ts | 2112 | return this.#harness.enqueue(this.id, { kind: "continue" }, options); | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/harness.ts | 2120 | return this.#harness.wait(this.id, operationId, signal); | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/harness.ts | 2128 | return this.#harness.abort(this.id, operationId); | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/harness.ts | 2133 | return this.#harness.reset(this.id, handoff); | CODE |
| MEDIUM⚡ | packages/agents/src/harness/think/harness.ts | 2138 | return this.#harness.messages(this.id); | CODE |
| 79 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | design/chat-api.md | 360 | async function defaultGetInitialMessagesFetch({ url }: GetInitialMessagesOptions) { | CODE |
| LOW | agent-think/src/tools/fs/edit-diff.ts | 169 | export function applyEditsToNormalizedContent( | CODE |
| LOW | docs/agents/queue.md | 156 | class DataProcessor extends Agent { | CODE |
| LOW | guides/anthropic-patterns/src/app.tsx | 109 | function getOrCreateSessionId() { | CODE |
| LOW | examples/assistant/src/client.tsx | 309 | function shouldShowStreamedTextPart(part: { | CODE |
| LOW | examples/assistant/src/auth.ts | 180 | export function createUnauthorizedResponse(request: Request) { | CODE |
| LOW | examples/dynamic-tools/src/client.tsx | 158 | function shouldShowStreamedTextPart(part: { | CODE |
| LOW | examples/next/harnesses/think/src/client.tsx | 91 | function shouldShowStreamedTextPart(part: { | CODE |
| LOW | …ples/next/harnesses/self-modifying/src/system-tools.ts | 97 | export function customToolsFromLegacyDefinitions( | CODE |
| LOW | examples/next/harnesses/codex/src/language-model-v4.ts | 208 | function responsesToolsToLanguageModelTools( | CODE |
| LOW | examples/playground/src/hooks/useUserId.ts | 6 | function getOrCreateUserId(): string { | CODE |
| LOW | examples/agents-as-tools/src/client.tsx | 163 | function isTerminalAgentToolStatus( | CODE |
| LOW | examples/auth-agent/src/auth.ts | 180 | export function createUnauthorizedResponse(request: Request) { | CODE |
| LOW | examples/chat-sdk-messenger/src/client.tsx | 639 | async function resetSelectedConversation() { | CODE |
| LOW | …amples/chat-sdk-messenger/src/intelligence/messages.ts | 14 | export function conversationNameForThread(thread: Pick<Thread, "id">): string { | CODE |
| LOW | …amples/chat-sdk-messenger/src/intelligence/messages.ts | 106 | export function extractLatestAssistantText( | CODE |
| LOW | examples/ai-chat/src/client.tsx | 94 | function shouldShowStreamedTextPart(part: { | CODE |
| LOW | examples/deploy-churn/src/server.ts | 386 | function createSingleTaskMockModel(): LanguageModel { | CODE |
| LOW | examples/voice-agent/src/stt-providers/workers-ai.ts | 8 | export function createWorkersAITranscriber( | CODE |
| LOW | examples/voice-agent/src/stt-providers/elevenlabs.ts | 5 | export function createElevenLabsTranscriber(env: Env, url: URL): Transcriber { | CODE |
| LOW | examples/voice-agent/src/stt-providers/assemblyai.ts | 13 | export function createAssemblyAITranscriber(env: Env, url: URL): Transcriber { | CODE |
| LOW | examples/voice-agent/src/stt-providers/assemblyai.ts | 29 | function getAssemblyAILanguageCodes( | CODE |
| LOW | examples/voice-agent/src/stt-providers/utils.ts | 11 | export function getOptionalProviderKeyterms(url: URL): string[] | undefined { | CODE |
| LOW | …pts/vitest/strip-node-modules-source-map-references.ts | 12 | export function stripNodeModulesSourceMapReferences(): Plugin { | CODE |
| LOW | packages/think/src/media-eviction.ts | 70 | export function resolveMediaEvictionConfig( | CODE |
| LOW | packages/think/src/think.ts | 318 | function withoutOverwrittenStartMetadata( | CODE |
| LOW | packages/think/src/think.ts | 441 | function settleMessengerRecoveryDelivery( | CODE |
| LOW | packages/think/src/think.ts | 730 | function shouldMarkSkippedAfterGenerationChange( | CODE |
| LOW | packages/think/src/think.ts | 891 | function actionAuthorizationErrorEnvelope( | CODE |
| LOW | packages/think/src/think.ts | 906 | function actionApprovalInputErrorEnvelope(): { | CODE |
| LOW | packages/think/src/think.ts | 917 | function actionPendingErrorEnvelope(): { | CODE |
| LOW | packages/think/src/think.ts | 929 | function actionKeyConflictEnvelope( | CODE |
| LOW | packages/think/src/think.ts | 978 | function safeStringifyActionOutput(output: unknown): { | CODE |
| LOW | packages/think/src/think.ts | 1009 | function prepareActionOutputForModel(output: unknown): unknown { | CODE |
| LOW | packages/think/src/think.ts | 1097 | function parseDeclaredTaskSchedule( | CODE |
| LOW | packages/think/src/think.ts | 1111 | function tryParseDeclaredTaskSchedule( | CODE |
| LOW | packages/think/src/think.ts | 1133 | function parseDeclaredTaskScheduleUnchecked( | CODE |
| LOW | packages/think/src/think.ts | 1489 | function ensureValidContinueCheckpoint( | CODE |
| LOW | packages/think/src/think.ts | 2023 | function isTransientClassification( | CODE |
| LOW | packages/think/src/think.ts | 2456 | function workflowNotificationItemId( | CODE |
| LOW | packages/think/src/think.ts | 2510 | function dropGenerationAfterToolCall( | CODE |
| LOW | packages/think/src/think.ts | 2577 | function toProviderSafeExecutionOutcomeMessage(message: UIMessage): UIMessage { | CODE |
| LOW | packages/think/src/think.ts | 2608 | function isThinkFinalAnswerToolName(name: string): boolean { | CODE |
| LOW | packages/think/src/think.ts | 2619 | function thinkFinalAnswerInstruction(toolName: string): string { | CODE |
| LOW | packages/think/src/think.ts | 3095 | export function defaultContextOverflowClassifier( | CODE |
| LOW | packages/think/src/tools/execute.ts | 375 | export function truncatePausedExecutionOutput(output: unknown): unknown { | CODE |
| LOW | packages/think/src/tools/fetch.ts | 857 | function normalizeAllowlistPattern(pattern: string): string { | CODE |
| LOW | packages/think/src/tests/submissions.test.ts | 1539 | async function seedRunningStructuredSubmission( | CODE |
| LOW | packages/think/src/tests/message-reconciliation.test.ts | 138 | function makeClientOptimisticAssistant(id: string): UIMessage { | CODE |
| LOW | packages/think/src/tests/eviction-recovery.test.ts | 35 | async function seedInterruptedContinueTurn( | CODE |
| LOW | packages/think/src/tests/streaming-message-id.test.ts | 40 | function runTurnAndCollectStartChunks( | CODE |
| LOW | packages/think/src/tests/client-tools.test.ts | 224 | async function waitForOverlappingSubmits( | CODE |
| LOW | packages/think/src/tests/client-tools.test.ts | 3263 | async function answerMidStreamThenSettle(agent: ChainAgent, ws: WebSocket) { | CODE |
| LOW | packages/think/src/tests/client-tools.test.ts | 3275 | async function expectOneContinuationPerStep(agent: ChainAgent) { | CODE |
| LOW⚡ | packages/think/src/tests/think-session.test.ts | 154 | async function freshConfigInSessionAgent(name: string) { | CODE |
| LOW⚡ | packages/think/src/tests/think-session.test.ts | 161 | async function freshLegacyConfigMigrationAgent(name: string) { | CODE |
| LOW | packages/think/src/tests/terminal-frame-order.test.ts | 77 | function expectTranscriptBeforeDone(frames: Frame[], text: string) { | CODE |
| LOW | packages/think/src/tests/actions-durable-pause.test.ts | 837 | async function approvedMidStreamWithoutContinuation(name: string) { | CODE |
| LOW | packages/think/src/tests/agents/execute-hitl.ts | 40 | function executionOutcomeRolesInPrompt( | CODE |
| LOW | packages/think/src/tests/agents/think-session.ts | 87 | function recoveryTransportCountsForTest( | CODE |
| 175 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/agents/workflows.md | 69 | // Step 1: Process data | COMMENT |
| LOW | docs/agents/workflows.md | 82 | // Step 2: Save results | COMMENT |
| LOW | docs/agents/human-in-the-loop.md | 69 | // Step 1: Validate the expense | COMMENT |
| LOW | docs/agents/human-in-the-loop.md | 74 | // Step 2: Wait for manager approval | COMMENT |
| LOW | docs/agents/human-in-the-loop.md | 88 | // Step 3: Process the approved expense | COMMENT |
| LOW | docs/agents/mcp-transports.md | 98 | #### Step 1: Define your MCP server | COMMENT |
| LOW | docs/agents/mcp-transports.md | 134 | #### Step 2: Connect your Agent to the MCP server | COMMENT |
| LOW | docs/agents/mcp-transports.md | 165 | #### Step 3: Configure Durable Object bindings | COMMENT |
| LOW | docs/agents/mcp-transports.md | 186 | #### Step 4: Set up your Worker fetch handler | COMMENT |
| LOW | examples/workflows/src/server.ts | 438 | // Step 1: Validate | COMMENT |
| LOW | examples/workflows/src/server.ts | 460 | // Step 2: Process | COMMENT |
| LOW | examples/workflows/src/server.ts | 486 | // Step 3: Wait for human approval | COMMENT |
| LOW | examples/workflows/src/server.ts | 511 | // Step 4: Finalize | COMMENT |
| LOW⚡ | packages/agents/README.md | 414 | // Step 1: Validate (retries automatically on failure) | COMMENT |
| LOW⚡ | packages/agents/README.md | 419 | // Step 2: Wait for human approval | COMMENT |
| LOW⚡ | packages/agents/README.md | 423 | // Step 3: Process the approved order | COMMENT |
| LOW⚡ | packages/agents/src/tests/test-workflow.ts | 36 | // Step 1: Report start (non-durable) | COMMENT |
| LOW⚡ | packages/agents/src/tests/test-workflow.ts | 44 | // Step 2: If waiting for approval, pause and wait for event | COMMENT |
| LOW | packages/agents/src/tests/test-workflow.ts | 66 | // Step 3: Process the task (non-durable progress report) | COMMENT |
| LOW | packages/agents/src/tests/test-workflow.ts | 85 | // Step 4: Call agent method via RPC (if agent is available) | COMMENT |
| LOW⚡ | packages/agents/src/tests/test-workflow.ts | 96 | // Step 5: Broadcast to clients (non-durable) | COMMENT |
| LOW⚡ | packages/agents/src/tests/test-workflow.ts | 103 | // Step 6: Report completion (durable via step) | COMMENT |
| LOW | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 186 | // Step 1: Open observer WebSocket and wait for it to be established | COMMENT |
| LOW⚡ | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 221 | // Step 2: Wait for WebSocket to be fully registered with the DO | COMMENT |
| LOW⚡ | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 224 | // Step 3: Trigger server-initiated stream via Playwright's request API | COMMENT |
| LOW⚡ | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 233 | // Step 4: Wait a bit for stream completion to propagate | COMMENT |
| LOW⚡ | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 236 | // Step 5: Collect observer results from the browser | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 21 | // Step 1: Persist a message with tool output on the server | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 38 | // Step 2: Client sends the same message but without the tool output | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 62 | // Step 3: Verify the tool output is preserved | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 85 | // Step 1: Server has a tool that was approved and executed (output-available) | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 102 | // Step 2: Client sends the same tool but in approval-responded state | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 126 | // Step 3: Verify the server's output-available state is preserved, | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 152 | // Step 1: Server has a tool that was executed (output-available) | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 169 | // Step 2: Client sends the same tool but in approval-requested state | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 192 | // Step 3: Verify the server's output-available state is preserved, | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 523 | // Step 1: Simulate an initial interrupted stream | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 543 | // Step 2: Continue, producing more content | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 556 | // Step 3: Simulate that continuation was ALSO interrupted — | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 568 | // Step 4: Trigger fiber recovery — should persist the second partial | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 580 | // Step 5: Continue again | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 85 | // Step 1: Send initial request so context is established | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 88 | // Step 2: Persist a tool call in input-available state | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 106 | // Step 3: Clear captured state before continuation | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 109 | // Step 4: Send tool result with autoContinue | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 145 | // Step 1: Send initial request | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 148 | // Step 2: Persist a tool call in approval-required state | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 166 | // Step 3: Clear captured state | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 169 | // Step 4: Send approval with autoContinue | COMMENT |
| LOW | packages/ai-chat/src/tests/request-id.test.ts | 123 | // Step 5: Verify a requestId was passed (server-generated, so just check it exists) | COMMENT |
| LOW | packages/ai-chat/src/tests/request-id.test.ts | 182 | // Step 5: Verify requestId was passed | COMMENT |
| LOW | …kages/ai-chat/src/tests/client-tools-reconnect.test.ts | 12 | // Step 1: Set up a conversation with a pending tool call (simulates state before refresh) | COMMENT |
| LOW | …kages/ai-chat/src/tests/client-tools-reconnect.test.ts | 38 | // Step 2: Connect (simulates reconnect after refresh) | COMMENT |
| LOW | …kages/ai-chat/src/tests/client-tools-reconnect.test.ts | 49 | // Step 3: Send tool result WITH clientTools (simulates client approval after reconnect) | COMMENT |
| LOW | …kages/ai-chat/src/tests/client-tools-reconnect.test.ts | 83 | // Step 4: Verify continuation received client tools | COMMENT |
| LOW | packages/ai-chat/src/tests/on-stream-end.test.ts | 320 | // Step 1: Send initial chat request to establish the agent | COMMENT |
| LOW | packages/ai-chat/src/tests/on-stream-end.test.ts | 334 | // Step 2: Persist a tool call in input-available state | COMMENT |
| LOW | packages/ai-chat/src/tests/on-stream-end.test.ts | 354 | // Step 3: Send tool result with autoContinue=true | COMMENT |
| LOW | packages/ai-chat/src/tests/on-stream-end.test.ts | 368 | // Step 4: Verify onChatResponse results | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/regenerate-message.test.ts | 70 | // Step 1: Send the first message — server will respond with an assistant message | COMMENT |
| 14 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | design/rfc-think-multi-session.md | 121 | /** | COMMENT |
| LOW | experimental/tanstack-recovery/src/tanstack-agent.ts | 121 | // The model provider this turn ran under (`faux` default | `workers-ai`). Stored | COMMENT |
| LOW | experimental/gateway-resume/src/index.ts | 61 | // | COMMENT |
| LOW | experimental/gateway-resume/src/index.ts | 301 | COMMENT | |
| LOW | experimental/chat-recovery-probe/src/server.ts | 61 | // | COMMENT |
| LOW | agent-think/worker-configuration.d.ts | 14461 | // The message includes metadata about the broker, the client, and the payload | COMMENT |
| LOW | agent-think/worker-configuration.d.ts | 14601 | [K in keyof T]: Unstubify<T[K]>; | COMMENT |
| LOW | agent-think/worker-configuration.d.ts | 14641 | [K in keyof T]: MethodOrProperty<T[K]>; | COMMENT |
| LOW | agent-think/worker-configuration.d.ts | 14661 | // interface GlobalProps { | COMMENT |
| LOW | agent-think/worker-configuration.d.ts | 15921 | | StreamDiagnostic | COMMENT |
| LOW | agent-think/test/env.d.ts | 1 | /// <reference types="@cloudflare/vitest-pool-workers/types" /> | COMMENT |
| LOW | agent-think/test/vitest.config.ts | 21 | stripNodeModulesSourceMapReferences(), | COMMENT |
| LOW | agent-think/test/server.ts | 1 | import { setupServer } from "msw/node"; | COMMENT |
| LOW | agent-think/src/sandbox.ts | 61 | constructor(ctx: DurableObjectState, env: SandboxEnv) { | COMMENT |
| LOW | agent-think/src/sandbox.ts | 81 | // CloudflareContainerBackend(container) [stage=connect]: | COMMENT |
| LOW | docs/agents/chat-agents.md | 661 | override chatRecovery = { | COMMENT |
| LOW | docs/agents/sub-agents.md | 461 | COMMENT | |
| LOW | …amples/assistant/agents/assistant/shared-mcp-client.ts | 1 | import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; | COMMENT |
| LOW | examples/assistant/agents/assistant/agent.ts | 1 | import { callable } from "agents"; | COMMENT |
| LOW | examples/assistant/agents/assistant/agent.ts | 281 | } | COMMENT |
| LOW | examples/assistant/agents/assistant/agent.ts | 381 | async symlink(target: string, linkPath: string): Promise<void> { | COMMENT |
| LOW | examples/assistant/agents/assistant/shared-workspace.ts | 1 | import type { Workspace } from "@cloudflare/think"; | COMMENT |
| LOW | examples/assistant/src/use-chats.ts | 101 | // from the directory — which is the single source of truth for | COMMENT |
| LOW | examples/assistant/src/client.tsx | 481 | } | null>(null); | COMMENT |
| LOW | examples/assistant/src/tests/env.d.ts | 1 | /// <reference types="@cloudflare/vitest-pool-workers/types" /> | COMMENT |
| LOW | examples/next/harnesses/codex/wasm-kernel/src/lib.rs | 1 | //! A small Codex-derived transition kernel for Cloudflare Workers. | COMMENT |
| LOW | examples/agents-as-tools/playwright.config.ts | 41 | // Real-LLM timing — see the comment block above. The example | COMMENT |
| LOW | examples/agents-as-tools/playwright.config.ts | 61 | // suite. With 1 retry we can ride out transient capacity issues | COMMENT |
| LOW | examples/agents-as-tools/e2e/refresh-replay.e2e.ts | 61 | // `cf_agent_tool_runs` is the source of truth and never | COMMENT |
| LOW | examples/agents-as-tools/e2e/planner-drill-in.e2e.ts | 61 | // Sanity: a Planner panel rendered. The bug would have NOT | COMMENT |
| LOW | examples/agents-as-tools/e2e/compare-fanout.e2e.ts | 41 | // "Compare X and Y" is in-distribution for the `compare` tool — | COMMENT |
| LOW | examples/agents-as-tools/src/client.tsx | 801 | // | COMMENT |
| LOW | examples/agents-as-tools/src/client.tsx | 841 | // shipped on 2026-04-28 from a different root cause. | COMMENT |
| LOW | examples/deploy-churn/src/server.ts | 281 | // | COMMENT |
| LOW | examples/voice-agent/src/client.tsx | 441 | // The VoiceClient passes unknown JSON to onNonVoiceMessage, but that only | COMMENT |
| LOW | examples/voice-agent/src/client.tsx | 521 | // public API. Instead, we create a temporary PartySocket connection. | COMMENT |
| LOW | examples/voice-agent/src/client.tsx | 541 | // But actually, the better approach is to just send the kick via the | COMMENT |
| LOW | packages/think/src/think.ts | 1421 | * `Think`'s `classifyRecoveredTurn` detail (the {@link ChatFiberWakeHooks} | COMMENT |
| LOW | packages/think/src/think.ts | 1441 | // incident engine (agents/chat) and are applied by `resolveChatRecoveryConfig` | COMMENT |
| LOW | packages/think/src/think.ts | 1461 | // through to a spurious error, and a true orphan (a sibling that never arrives) | COMMENT |
| LOW | packages/think/src/think.ts | 4841 | // client tool result can arrive over the WebSocket before that write (the | COMMENT |
| LOW | packages/think/src/think.ts | 7721 | : this._turnTelemetry(turnTelemetry), | COMMENT |
| LOW | packages/think/src/think.ts | 7741 | // instance which is not JSON-serializable, and a returned override | COMMENT |
| LOW | packages/think/src/think.ts | 7801 | // also accepts the renamed `onStepEnd`, but v6 does not). Use the shared | COMMENT |
| LOW | packages/think/src/think.ts | 8721 | // keeps it a *direct* AsyncIterable so the AI SDK streams the | COMMENT |
| LOW | packages/think/src/think.ts | 10521 | }; | COMMENT |
| LOW | packages/think/src/think.ts | 13561 | return _onConnect(connection, ctx); | COMMENT |
| LOW | packages/think/src/think.ts | 14541 | // When a stall-recovery early-return schedules a continuation, the | COMMENT |
| LOW | packages/think/src/think.ts | 14721 | } | COMMENT |
| LOW | packages/think/src/think.ts | 15301 | // `doneSent = true` keeps the outer `finally` from emitting one (it would | COMMENT |
| LOW | packages/think/src/think.ts | 16681 | // the eventual end-of-stream persist. | COMMENT |
| LOW | packages/think/src/think.ts | 17061 | (await this.ctx.storage.get<ChatRecoveryIncident>(key)) ?? null, | COMMENT |
| LOW | packages/think/src/think.ts | 18621 | if (!ready) { | COMMENT |
| LOW | packages/think/src/tools/workspace.ts | 1 | import type { Workspace, FileInfo } from "@cloudflare/shell"; | COMMENT |
| LOW | packages/think/src/tests/client-tools.test.ts | 2061 | // Non-evicted, this combination DOES continue once: the errored | COMMENT |
| LOW | packages/think/src/tests/onconnect-broadcast.test.ts | 341 | COMMENT | |
| LOW | packages/think/src/tests/think-session.test.ts | 601 | COMMENT | |
| LOW | packages/think/src/e2e-tests/harden-net.ts | 1 | // Side-effect module for the `wrangler dev` chaos e2e tests. Import it (for its | COMMENT |
| LOW | packages/think/src/e2e-tests/messenger-recovery.test.ts | 261 | // | COMMENT |
| LOW | packages/think/src/e2e-tests/worker.ts | 941 | child | COMMENT |
| 79 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/workflows/src/server.ts | 438 | // Step 1: Validate | COMMENT |
| LOW | examples/workflows/src/server.ts | 460 | // Step 2: Process | COMMENT |
| LOW | examples/workflows/src/server.ts | 486 | // Step 3: Wait for human approval | COMMENT |
| LOW | examples/workflows/src/server.ts | 511 | // Step 4: Finalize | COMMENT |
| LOW⚡ | packages/agents/src/tests/test-workflow.ts | 36 | // Step 1: Report start (non-durable) | COMMENT |
| LOW⚡ | packages/agents/src/tests/test-workflow.ts | 44 | // Step 2: If waiting for approval, pause and wait for event | COMMENT |
| LOW | packages/agents/src/tests/test-workflow.ts | 66 | // Step 3: Process the task (non-durable progress report) | COMMENT |
| LOW | packages/agents/src/tests/test-workflow.ts | 85 | // Step 4: Call agent method via RPC (if agent is available) | COMMENT |
| LOW⚡ | packages/agents/src/tests/test-workflow.ts | 96 | // Step 5: Broadcast to clients (non-durable) | COMMENT |
| LOW⚡ | packages/agents/src/tests/test-workflow.ts | 103 | // Step 6: Report completion (durable via step) | COMMENT |
| LOW | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 186 | // Step 1: Open observer WebSocket and wait for it to be established | COMMENT |
| LOW⚡ | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 221 | // Step 2: Wait for WebSocket to be fully registered with the DO | COMMENT |
| LOW⚡ | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 224 | // Step 3: Trigger server-initiated stream via Playwright's request API | COMMENT |
| LOW⚡ | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 233 | // Step 4: Wait a bit for stream completion to propagate | COMMENT |
| LOW⚡ | packages/ai-chat/e2e/on-stream-end-llm.spec.ts | 236 | // Step 5: Collect observer results from the browser | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 21 | // Step 1: Persist a message with tool output on the server | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 38 | // Step 2: Client sends the same message but without the tool output | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 62 | // Step 3: Verify the tool output is preserved | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 85 | // Step 1: Server has a tool that was approved and executed (output-available) | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 102 | // Step 2: Client sends the same tool but in approval-responded state | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 126 | // Step 3: Verify the server's output-available state is preserved, | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 152 | // Step 1: Server has a tool that was executed (output-available) | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 169 | // Step 2: Client sends the same tool but in approval-requested state | COMMENT |
| LOW | packages/ai-chat/src/tests/merge-server-state.test.ts | 192 | // Step 3: Verify the server's output-available state is preserved, | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 523 | // Step 1: Simulate an initial interrupted stream | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 543 | // Step 2: Continue, producing more content | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 556 | // Step 3: Simulate that continuation was ALSO interrupted — | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 568 | // Step 4: Trigger fiber recovery — should persist the second partial | COMMENT |
| LOW | packages/ai-chat/src/tests/continue-last-turn.test.ts | 580 | // Step 5: Continue again | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 85 | // Step 1: Send initial request so context is established | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 88 | // Step 2: Persist a tool call in input-available state | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 106 | // Step 3: Clear captured state before continuation | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 109 | // Step 4: Send tool result with autoContinue | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 145 | // Step 1: Send initial request | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 148 | // Step 2: Persist a tool call in approval-required state | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 166 | // Step 3: Clear captured state | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/request-id.test.ts | 169 | // Step 4: Send approval with autoContinue | COMMENT |
| LOW | packages/ai-chat/src/tests/request-id.test.ts | 123 | // Step 5: Verify a requestId was passed (server-generated, so just check it exists) | COMMENT |
| LOW | packages/ai-chat/src/tests/request-id.test.ts | 182 | // Step 5: Verify requestId was passed | COMMENT |
| LOW | …kages/ai-chat/src/tests/client-tools-reconnect.test.ts | 12 | // Step 1: Set up a conversation with a pending tool call (simulates state before refresh) | COMMENT |
| LOW | …kages/ai-chat/src/tests/client-tools-reconnect.test.ts | 38 | // Step 2: Connect (simulates reconnect after refresh) | COMMENT |
| LOW | …kages/ai-chat/src/tests/client-tools-reconnect.test.ts | 49 | // Step 3: Send tool result WITH clientTools (simulates client approval after reconnect) | COMMENT |
| LOW | …kages/ai-chat/src/tests/client-tools-reconnect.test.ts | 83 | // Step 4: Verify continuation received client tools | COMMENT |
| LOW | packages/ai-chat/src/tests/on-stream-end.test.ts | 320 | // Step 1: Send initial chat request to establish the agent | COMMENT |
| LOW | packages/ai-chat/src/tests/on-stream-end.test.ts | 334 | // Step 2: Persist a tool call in input-available state | COMMENT |
| LOW | packages/ai-chat/src/tests/on-stream-end.test.ts | 354 | // Step 3: Send tool result with autoContinue=true | COMMENT |
| LOW | packages/ai-chat/src/tests/on-stream-end.test.ts | 368 | // Step 4: Verify onChatResponse results | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/regenerate-message.test.ts | 70 | // Step 1: Send the first message — server will respond with an assistant message | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/regenerate-message.test.ts | 80 | // Step 2: Simulate regenerate() — client removes the assistant message | COMMENT |
| LOW⚡ | packages/ai-chat/src/tests/regenerate-message.test.ts | 85 | // Step 3: Verify the old assistant message was deleted and replaced | COMMENT |
| LOW | …ges/ai-chat/src/tests/custom-body-continuation.test.ts | 16 | // Step 1: Send initial chat request WITH custom body fields to store them | COMMENT |
| LOW | …ges/ai-chat/src/tests/custom-body-continuation.test.ts | 67 | // Step 2: Persist a tool call in input-available state | COMMENT |
| LOW⚡ | …ges/ai-chat/src/tests/custom-body-continuation.test.ts | 85 | // Step 3: Clear captured state before continuation | COMMENT |
| LOW⚡ | …ges/ai-chat/src/tests/custom-body-continuation.test.ts | 88 | // Step 4: Send tool result with autoContinue to trigger continuation | COMMENT |
| LOW | …ges/ai-chat/src/tests/custom-body-continuation.test.ts | 104 | // Step 5: Verify continuation received the same body | COMMENT |
| LOW | …es/ai-chat/src/tests/client-tools-continuation.test.ts | 43 | // Step 1: Send initial chat request WITH client tools to store them | COMMENT |
| LOW | …es/ai-chat/src/tests/client-tools-continuation.test.ts | 105 | // Step 2: Persist a tool call in input-available state | COMMENT |
| LOW⚡ | …es/ai-chat/src/tests/client-tools-continuation.test.ts | 123 | // Step 3: Clear captured state before continuation | COMMENT |
| LOW⚡ | …es/ai-chat/src/tests/client-tools-continuation.test.ts | 126 | // Step 4: Send tool result with autoContinue to trigger continuation | COMMENT |
| LOW | …es/ai-chat/src/tests/client-tools-continuation.test.ts | 140 | // Step 5: Verify continuation received client tools | COMMENT |
| 2 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | design/rfc-helper-sub-agent-orchestration.md | 1 | # RFC: Agent tool orchestration | COMMENT |
| MEDIUM | design/rfc-chat-recovery-foundation.md | 1043 | | Auto-continuation barrier | Barrier inside the continuation turn; fixed 60s timeout t | CODE |
| MEDIUM | design/rfc-chat-recovery-foundation.md | 1155 | #### Adopt Think's event-driven auto-continuation barrier | COMMENT |
| MEDIUM | design/rfc-chat-recovery-foundation-progress.md | 1647 | ### Phase 1: introduce internal engine scaffolding | COMMENT |
| MEDIUM | experimental/inference-buffer/README.md | 213 | The SDK handles: model wrapping (custom fetch for all providers — including Workers AI via the `fetch` option added in [ | CODE |
| MEDIUM | docs/think/index.md | 674 | [Compaction](https://github.com/cloudflare/agents/blob/main/docs/agents/sessions.md#compaction) is checked **between tur | CODE |
| MEDIUM | docs/think/sub-agents.md | 351 | See [`cloudflare/agents#1406`](https://github.com/cloudflare/agents/issues/1406) for the original motivation, and [Agent | CODE |
| MEDIUM | docs/think/sub-agents.md | 510 | | `maxRecoveryWork` | `10000` | Runaway-loop guard: max recovery work since the incident opened before a | CODE |
| MEDIUM | docs/think/sub-agents.md | 510 | | `maxRecoveryWork` | `10000` | Runaway-loop guard: max recovery work since the incident opened before a | CODE |
| MEDIUM | docs/agents/browse-the-web.md | 514 | You can also manage Browser Rendering sessions directly. `createBrowserSession` accepts [hostname guardrails](https://de | CODE |
| MEDIUM | docs/agents/chat-agents.md | 698 | | `maxRecoveryWork` | `10000` | Runaway-loop guard. Maximum recovery work since the incident began before | CODE |
| MEDIUM | docs/agents/chat-agents.md | 1547 | Use [`wrapLanguageModel`](https://ai-sdk.dev/docs/ai-sdk-core/middleware) to add guardrails, RAG, caching, or logging wi | CODE |
| MEDIUM | examples/assistant/agents/assistant/agent.ts | 32 | // (see `getScheduledTasks`) and leaves room for top-level agentic work | COMMENT |
| MEDIUM | examples/playground/testing.md | 294 | ### Supervisor Pattern (`/multi-agent/supervisor`) | COMMENT |
| MEDIUM | examples/playground/testing.md | 351 | ### Chat Rooms (`/multi-agent/rooms`) | COMMENT |
| MEDIUM | examples/playground/testing.md | 410 | ### Workers Pattern (`/multi-agent/workers`) | COMMENT |
| MEDIUM | examples/playground/testing.md | 425 | ### Pipeline Pattern (`/multi-agent/pipeline`) | COMMENT |
| MEDIUM | examples/chat-sdk-messenger/README.md | 150 | index.ts # Ingress orchestration and Chat SDK event wiring | CODE |
| MEDIUM | examples/deploy-churn/src/server.ts | 590 | // agentic loop actually settles tool results that recovery must preserve. | COMMENT |
| MEDIUM | examples/multi-ai-chat/src/server.ts | 330 | // Allow multi-step agentic loops — the model can call a tool, | COMMENT |
| MEDIUM | packages/think/CHANGELOG.md | 658 | - [#1817](https://github.com/cloudflare/agents/pull/1817) [`7f367d8`](https://github.com/cloudflare/agents/commit/7f367d | CODE |
| MEDIUM | packages/think/CHANGELOG.md | 658 | - [#1817](https://github.com/cloudflare/agents/pull/1817) [`7f367d8`](https://github.com/cloudflare/agents/commit/7f367d | CODE |
| MEDIUM | packages/think/CHANGELOG.md | 1153 | - [#1667](https://github.com/cloudflare/agents/pull/1667) [`919bfaa`](https://github.com/cloudflare/agents/commit/919bfa | CODE |
| MEDIUM | packages/think/CHANGELOG.md | 1468 | - [#1641](https://github.com/cloudflare/agents/pull/1641) [`3aa1936`](https://github.com/cloudflare/agents/commit/3aa193 | CODE |
| MEDIUM | packages/think/CHANGELOG.md | 1603 | - [#1561](https://github.com/cloudflare/agents/pull/1561) [`831ba1d`](https://github.com/cloudflare/agents/commit/831ba1 | CODE |
| MEDIUM | packages/think/CHANGELOG.md | 1603 | - [#1561](https://github.com/cloudflare/agents/pull/1561) [`831ba1d`](https://github.com/cloudflare/agents/commit/831ba1 | CODE |
| MEDIUM | packages/think/CHANGELOG.md | 1642 | - [#1517](https://github.com/cloudflare/agents/pull/1517) [`449b421`](https://github.com/cloudflare/agents/commit/449b42 | CODE |
| MEDIUM | packages/think/CHANGELOG.md | 1686 | - [#1421](https://github.com/cloudflare/agents/pull/1421) [`1b65ff5`](https://github.com/cloudflare/agents/commit/1b65ff | CODE |
| MEDIUM | packages/think/CHANGELOG.md | 1762 | - [#1372](https://github.com/cloudflare/agents/pull/1372) [`040da0f`](https://github.com/cloudflare/agents/commit/040da0 | CODE |
| MEDIUM | packages/think/src/tests/hooks.test.ts | 383 | // agentic loop, and `ctx.steps` / `ctx.stepNumber` must reflect the | COMMENT |
| MEDIUM | …ges/think/src/e2e-tests/step-prompt-structured.test.ts | 223 | // Multi-step agentic path: the model must call real (workspace) tools before | COMMENT |
| MEDIUM | packages/agents/CHANGELOG.md | 118 | - [#2294](https://github.com/cloudflare/agents/pull/2294) [`abda4e3`](https://github.com/cloudflare/agents/commit/abda4e | CODE |
| MEDIUM | packages/agents/CHANGELOG.md | 118 | - [#2294](https://github.com/cloudflare/agents/pull/2294) [`abda4e3`](https://github.com/cloudflare/agents/commit/abda4e | CODE |
| MEDIUM | packages/agents/CHANGELOG.md | 1954 | - [#1641](https://github.com/cloudflare/agents/pull/1641) [`3aa1936`](https://github.com/cloudflare/agents/commit/3aa193 | CODE |
| MEDIUM | packages/agents/CHANGELOG.md | 2131 | - [#1421](https://github.com/cloudflare/agents/pull/1421) [`1b65ff5`](https://github.com/cloudflare/agents/commit/1b65ff | CODE |
| MEDIUM | packages/agents/src/browser/browser-run.ts | 13 | * Browser Run [hostname guardrails](https://developers.cloudflare.com/browser-run/features/guardrails/): | COMMENT |
| MEDIUM | packages/agents/src/browser/browser-run.ts | 183 | // uniform whether or not guardrails are set. | COMMENT |
| MEDIUM | …es/agents/src/tests-d/browser-engine-options.test-d.ts | 51 | // openOneShotBrowserSession — same split, plus guardrails on the Chromium arm. | COMMENT |
| MEDIUM | …es/agents/src/tests-d/browser-engine-options.test-d.ts | 68 | // @ts-expect-error — guardrails are Chromium-only | COMMENT |
| MEDIUM | packages/ai-chat/CHANGELOG.md | 373 | - [#1788](https://github.com/cloudflare/agents/pull/1788) [`3b2af54`](https://github.com/cloudflare/agents/commit/3b2af5 | CODE |
| MEDIUM | packages/ai-chat/CHANGELOG.md | 877 | - [#1641](https://github.com/cloudflare/agents/pull/1641) [`3aa1936`](https://github.com/cloudflare/agents/commit/3aa193 | CODE |
| MEDIUM | packages/ai-chat/CHANGELOG.md | 1000 | - [#1421](https://github.com/cloudflare/agents/pull/1421) [`1b65ff5`](https://github.com/cloudflare/agents/commit/1b65ff | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/agents/email.md | 349 | await email.forward("admin@example.com"); | CODE |
| LOW | docs/agents/scheduling.md | 149 | await this.schedule(300, "sendFollowUp", { email: "user@example.com" }); | CODE |
| LOW | docs/agents/retries.md | 176 | { to: "user@example.com" }, | CODE |
| LOW | docs/agents/queue.md | 114 | email: "user@example.com", | CODE |
| LOW | examples/next/harnesses/codex/src/stress/model.ts | 33 | const unit = `${seed} lorem ipsum dolor sit amet `; | CODE |
| LOW | examples/next/harnesses/codex/src/stress/model.ts | 33 | const unit = `${seed} lorem ipsum dolor sit amet `; | CODE |
| LOW | packages/think/src/tests/action-types.test-d.ts | 144 | to: ["user@example.com"] | CODE |
| LOW | packages/shell/src/tests/git.test.ts | 266 | author: { name: "Test", email: "test@test.com" } | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 552 | from: "user@example.com" | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 639 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 655 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 666 | expect(call!.to).toBe("user@example.com"); | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 684 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 705 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 729 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 752 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 761 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 774 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-routing.test.ts | 783 | to: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/email-headers.test.ts | 80 | From: "user@example.com", | CODE |
| LOW | packages/agents/src/tests/models/ai-sdk/gateway.test.ts | 992 | "x-api-key": "placeholder" | CODE |
| LOW | packages/agents/conformance/everything-server.ts | 372 | default: "John Doe" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | packages/agents/src/tests/skill-runner.test.ts | 640 | print(template.replace("{{text}}", data["text"].upper()))`, | CODE |
| HIGH | packages/agents/src/tests/skill-runner.test.ts | 678 | print("done")` | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | design/rfc-workers-ai-gateway-merge.md | 465 | model: string; // slug as requested, e.g. "openrouter/anthropic/claude-…" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guides/anthropic-patterns/src/app.tsx | 168 | // TODO: Add validation | COMMENT |
| LOW | guides/anthropic-patterns/src/app.tsx | 252 | "e.g.,\nfunction processUserData(data) {\n // TODO: Add validation\n database.save(data);\n return true | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | site/agents/src/components/header-visual.tsx | 167 | text: "If you’re using a CLI-based PR system, let me know which tool you use (e.g., GitLab CLI, Gite | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/agents/src/skills/runner.ts | 779 | except Exception as err: | CODE |