feat: Add EPISODIC_MEMORY_CLAUDE_CODE_SETTING_SOURCES env var#58
Open
feat: Add EPISODIC_MEMORY_CLAUDE_CODE_SETTING_SOURCES env var#58
Conversation
📝 WalkthroughWalkthroughAdds EPISODIC_MEMORY_CLAUDE_CODE_SETTING_SOURCES and a helper getSettingSources() to parse it; passes the parsed settingSources into Claude API calls from callClaude. getApiEnv() docs updated and README documents the new environment variable and its effects. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 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 |
Allows loading Claude Code configuration when making SDK calls for summarization. This enables the SDK to pick up user settings like custom API configurations. Usage: EPISODIC_MEMORY_CLAUDE_CODE_SETTING_SOURCES=user Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
259f57b to
7a36c14
Compare
Add table of accepted values (user, project, local) with settings file paths, descriptions, and usage examples for the setting sources env var. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Recommend leaving empty or using 'user' only, warn that project/local sources load CLAUDE.md and MCP servers which can affect summary quality. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Add
EPISODIC_MEMORY_CLAUDE_CODE_SETTING_SOURCESenvironment variable to allow the summarizer to load Claude Code configuration when making SDK calls (needed forawsCredentialExportfor example).The default is
undefined(no settings loaded), which preserves existing behavior. Users must explicitly setEPISODIC_MEMORY_CLAUDE_CODE_SETTING_SOURCES=user(orproject, or both) to enable loading settings.This setting also enables a lot of functionalities that might alter the summarization output quality. As it will cause the SDK to read the
~/.claude/CLAUDE.md,~/.claude/agents/*.md,~/.claude/skills/*/SKILL.md,~/.claude/commands/*.mdand MCP servers from~/.claude.json.Here's a list:
Sources:
https://platform.claude.com/docs/en/agent-sdk/migration-guide#settings-sources-no-longer-loaded-by-default
https://platform.claude.com/docs/en/agent-sdk/typescript#setting-source
Motivation and Context
I use claude code with bedrock and explicitly make use of
awsCredentialExportsetting to load AWS credentials. Episodic memory summarization was not working for me and filling my project's conversation history with the summarization prompt and an API Key Error. I am addingEPISODIC_MEMORY_CLAUDE_CODE_SETTING_SOURCESso the SDK loads the AWs credentials fromawsCredentialExport(source)How Has This Been Tested?
./cli/episodic-memory.js synccommandsettingSourcespassedBreaking Changes
None.
Types of changes
Checklist
Additional context
Usage:
Summary by CodeRabbit