fix: export sourced environment variables - #2
Open
VailElla wants to merge 1 commit into
Open
Conversation
VailElla
force-pushed
the
agent/fix-env-exports
branch
from
July 12, 2026 18:13
1b59fef to
b786c2b
Compare
VailElla
marked this pull request as ready for review
July 12, 2026 18:13
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.
Summary
.env.exampleso commands launched aftersource .envinherit the configured paths and identitiesexportstatements frombootstrap.py --write-envwithshlex.quoteAGENT_MEMORY_*additions, including invariants and local-model configurationRoot cause
The quick start sources
.envand then launches Python scripts. Plain shell assignments are visible in the current shell but are not inherited by child processes, so the scripts can silently fall back to the template vault and default state database.Generated configuration also needs shell quoting because valid vault and configuration paths may contain spaces or shell metacharacters.
Impact
Sourcing either
.env.exampleor an environment file generated bybootstrap.py --write-envnow makes the configuration available to child commands. Generated values remain safe for POSIX shells, including paths with spaces and values containing#or single quotes.The branch is rebased onto current
mainat3097fe4and uses the supportedAGENT_MEMORY_*namespace only.Safety and privacy
.env, vault content, local configuration, database, logs, credentials, or personal absolute paths are includedValidation
/usr/bin/python3 -m unittest discover -s tests -p 'test_*.py'— 42 tests passed/usr/bin/python3 -m compileall -q scripts tests/bin/sh -n .env.example/usr/bin/python3 scripts/agent_memory_check.py --skip-state-dbAGENT_MEMORY_ROOTis inherited after sourcinggit diff --check upstream/mainRelated context: #1