V4 enhancement#101
Conversation
Previously, promptQverisConfig bundled web_search provider setup together with QVeris tool search enablement. This made the two concerns hard to manage independently and the setupSearch step had no QVeris option, making it easy to accidentally overwrite. Now promptQverisConfig only handles tools.qveris (tool search), and setupSearch lists QVeris Smart Search as a first-class provider that reuses the shared QVeris API key without duplication. Made-with: Cursor
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the agent's memory management system by optimizing how context digests and session importance are handled. It addresses critical performance issues, such as LLM timeouts and redundant processing, by introducing adaptive timeouts, incremental updates, and intelligent skipping mechanisms. Additionally, it refines the user onboarding experience for QVeris integrations and resolves a stability issue in the X channel, leading to a more robust and efficient agent overall. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Summary
context-digestandsession-importancememory hooks re-summarized all sessions in a 7-day window on every/new, exceeding LLM timeout limits and writing error messages intocontext-digest.md; TUI/newdid not notify the gateway, so hooks never triggered;session:endwas defined but never emitted; X channelmonitorXProvidercrashed on startup; QVeris onboarding bundled web_search and tool-search config in a single step.context-digest.mdshowed timeout errors andmemory/important/was never created. Every gateway restart showed an X channel crash-loop. The onboard flow was confusing users who wanted to configure web_search and tool-search independently.context-digestnow detects staleness (skips entirely when no sessions updated since last write) and uses incremental merge mode (1–2 new sessions → merge prompt instead of full rebuild).runOneShotLLMnow uses an adaptive timeout scaled to prompt size instead of a static 90 s. Token budget raised from 24 K to 120 K chars (~30 K tokens).session-importanceadds a short-session skip (< 3 user messages) and an already-classified guard. Fixed TUI/newto callresetSession, emitsession:endafter rotation, propagatestorePaththrough hook context, injectmonitorXProviderinto the X channel runtime. QVeris web_search config moved to thesetupSearchstep as a first-class provider.context-digest,session-importance), fallback (no-LLM) code paths, existing session file formats, and all other channels/commands are untouched.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
context-digest.mdnow updates correctly on/newand/resetinstead of writing a timeout error string.memory/important/is now created and populated for sessions that pass importance classification./newafter startup = full digest rebuild; subsequent/newwith no new sessions = skip (zero LLM cost); 1–2 new sessions = incremental merge (much smaller prompt).monitorXProviderwas missing from the runtime).qverisbot onboard: web_search provider setup is now a separate step; configuring QVeris tool-search no longer silently overwrites web_search settings.session-importancewithout calling the LLM.Security Impact (required)
NoNoNo(same LLM calls, just fewer and with adaptive timeout)NoNo— hooks only read/write files already under the agent workspace directory (~/.openclaw/workspace/memory/)Repro + Verification
Environment
openclaw-tui) + gatewayhooks.context-digest.enabled: true,hooks.session-importance.enabled: trueSteps
/newto start a new session.~/.openclaw/workspace/memory/context-digest.md— should show a structured digest, not a timeout error.remember,milestone,decision, or high code-block density, check~/.openclaw/workspace/memory/important/— a dated Markdown file should appear./newa second time immediately — digest should be skipped (no new sessions since last write).Expected
context-digest.mdcontains## Topics Discussed,## Key Decisions,## Open Items / Action Itemssections populated from the session.memory/important/*.mdcreated for substantive sessions.Context digest updatedorDigest still fresh — skipping.Actual (before fix)
context-digest.mdcontainedRequest timed out before a response was generated.memory/important/directory did not exist.[default] channel exited: monitorXProvider is not a functionon every X channel restart.Evidence
pnpm buildclean.context-digest.mdpopulated correctly after fix.Human Verification (required)
/newtriggers full digest on first run;/newskips when no sessions changed; X channel no longer reportsmonitorXProvider is not a function;qverisbot onboardcompletes withoutlistXAccountIdsTypeError.important/(already-classified guard fires).Compatibility / Migration
YesNo— existing hook config keys unchanged; new defaults are backward compatible.NoFailure Recovery (if this breaks)
hooks.context-digest.enabled: falseandhooks.session-importance.enabled: falsein config to disable both hooks without reverting code.src/hooks/bundled/context-digest/handler.ts,src/hooks/bundled/session-importance/handler.ts,src/hooks/llm-memory-helpers.ts.context-digest.mdnot updating after/new;memory/important/not being created for clearly important sessions; X channel crash-loop in gateway logs.Risks and Mitigations
generateDigestIncrementalreturnsnullon any failure, and the handler falls through to a full rebuild automatically.sessions.jsonupdatedAttimestamps written by the gateway itself, which are only updated on actual session activity — manual file edits don't affect this.remember,记住, etc.) trigger an instant pass in the evaluator before the short-session check, so those cases are still captured.