For claude code we can use `CLAUDECODE=1` to detect that we are running inside agent. https://code.claude.com/docs/en/env-vars Same for `OPENCODE=1` https://github.com/anomalyco/opencode/issues/1775 `GEMINI_CLI=1` https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/shell.md Also there is https://github.com/agentsmd/agents.md/issues/136
For claude code we can use
CLAUDECODE=1to detect that we are running inside agent.https://code.claude.com/docs/en/env-vars
Same for
OPENCODE=1anomalyco/opencode#1775
GEMINI_CLI=1https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/shell.md
Also there is
agentsmd/agents.md#136