fix(agents): memory digest export lifecycle - #266
Merged
Conversation
Return raw JSON envelopes from the fact_store and fact_feedback memory write handlers instead of markdown-rendered output. After the markdown default output change, these write-path handlers rendered their status JSON as markdown, which interfered with the memory digest export lifecycle. A new `tool_json` helper emits the truncated JSON envelope (with project handle) directly; `handle_memory_status` continues to use the rendered path. Recovered from a stranded worktree whose stale rebase base had reverted unrelated master work (PR #258/#260 agent-surface changes); only the genuine memory.rs fix is carried forward here, rebuilt cleanly on current origin/master. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
ScriptedAlchemy
marked this pull request as ready for review
July 4, 2026 01:06
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Merged
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
The
fact_storeandfact_feedbackmemory write handlers now return raw JSON envelopes (tool_json) instead of markdown-rendered output (rendered_tool_json).After the "Default TraceDecay tool output to markdown" change (#262), these write-path handlers rendered their status JSON (
{ status, feedback, count, ... }) as markdown. That interfered with the memory digest export lifecycle, which expects the structured JSON result. A newtool_jsonhelper emits the truncated JSON envelope (with project handle) directly.handle_memory_statusintentionally keeps the rendered markdown path.Recovery note
This was recovered from a stranded git worktree that had a stale rebase in progress. The fix branch (
codex/claude-memory-digest-fixes) had been based on an older master, so its conflicting hunks insrc/agents/claude.rs,src/agents/mod.rs, andtests/agent_suite/agent_test.rswere reverts of unrelated newer master work (PR #258 codex hook trust migration, PR #260 analytics/agent tests) rather than part of the memory-digest fix. Those files were confirmed to carry no memory-digest content and were discarded; only the genuinememory.rsfix is carried forward, rebuilt cleanly on currentorigin/master.Verification
cargo check— clean (only vendored libsql warnings)cargo clippy --all-targets -- -D warnings— clean for touched filecargo fmt— no changescargo test --test agent_suite -- memory_digest— 15 passedcargo test --test agent_suite -- claude— 57 passedcargo test --test mcp_suite -- fact— 12 passed🤖 Generated with Claude Code