Repository navigation
fix(memory): recall runtime prompts - #653
Conversation
Use runtime USER_STEER and SUBAGENT_MESSAGE payloads as the semantic recall query before falling back to tape user messages. Keep system notices, approvals, and interrupts out of semantic query selection so operational runtime controls do not shadow the user's prompt. Verification: - uv run pytest tests/coding_agent/plugins/test_semantic_memory.py -v - uv run pytest tests/agentkit/runtime/test_pipeline.py -k 'runtime_context_and_messages_are_injected_into_prompt or runtime_message_consumed_after_build_context_reaches_prompt' -v - uv run pytest tests/ui/test_session_manager_runtime.py -k semantic -v - uv run pytest tests/coding_agent/test_semantic_maintenance.py -v - uv run pytest tests/coding_agent/test_memory_switch.py -k semantic -v - uv run ruff format --check src/coding_agent/plugins/semantic_memory.py tests/coding_agent/plugins/test_semantic_memory.py - uv run ruff check src/coding_agent/plugins/semantic_memory.py tests/coding_agent/plugins/test_semantic_memory.py
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesRuntime Prompt Recall Query Extraction
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
USER_STEER/SUBAGENT_MESSAGEpayloads as semantic recall query before falling back to tape user messagesSYSTEM_NOTICE, approval decisions, and interrupts out of semantic query selection so runtime controls do not shadow the user's promptRoot Cause
Live o6n semantic memory dogfood showed rebuild/index/planner worked, but remote prompt turns did not recall indexed topic summaries. The remote prompt path supplies the current prompt through
PipelineContext.runtime_messages; it is not necessarily persisted as a taperole=usermessage beforebuild_context.SemanticMemoryPluginonly read the latest user message from tape, so it returned before semantic search.Verification
uv run pytest tests/coding_agent/plugins/test_semantic_memory.py -k "runtime_prompt or subagent_prompt" -vuv run pytest tests/coding_agent/plugins/test_semantic_memory.py -vuv run pytest tests/agentkit/runtime/test_pipeline.py -k "runtime_context_and_messages_are_injected_into_prompt or runtime_message_consumed_after_build_context_reaches_prompt" -vuv run pytest tests/ui/test_session_manager_runtime.py -k semantic -vuv run pytest tests/coding_agent/test_semantic_maintenance.py -vuv run pytest tests/coding_agent/test_memory_switch.py -k semantic -vuv run ruff format --check src/coding_agent/plugins/semantic_memory.py tests/coding_agent/plugins/test_semantic_memory.pyuv run ruff check src/coding_agent/plugins/semantic_memory.py tests/coding_agent/plugins/test_semantic_memory.pySummary by CodeRabbit