Session-file tracking (mkdir/touch/find ~/.gstack/sessions), the analytics
pending-marker loop, and timeline-log all ran unconditionally in the preamble
and completion-status resolvers, even with telemetry: off. That contradicts the
documented behavior (telemetry off = no local analytics) and tripped enterprise
security scanners on the OPENCLAW_SESSION string and bare find commands in shell
init.
- Gate session tracking, analytics writes, the pending-finalize loop, and
timeline-log behind $_TEL != off in both resolvers.
- Extract the OPENCLAW_SESSION check into bin/gstack-spawned-session-status so
the orchestrator env-var name no longer appears in every generated SKILL.md.
- Leave plan-mode detection untouched (separate concern).
- README: telemetry off now disables local analytics + session artifacts too.
- Tests cover the gating, the helper, and the absent OPENCLAW_SESSION string.
Fixes#1150
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>