invoke-model-strips-claudecode-env
IN premise
invoke_model() in llm.py strips the CLAUDECODE environment variable before all subprocess.run() calls, preventing recursive Claude Code entry from any module that uses the shared LLM interface (ask, derive, review).
Summary
Any code that calls the shared LLM interface to talk to Claude will automatically have the CLAUDECODE environment variable removed before the subprocess runs, which stops Claude Code from accidentally spawning another copy of itself in a loop.
Dependents
These beliefs depend on this one:
- llm-subprocess-isolation-prevents-recursion — All LLM subprocess invocations strip the CLAUDECODE environment variable to prevent recursive Claude Code entry, enforced centrally in invoke_model() and inherited by all LLM-facing modules (ask, derive, review).