Conversation
Generated with [Devin](https://devin.ai)
Generated with [Devin](https://devin.ai)
Codex dispatches thread/compact/start through the pinned app-server client and Claude sends provider-native /compact between turns, both behind a durable session.compact command bound to the session's exact authority generation. Provider facts project to one bounded compaction timeline event (outcome, trigger, strategy, token counts only), and an indeterminate dispatch reconciles against the retained event stream rather than replaying. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
A durable per-session session_compact_policies row (schema v61, STRICT table, cascade FK, default-off seed trigger, monotonic-revision transition guard, delete guard, backfill) backs the new session.compact-policy get/set contract and CLI surface with revision CAS. After a token_usage event is durable, the pure evaluateAutoCompact decision (trigger capped by model context window, in-flight turn and minimum-interval suppression) can schedule the existing durable session.compact under the session serializer with trigger "policy" and a deterministic per-usage-bucket idempotency key, so a second observation in the same bucket replays the command instead of dispatching twice. The serialized closure re-evaluates fresh policy, interval, and turn state before dispatch, and beginEffect re-fences the turn check so a refused attempt stays prepared and retryable without burning the key or the interval budget. Docs record the verified provider compaction contract for Codex and Claude, the public command reference matches CLI help, and the reviewed release inventory and public-text allowlist were refreshed for the new shipped module and main's new public dependencies. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Port the token_usage-triggered auto-compaction policy onto updated main: - Renumber the session_compact_policies migration from v61 to v62; main's schema 61 is the Devin readmission, so the chain is now v60->v61->v62 and a new initialVersion===61 step proves the released joined-61 boundary before the additive v62 step. - Implement compact() on PinnedDevinRuntimeManager: the pinned Devin CLI advertises /compact over ACP, sent as a session/prompt between turns and fenced by the client's single-prompt guard. UnavailableDevinRuntime and the test FakeDevin gain the port method. - Bump every current-schema literal in tests from 61 to 62, move future sentinels to 63, extend expected migration ledgers by one entry, and drop the v62 objects in the joined-state-upgrade rewind simulation. - Recompute the reviewed release inventory (235 files) and refresh the install pins for the merged src/cli.ts. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The between-turns test asserts the session/prompt frame carries the /compact slash command, no turn facts leak from the compaction request, and an in-flight turn fences compaction with INVALID_INPUT. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The earlier inventory was computed before the Devin compact() adapter edit; the file size changed without changing the entry count or canonical byte length, so only the sha256 drifted. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
3 tasks
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
0thernet
added a commit
to hraness/gobstopper
that referenced
this pull request
Sep 17, 2026
- roadmap: oompa auto-compaction now open as hraness/oompa#252 (main, schema v62); aicharts ingest merged (#278, verified in production). - design + config.example: agentrouter -> agentmixer rename. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.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.
Summary
session.compact: Codex dispatchesthread/compact/startthrough the pinned app-server client, Claude writes/compacton the stream-json input, and Devin sends the pinned CLI's advertised/compactslash command as an ACPsession/promptbetween turns (the client's single-prompt guard fences mid-turn). All three reduce to one durablecompactiontimeline event (outcome/trigger/strategy/token fields only, no text), receipted before dispatch, idempotent by key, refused mid-turn, and reconciled against the event stream without replay.session_compact_policies(STRICT, cascade FK, default-off seed trigger, monotonic-revision transition guard, delete guard, backfill).session.compact-policy get/setexposes it with revision CAS; CLI grammaroompa session compact-policy <session> on|off [--trigger-tokens 20000..4000000] [--min-interval-ms 30000..86400000] [--expected-revision n]. After a durabletoken_usageevent,evaluateAutoCompact(pure, total, property-tested) schedulessession.compactunder the session serializer withtrigger: "policy"and a deterministic per-bucket idempotency key — exactly one dispatch per usage bucket; the serialized closure re-evaluates fresh policy/interval/turn state before dispatch.enabled: false,triggerTokens: 250_000,minIntervalMs: 300_000— compacting at 250k instead of provider-default ~1M roughly halves the average context cost.docs/providers/codex.md(new) anddocs/providers/claude.mdrecord the verified provider compaction contracts;site/content.tscommand reference matches CLI help; plankb/plans/session-compaction.mdis complete with full evidence.Supersedes #246 (same feature ported from
claude/oompa-v0.8.0ontomain; the compact-policy migration renumbered v61→v62 because main's v61 is the Devin readmission, and Devincompact()support was added).Test plan
bun run checkgreen on the final main-based tree: support-runtime, cost-surfaces, install-pins, effect-architecture, security-primitives (48 files), eslint,tsc --noEmit; scripts 2305/2306 (one 5s browser-handoff timeout under host load ~12, verified 20/20 in isolation), local-efficiency plugin 166/166, cloud-efficiency plugin 36/36,bun test ./src --isolate --max-concurrency=16217/6217, convex 407/407, pr 22/22, site 188/188, app 668/668;build:site -- --check,build:app,buildclean;check:packagegreen in a governed-ref clone (complete-history scan on governed refs only, 235-entry release inventory, isolated consumer verification).Generated with Devin