Repository navigation
ThinkHarness: sessions and client tools are Sessions values - #3158
Merged
Merged
Conversation
…ed version's store moves there and is dropped
🦋 Changeset detectedLatest commit: 475980d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
Contributor
🟡 agents import sizes: 3 entry points grew
Changed exports (4)
How this worksEach runtime export is bundled on its own, minified, and gzipped. Changes smaller than 100 B, or smaller than 1% and 1 KiB, are ignored. Growth over 10% or 5 KiB is marked 🔴. This report is informational and does not fail CI. The workflow artifact contains every measurement. Compared |
mattzcarey
marked this pull request as ready for review
November 25, 2026 13:18
… batches without configureSession; a non-list client tool declaration declares none
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.
ThinkHarnesskeeps its list of sessions and each session's client tools as Sessions session values (think-harness:sessionwith{ parent?, createdAt }, andthink-harness:client-tools), and no longer usesHarnessStoreat runtime. A released version's harness store, and the 0.27 tables before it, is carried into Tasks and Sessions once, as the harness's schema step 1 on the Lifecycle's versions record, and its tables are then dropped.After #3147 the store held only sessions and client tools, which are per-session values Sessions can keep (THINK-HARNESS.md, H4):
transcript:, soreset()keeps them, as before.sessions.list()reads every session that holdsthink-harness:session, through one new internal read,Sessions.internal_configs(key), sorted oldest first as before.configureSession, then the store's tables are discarded, settled operations with them, unread. A start finds the tables withhasTable, notsqlite_master, and only while the step has not run.Cost, per
prompt()on the test fixture, main → this PR: rows written unchanged (21, 35, 39 for a plain reply, one tool call, two tool calls), rows read 115 → 113, 176 → 172, 186 → 182, statements down by one each,setAlarm2 → 2. A cold start no longer opens the store (itsCREATE TABLE IF NOT EXISTSand the legacysqlite_masterread); it reads the root session's value instead.Harness compat score (
pnpm test:harness): 174 → 173 of 1,246. The one test that changed,client-tools.test.ts > holds STREAM_RESUME_REQUEST while continuation is pending, is a race (its continuation ends in about 5 ms, before the resume probe 20 ms later) and fails 2 of 2 reruns on main too.harness-think(83, including a sub-agent emptying the released store, 120 sessions carried forward, a malformed client tool declaration),sessions/annotationsandchannelstests ran, pluspnpm run check.How to probe: deploy main and this head with a ThinkHarness host at the root and in a sub-agent; on main create sessions (one forked), submit client tools, leave a queued and a running operation; deploy the head over it and check
sessions.list()(ids, parents, order), the client tools on the next turn, both operations finishing, and thecf_think_harness_store_*tables gone at the root and empty in the sub-agent.