Skip to content

Bound Agent Workflow tracking so that local state is automatically pruned#1935

Draft
ericclemmons wants to merge 2 commits into
mainfrom
codex/workflow-tracking-retention
Draft

Bound Agent Workflow tracking so that local state is automatically pruned#1935
ericclemmons wants to merge 2 commits into
mainfrom
codex/workflow-tracking-retention

Conversation

@ericclemmons

Copy link
Copy Markdown
Member

tl;dr – Automatically bound and prune Agent Workflow tracking rows.

cf_agents_workflows currently grows without bound unless applications implement their own cleanup hooks. This adds default 30-day terminal retention, derives and indexes expires_at, and arms SDK-owned cleanup when tracking begins.

Successful runs use success retention; errored and terminated runs use error retention. A single earliest-expiry alarm prunes expired local rows, reconciles missed terminal callbacks after eviction, supports sub-agent facets, and stops when no cleanup work remains. Deletion affects only Agent SQLite tracking, not the underlying Workflow instance or state.

The documentation now describes tracking as bounded operational state rather than indefinite audit history.


References: Workflow retention, Workflow limits

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 430722e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
agents Patch
@cloudflare/agent-think Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@1935

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@1935

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@1935

create-think

npm i https://pkg.pr.new/create-think@1935

hono-agents

npm i https://pkg.pr.new/hono-agents@1935

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@1935

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@1935

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@1935

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@1935

commit: 430722e

@ericclemmons ericclemmons self-assigned this Jul 13, 2026
@ericclemmons

Copy link
Copy Markdown
Member Author

/bonk review

@ask-bonk

ask-bonk Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

UnknownError: ProviderInitError

github run

@ask-bonk

ask-bonk Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@ericclemmons Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant