Skip to content

feat(memory): rebuild durable learning and management - #16

Merged
boh5 merged 2 commits into
mainfrom
codex/memory-improvements
Aug 9, 2026
Merged

feat(memory): rebuild durable learning and management#16
boh5 merged 2 commits into
mainfrom
codex/memory-improvements

Conversation

@boh5

@boh5 boh5 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the query-loop Memory hooks and background tasks with durable 10-minute idle learning
  • centralize explicit, automatic, and HTTP mutations in MemoryService with CAS, capacity, index, concurrency, and crash-recovery guarantees
  • add project-scoped Memory APIs and Settings management for preferences, topics, warnings, and the two runtime switches
  • preserve the existing memory_write contract while hard-cutting obsolete thresholds, cursors, hooks, tasks, and compatibility paths

Behavior

  • explicit memory_write remains immediate and independent of Auto learning
  • automatic learning is limited to successful root Lead/Discussion work and uses one extraction plus one touched-file reconciliation call
  • recall remains complete preferences plus complete project index, with exact topic reads on demand
  • limits are 8 KiB preferences, 16 KiB per topic, and 200 project topics

Verification

  • bun run typecheck
  • bun run test
  • bun run build
  • git diff --check
  • desktop and 390px browser QA
  • configured fast-profile extraction/reconciliation eval
  • independent gpt-5.6-sol(max) review: AC-01 through AC-08 PASS, no remaining Blocker/Major

Review in cubic

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@boh5, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3b196a7b-0912-4024-842c-24b938f1cedd

📥 Commits

Reviewing files that changed from the base of the PR and between 9f1f47f and a113184.

