Reduce agent memory and MCP payload waste #124

Merged
kleb merged 4 commits from feature/memory-v2-efficiency into main 2026-08-30 04:06:02 +02:00
Collaborator

Summary

  • reject strict Codex title jobs and Claude task notifications before hook, session, storage, and recall work
  • replace growing hook responses and prompt-in-URL recall with compact compatible transports
  • compact high-volume MCP results and remove repeated server instructions from the MCP tool catalogue
  • inherit trusted session project scope and reject stopword-only relation candidates
  • align installed skill and MCP lifecycle tools around checkpoint-only summaries and one atomic final end

Measured motivation

  • machine notifications were 97.65% of stored Claude prompt text in the audited sessions
  • full hook session responses returned at least 8.52 MiB of redundant prompt JSON in two sessions
  • host-side repetition expanded 1,143 MCP instruction characters into 83,439 duplicate characters
  • ten task_list calls emitted 2.22 million result characters

Compatibility

  • existing stored sessions and prompts are unchanged
  • legacy full session responses and GET /memory/context remain supported
  • REST optimistic concurrency remains intact
  • no database schema or migration changes

Verification

  • bun run check:quality
  • 953 server and unit tests passed
  • 238 UI tests passed
  • targeted hook, MCP, prompt hygiene, scope, relation, and payload-bound tests passed
## Summary - reject strict Codex title jobs and Claude task notifications before hook, session, storage, and recall work - replace growing hook responses and prompt-in-URL recall with compact compatible transports - compact high-volume MCP results and remove repeated server instructions from the MCP tool catalogue - inherit trusted session project scope and reject stopword-only relation candidates - align installed skill and MCP lifecycle tools around checkpoint-only summaries and one atomic final end ## Measured motivation - machine notifications were 97.65% of stored Claude prompt text in the audited sessions - full hook session responses returned at least 8.52 MiB of redundant prompt JSON in two sessions - host-side repetition expanded 1,143 MCP instruction characters into 83,439 duplicate characters - ten task_list calls emitted 2.22 million result characters ## Compatibility - existing stored sessions and prompts are unchanged - legacy full session responses and GET /memory/context remain supported - REST optimistic concurrency remains intact - no database schema or migration changes ## Verification - bun run check:quality - 953 server and unit tests passed - 238 UI tests passed - targeted hook, MCP, prompt hygiene, scope, relation, and payload-bound tests passed
Collaborator

kReview review

Verdict: no findings

No findings to address across the reviewed diff.

Reviewed by kReview at 397961fd47. This comment is conservative and based only on the PR diff, metadata, and supplied repository context.

Est. cost ~$7.16 total (4.0M in / 15.0k out) · this run ~$1.22 (541.2k in / 2.2k out) / gpt-5.6-sol + gpt-5.6-terra.

<!-- codex-forgejo-review --> <!-- codex-forgejo-review-head:397961fd47306b8bc7d3c65550662f0c8af92519 --> <!-- codex-forgejo-review-comparison:v1:525dd88a5ec46d33fcf8d7ec3c56e88407331d514e77c898e453fe036f05a351 --> ## kReview review **Verdict:** no findings No findings to address across the reviewed diff. _Reviewed by kReview at `397961fd47`. This comment is conservative and based only on the PR diff, metadata, and supplied repository context._ _Est. cost ~$7.16 total (4.0M in / 15.0k out) · this run ~$1.22 (541.2k in / 2.2k out) / gpt-5.6-sol + gpt-5.6-terra._ <!-- codex-forgejo-review-state:eyJoZWFkU2hhIjoiMzk3OTYxZmQ0NzMwNmI4YmM3ZDNjNjU1NTA2NjJmMGM4YWY5MjUxOSIsImNvbXBhcmlzb25LZXkiOiJ2MTo1MjVkZDg4YTVlYzQ2ZDMzZmNmOGQ3ZWMzYzU2ZTg4NDA3MzMxZDUxNGU3N2M4OThlNDUzZmUwMzZmMDVhMzUxIiwic3VtbWFyeSI6Ik5vIGZpbmRpbmdzIHRvIGFkZHJlc3MgYWNyb3NzIHRoZSByZXZpZXdlZCBkaWZmLiIsImZpbmRpbmdzIjpbXSwiY3VtdWxhdGl2ZUNvc3QiOnsidXNkIjo3LjE2MzczMywiaW5wdXRUb2tlbnMiOjQwMjA2ODYsIm91dHB1dFRva2VucyI6MTQ5NjUsIm1vZGVsIjoiZ3B0LTUuNi1zb2wgKyBncHQtNS42LXRlcnJhIn19 -->
kleb merged commit 1320de7c5d into main 2026-08-30 04:06:02 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
knopersikcuo/Planner!124
No description provided.