docs/PR-399-REVIEW-2026-03-12.md
Reviewed #399:
fix(observe): 5-layer automated session guard to prevent self-loop observationse7df0e588ceecfcd1072ef616034ccd33bb0f251skills/continuous-learning-v2/hooks/observe.shskills/continuous-learning-v2/agents/observer-loop.shskills/continuous-learning-v2/hooks/observe.shThe new CLAUDE_CODE_ENTRYPOINT guard uses a finite allowlist of known
non-cli values (sdk-ts, sdk-py, sdk-cli, mcp, remote).
That leaves a forward-compatibility hole: any future non-cli entrypoint value
will fall through and be treated as interactive. That reintroduces the exact
class of automated-session observation the PR is trying to prevent.
The safer rule is:
clicli when the variable is unsetSuggested shape:
case "${CLAUDE_CODE_ENTRYPOINT:-cli}" in
cli) ;;
*) exit 0 ;;
esac
Needs one follow-up change before merge.
The PR direction is correct:
observer-loop.shobserve.shBut the entrypoint guard should be generalized before merge so the automation filter does not silently age out when Claude Code introduces additional non-interactive entrypoints.