Skip to content

feat: hippocampal memory system, improved tool/subagent error messages, YOLO mode cleanup#2933

Open
cy2311 wants to merge 4 commits into
Hmbown:mainfrom
cy2311:feat/auto-update-check
Open

feat: hippocampal memory system, improved tool/subagent error messages, YOLO mode cleanup#2933
cy2311 wants to merge 4 commits into
Hmbown:mainfrom
cy2311:feat/auto-update-check

Conversation

@cy2311

@cy2311 cy2311 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This PR contains four fixes/features across two branches of work:

Bug Fixes

1. YOLO mode verbosity (#2922)

Added "Do not announce or restate the current mode between actions — just execute." to the YOLO mode prompt to suppress repeated mode announcements before each tool call.

2. Tool error message clarity (#2657)

Removed generic suffixes from format_tool_error() when the underlying error already explains the cause (mode restriction, shell access, etc.), so the agent can tell exactly why a tool is unavailable.

3. Subagent session name conflicts (#2656)

Added elapsed time (started Xs ago) to the session-name-conflict error message, so the agent can distinguish between a running agent, a completed one, or a stale session.

Feature

4. Hippocampal Memory System (#2935)

New crates/memory/ crate with SQLite-backed structured memory store:

  • entities table: Files, PRs, issues, concepts, decisions
  • relations table: Directed edges with kind + strength (e.g. dispatch.rs ── part_of ──▶ PR #2933)
  • facts table: Standalone statements with FTS5 full-text search for pattern-completion queries
  • memorize tool: Agent stores a structured fact with importance score and optional entity binding
  • recall tool: Agent queries memory by keyword, gets facts + related entities + graph relationships
  • Active forgetting: prune_low_importance_facts() removes old/low-value facts
  • Lazy-initialized on first engine context build via memory_db_path in EngineConfig

Files Changed

Cargo.toml                                   |   1 +
crates/memory/Cargo.toml                     |  19 ++
crates/memory/src/lib.rs                     |  29 +++
crates/memory/src/schema.rs                  |  80 +++++++
crates/memory/src/store.rs                   | 390 +++++++++++++++++++
crates/tui/Cargo.toml                        |   1 +
crates/tui/src/core/engine.rs                |  29 +-
crates/tui/src/core/engine/tool_setup.rs     |   5 +
crates/tui/src/main.rs                       |   6 +
crates/tui/src/prompts/modes/yolo.md         |   2 +
crates/tui/src/tools/memorize.rs             | 105 +++++++
crates/tui/src/tools/mod.rs                  |   2 +
crates/tui/src/tools/recall.rs               | 165 +++++++++
crates/tui/src/tools/registry.rs             |  16 +
crates/tui/src/tools/spec.rs                 |   6 +
crates/tui/src/tools/subagent/mod.rs         |   9 +-
crates/tui/src/core/engine/dispatch.rs       |  15 +-
crates/tui/src/tui/ui.rs                     |   6 +
18 files changed, 882 insertions(+), 4 deletions(-)

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Thanks @cy2311 for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the YOLO mode prompt markdown file by adding an instruction to execute actions directly without announcing or restating the current mode. It also changes the header level from H2 to H5. The reviewer recommends keeping the H2 header level to maintain consistency with other mode prompts.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@@ -1,4 +1,4 @@
## Mode: YOLO
##### Mode: YOLO

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The header level was changed from ## (H2) to ##### (H5). To maintain consistency with other mode prompts (such as ## Mode: Agent and ## Mode: Plan) and to keep a clean hierarchy in the composed system prompt, it is recommended to keep this as an H2 header.

Suggested change
##### Mode: YOLO
## Mode: YOLO

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@cy2311 cy2311 changed the title fix: suppress YOLO mode re-announcement before each action fix: tool unavailable error messages and YOLO mode verbosity Jun 9, 2026
@cy2311 cy2311 changed the title fix: tool unavailable error messages and YOLO mode verbosity fix: tool error messages, subagent name conflicts, and YOLO mode verbosity Jun 9, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@cy2311 cy2311 force-pushed the feat/auto-update-check branch from c736324 to 63a0b3e Compare June 9, 2026 05:45

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@cy2311 cy2311 changed the title fix: tool error messages, subagent name conflicts, and YOLO mode verbosity feat: hippocampal memory system, improved tool/subagent error messages, YOLO mode cleanup Jun 9, 2026
@Hmbown

Hmbown commented Jun 10, 2026

Copy link
Copy Markdown
Owner

@cy2311 — thank you, there's a lot of good work here. We'd like to take it, but in pieces, because it bundles two very different kinds of change:

The three fixes are wanted now. The YOLO-mode announcement suppression (#2922), the format_tool_error() clarity fix (#2657), and the subagent name-conflict elapsed-time message (#2656) are all small, reviewable, and address open milestone bugs. Please split them into one (or three) small PRs against current main and we'll merge promptly. Note #2951 just landed a related prompt note telling the model not to announce modes — your yolo.md line is complementary, just rebase over it.

The memory crate needs a design conversation first. A new crates/memory/ SQLite+FTS5 store with memorize/recall tools is an architectural decision that overlaps two existing tracks: the memory Phase 3 epic (#534) and the WhaleFlow external-memory design (docs/WHALEFLOW_EXTERNAL_MEMORY.md). Rather than merge a third memory architecture, let's reconcile on #2935 (your design issue): if accepted it would land opt-in/feature-flagged and coordinated with those tracks. Your entity/relation/fact schema with active forgetting is a genuinely interesting shape — we want the discussion, not to lose it.

Closing nothing here — this PR can stay open as the reference while the split PRs land.

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.

2 participants