Conversation
… remove unnecessary flush calls - Rename env var to ACONTEXT_USER_IDENTIFIER (keep ACONTEXT_USER_ID as legacy fallback) - Fix identifier priority: explicit config > auth.json > platform default - Default identifiers are now platform-specific: "claude_code" and "openclaw" - OpenClaw accepts userIdentifier config key (userId as legacy fallback) - Remove blocking flush() from auto-learn, stop handler, and compaction/reset paths - Keep flush() only in explicit learn_now MCP tools - Update docs and SKILL.md for both plugins Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
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.
Why we need this PR?
Two issues in the claude-code and openclaw plugins:
ACONTEXT_USER_IDis misleading — it's actually an identifier/tag for session scoping, not a login user ID. Priority was also inverted (auth.json winning over explicit env/config).flush()is blocking and called in auto-learn paths unnecessarily. The server processes learning asynchronously via RabbitMQ workers, so flush is only needed for explicit user-triggered tools.Describe your solution
Issue 1: Rename & fix priority
ACONTEXT_USER_IDENTIFIER(withACONTEXT_USER_IDas legacy fallback). Priority:env var > auth.json > "claude_code".userIdentifier(withuserIdas legacy fallback). Priority:plugin config > auth.json > "openclaw".claude_code/openclaw) instead of generic"default".Issue 2: Remove unnecessary flush calls
flush()from auto-learn (post-tool-use hook, agent_end), stop handler, and compaction/reset paths.flush()only in explicitlearn_nowMCP tools where the user expects synchronous results.flushAndLearnIfActive→learnIfActivein openclaw.Implementation Tasks
Impact Areas
Checklist
devbranch.