Repository navigation
Conversation
With iii 0.25 observers available, background work no longer goes out as unbounded fire-and-forget calls. Compression runs from an observer on mem::observe capped at AGENTMEMORY_COMPRESS_MAX_CONCURRENT (default 2), and a periodic mem::compression-sweep re-dispatches observations still pending or failed. Session-stop graph extraction, reflect and consolidation become observers on event::session::stopped. Graph extraction only sends observations newer than a per-session marker (KV.graphExtractMarks), with an optional cooldown. AGENTMEMORY_GRAPH_STRUCTURAL=false turns off the heuristic graph pass. Saved memories reach graph extraction through an observer on mem::remember. Without observers, the existing inline paths are unchanged. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Signed-off-by: Rohit Ghumare <ghumare64@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This was referenced Oct 29, 2026
Open
Closed
…pipeline CHANGELOG follows the base branch; release PRs carry the entry.
…nd late compression - Leave the post-session graph marker unchanged when graph extraction reports success false. - Tie the marker to the graph generation so a graph reset re-extracts sessions extracted before it. - Use compressedAt when present, so a stop before LLM compression does not hide the compressed concepts and files from a later extraction. - Pass a saved memory's files to graph extraction.
…' into feat/iii025-s2a-observer-pipeline # Conflicts: # scripts/docs-sync.state.json
This branch was successfully deployed
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
Stage 2a of the iii 0.25 stack. It targets #1637 (then #1636 and #1634). When iii 0.25 observers are available, background LLM work is capped and shows up in
engine::observers::list. When they aren't (or withAGENTMEMORY_BINDINGS=trigger), the existing inline fire-and-forget paths run unchanged.Compression (mem::compress fires one LLM call per observation with no batching/throttle - saturates self-hosted gateway, fail+retry spiral (production numbers) #1603): an observer on
mem::observesuccesses callsmem::compress. It skips deduplicated captures and runs at mostAGENTMEMORY_COMPRESS_MAX_CONCURRENTat once (default 2).mem::observenow returnssessionIdalongsideobservationId.Compression sweep:
mem::compression-sweepruns everyAGENTMEMORY_COMPRESSION_SWEEP_MS(default 10 min; 0 disables). It re-dispatches up to 50 observations that are still pending, or failed and retryable, after 5 minutes. It uses the same concurrency cap and never overlaps itself.Session-stop follow-ups (Batch/throttle graph extraction instead of triggering an LLM call on every Stop hook #978) run as observers on
event::session::stopped, skipped when the summary came back unchanged:mem::post-session-graphprocesses one event at a time and only sends observations newer than a per-session marker (KV.graphExtractMarks). The marker advances only on success.AGENTMEMORY_GRAPH_EXTRACT_COOLDOWN_MSadds an optional cooldown.mem::post-session-reflectruns only when reflect is enabled.mem::post-session-consolidatekeeps the existing debounce and skips recovered-session stops.event::session::stoppeditself still runs summarize and returns.AGENTMEMORY_GRAPH_STRUCTURAL=false(GRAPH_EXTRACTION_ENABLED=falsedoes not stop graph writes - structural extraction runs unconditionally on session stop #1238) turns off the heuristic graph pass, leaving only the LLM pass, whichGRAPH_EXTRACTION_ENABLEDstill gates.Saved memories → graph: an observer on
mem::remember(mem::post-remember-graph) does this when graph extraction is enabled (feat(graph): auto-trigger mem::graph-extract on mem::remember #568).Live verification (engine 0.25.0, state 0.22.22, http 0.22.8, fake OpenAI-compatible server, real
post_tool_usehook payloads)AGENTMEMORY_COMPRESS_MAX_CONCURRENT=2compression.status = complete; observerfires: 200AGENTMEMORY_BINDINGS=trigger(50 captures)gate:large-store --small --assertNot proven live: sweep recovery after forced LLM failures. The fake server was set to fail its first 30 calls. The provider's circuit breaker (
src/providers/resilient.ts) opened after three failures and kept throwing before any HTTP call, so only 26 calls reached the server. It never got past its failure phase, and the retried rows stayedcompression_failed. The breaker treats these transient failures as hard failures. #1259 and #1350 change that behavior and are the right follow-up; the sweep itself is unit-tested.Credits
Test plan
npm run build,npm run skills:gen,npm run docs:sync/docs:check,npm run skills:checknpm test: 4146 passed, 6 skippedtest/observer-pipeline.test.ts(14 cases): pipeline mode decision, exact observer specs, gating by flags, delta marker (success-only advance, cooldown), sweep selection, limits and single-flight, post-remember input shape, inline no-opFixes #1603. Fixes #978. Fixes #1238. Refs #1390 #1025 #1024 #1029 #1127 #568 #1268 #1280 #1309 #1259 #1350.