📒 Files selected for processing (130)
  • AGENTS.md
  • README.md
  • apps/server/src/app.test.ts
  • apps/server/src/app.ts
  • apps/server/src/errors.ts
  • apps/server/src/routes/config-recovery.ts
  • apps/server/src/routes/memory.test.ts
  • apps/server/src/routes/memory.ts
  • apps/web/src/api/config.test.ts
  • apps/web/src/api/memory.test.ts
  • apps/web/src/api/memory.ts
  • apps/web/src/components/composite/ExecutionWorkstream.interaction.tsx
  • apps/web/src/components/features/ChatHeader.test.tsx
  • apps/web/src/components/features/SettingsDialog.interaction.tsx
  • apps/web/src/components/features/SettingsDialog.test.tsx
  • apps/web/src/components/features/SettingsDialog.tsx
  • apps/web/src/components/features/SettingsMemoryPanel.test.tsx
  • apps/web/src/components/features/SettingsMemoryPanel.tsx
  • apps/web/src/components/features/TodoProgressButton.interaction.tsx
  • apps/web/src/components/features/settings-helpers.ts
  • apps/web/src/components/features/settings-panels.tsx
  • apps/web/src/components/ui/Dialog.test.tsx
  • apps/web/src/components/ui/Dialog.tsx
  • apps/web/src/context/settings-modal.test.tsx
  • apps/web/src/context/settings-modal.tsx
  • apps/web/src/routes/session.test.tsx
  • apps/web/src/store/session-store.test.ts
  • config.example.json
  • docs/configuration.md
  • docs/goals/memory-system-hard-cut-plan-goal.md
  • docs/goals/memory-system-hard-cut-progress.md
  • packages/agent-core/src/__arch__/architecture.test.ts
  • packages/agent-core/src/__arch__/module-boundaries.test.ts
  • packages/agent-core/src/agents/configured-agent.test.ts
  • packages/agent-core/src/agents/configured-agent.ts
  • packages/agent-core/src/agents/definitions/analyst.ts
  • packages/agent-core/src/agents/definitions/build.ts
  • packages/agent-core/src/agents/definitions/discussion.ts
  • packages/agent-core/src/agents/definitions/explore.ts
  • packages/agent-core/src/agents/definitions/lead.ts
  • packages/agent-core/src/agents/definitions/librarian.ts
  • packages/agent-core/src/agents/factory-types.ts
  • packages/agent-core/src/agents/factory.test.ts
  • packages/agent-core/src/agents/factory.ts
  • packages/agent-core/src/agents/query/hooks/index.ts
  • packages/agent-core/src/agents/query/hooks/memory-consolidation.test.ts
  • packages/agent-core/src/agents/query/hooks/memory-consolidation.ts
  • packages/agent-core/src/agents/query/hooks/memory-extraction.test.ts
  • packages/agent-core/src/agents/query/hooks/memory-extraction.ts
  • packages/agent-core/src/agents/query/loop.test.ts
  • packages/agent-core/src/agents/query/provider-secret-redaction.integration.test.ts
  • packages/agent-core/src/agents/query/recovery.test.ts
  • packages/agent-core/src/agents/query/todo-continuation.test.ts
  • packages/agent-core/src/agents/session-agent-manager.test.ts
  • packages/agent-core/src/agents/session-agent-manager.ts
  • packages/agent-core/src/agents/types.ts
  • packages/agent-core/src/background/index.ts
  • packages/agent-core/src/background/tasks/index.ts
  • packages/agent-core/src/background/tasks/memory-consolidation.test.ts
  • packages/agent-core/src/background/tasks/memory-consolidation.ts
  • packages/agent-core/src/background/tasks/memory-extraction.test.ts
  • packages/agent-core/src/background/tasks/memory-extraction.ts
  • packages/agent-core/src/background/tasks/title-generation.test.ts
  • packages/agent-core/src/compression/dynamic-range.test.ts
  • packages/agent-core/src/compression/original-range.test.ts
  • packages/agent-core/src/config/config.test.ts
  • packages/agent-core/src/config/index.ts
  • packages/agent-core/src/config/schema.ts
  • packages/agent-core/src/config/server-config-service.test.ts
  • packages/agent-core/src/config/server-config-service.ts
  • packages/agent-core/src/execution/session-execution-manager.test.ts
  • packages/agent-core/src/execution/session-execution-manager.ts
  • packages/agent-core/src/index.ts
  • packages/agent-core/src/llm/run-object.test.ts
  • packages/agent-core/src/llm/run-object.ts
  • packages/agent-core/src/main.test.ts
  • packages/agent-core/src/memory/constants.ts
  • packages/agent-core/src/memory/errors.ts
  • packages/agent-core/src/memory/file-manager.test.ts
  • packages/agent-core/src/memory/file-manager.ts
  • packages/agent-core/src/memory/idle-coordinator.test.ts
  • packages/agent-core/src/memory/idle-coordinator.ts
  • packages/agent-core/src/memory/index.ts
  • packages/agent-core/src/memory/learning-input.test.ts
  • packages/agent-core/src/memory/learning-input.ts
  • packages/agent-core/src/memory/learning-schemas.ts
  • packages/agent-core/src/memory/learning-state.ts
  • packages/agent-core/src/memory/manifest.ts
  • packages/agent-core/src/memory/policy-runtime.test.ts
  • packages/agent-core/src/memory/policy-runtime.ts
  • packages/agent-core/src/memory/reconciliation.test.ts
  • packages/agent-core/src/memory/reconciliation.ts
  • packages/agent-core/src/memory/schemas.ts
  • packages/agent-core/src/memory/service.test.ts
  • packages/agent-core/src/memory/service.ts
  • packages/agent-core/src/memory/types.test.ts
  • packages/agent-core/src/memory/types.ts
  • packages/agent-core/src/projects/context-resolver.test.ts
  • packages/agent-core/src/projects/context-resolver.ts
  • packages/agent-core/src/projects/types.ts
  • packages/agent-core/src/prompt/compiler.ts
  • packages/agent-core/src/runtime.ts
  • packages/agent-core/src/session-input/service.test.ts
  • packages/agent-core/src/store/helpers.test.ts
  • packages/agent-core/src/store/helpers.ts
  • packages/agent-core/src/store/logical-execution.test.ts
  • packages/agent-core/src/store/memory-learning.test.ts
  • packages/agent-core/src/store/message-phase-hard-cut.test.ts
  • packages/agent-core/src/store/reduce.ts
  • packages/agent-core/src/store/session-store-manager.test.ts
  • packages/agent-core/src/store/session-store-manager.ts
  • packages/agent-core/src/store/store.test.ts
  • packages/agent-core/src/store/test-helpers.ts
  • packages/agent-core/src/store/types.ts
  • packages/agent-core/src/testing/test-execution-fixtures.ts
  • packages/agent-core/src/tools/builtins/memory-read.test.ts
  • packages/agent-core/src/tools/builtins/memory-read.ts
  • packages/agent-core/src/tools/builtins/memory-write.test.ts
  • packages/agent-core/src/tools/builtins/memory-write.ts
  • packages/agent-core/src/tools/builtins/model-visible-contract.test.ts
  • packages/agent-core/src/tools/test-project-context.ts
  • packages/protocol/src/execution.test.ts
  • packages/protocol/src/guards.test.ts
  • packages/protocol/src/guards.ts
  • packages/protocol/src/index.ts
  • packages/protocol/src/memory.ts
  • packages/protocol/src/message-phase-hard-cut.test.ts
  • packages/protocol/src/reduce.test.ts
  • packages/protocol/src/reduce.ts
  • packages/protocol/src/types.ts

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown

This PR has 12,611 reviewable changed lines after ignored/generated files are excluded, above this repository's 10,000-changed-line automatic review limit. The raw diff is 15,428 lines before ignored/generated files are excluded.

Most of the diff comes from:

  • packages/agent-core/src/memory/idle-coordinator.test.ts (~3,719 changed lines)
  • packages/agent-core/src/memory/idle-coordinator.ts (~1,678 changed lines)
  • packages/agent-core/src/memory/service.ts (~714 changed lines)
  • packages/agent-core/src/memory/service.test.ts (~561 changed lines)
  • packages/agent-core/src/memory/learning-input.test.ts (~416 changed lines)

Comment @cubic-dev-ai review this to review it anyway. If the largest files are generated or fixture data, add them to your ignored files in review settings or ignorePatterns in cubic.yaml - cubic will then review the rest automatically. You can also raise this limit in review settings.

@boh5

boh5 commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@cubic-dev-ai review this

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown

@cubic-dev-ai review this

@boh5 I have started the AI code review. It will take a few minutes to complete.

@boh5
boh5 merged commit 65492db into main Aug 9, 2026
7 checks passed
@boh5
boh5 deleted the codex/memory-improvements branch August 9, 2026 11:27
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