derive-strips-claudecode-env

IN premise

`_derive_one_round` explicitly removes the `CLAUDECODE` environment variable before spawning the model subprocess, preventing recursive Claude Code invocation.

Summary

The derive command intentionally prevents the AI model it calls from launching another instance of Claude Code inside itself. It does this by stripping out the environment variable that would signal "you're running inside Claude Code," which stops infinite nesting where a derive call could accidentally trigger another derive call.

Dependents

These beliefs depend on this one:

Details

Sourceentries/2026/04/23/reasons_lib-cli.md