Conversation
The scaffold declares python-dotenv as a dependency and IMPLEMENTATION.md instructs that secrets belong in .env via python-dotenv, but nothing ever calls load_dotenv(). Values in .env (OPENAI_API_BASE, OPENAI_API_KEY, OPENAI_MODEL) were silently ignored and every agent generated from this scaffold fell back to config.yaml defaults with a "dummy" API key. Load .env in src/config.py before the config is initialized, anchored to the project root with a cwd fallback. Real environment variables still take precedence over .env values. Also ignore .env at the repo root so local secrets can't be committed by accident. Found while debugging an agent generated by this skill (kyuz0/deep-research-agent); this upstreams the same fix so future generated agents don't inherit the bug. Co-Authored-By: Claude Fable 5 <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.
Summary
The
basic-tui-agentscaffold declarespython-dotenvas a dependency, andresources/docs/IMPLEMENTATION.mdinstructs that "Secrets belong inside.envviapython-dotenv" — but nothing in the scaffold ever callsload_dotenv(). Values in.env(OPENAI_API_BASE,OPENAI_API_KEY,OPENAI_MODEL) are silently ignored, so every agent generated from this scaffold falls back to theconfig.yamldefaults with a"dummy"API key.Changes
.envinsrc/config.pybefore the config is initialized, anchored to the project root (parent ofsrc/) with a cwd-lookup fallback. Real environment variables still take precedence over.envvalues, so the existing env-overlay behavior is unchanged..envto the repo-root.gitignoreso local secrets can't be committed by accident.Context
Found while debugging an agent generated by this skill — this is the scaffold-level version of kyuz0/deep-research-agent#1, upstreamed here so future generated agents don't inherit the bug.
🤖 Generated with Claude Code