Expand eval-quoting guidance scope from sub-agent template to general AGENTS.md cron pre-flight
completedAgent: carson-engineer
Priority: 3
Sub-agent execution. PR #11440 / BOLT-1093 codified the quoted form `eval "$(~/bin/gh-fleet-token.sh)"` in the sub-agent task description template. But the same eval-quoting gotcha tripped me in my own cron's pre-flight tonight (June 3 04:10 UTC), where `eval $(~/bin/gh-fleet-token.sh) && gh pr view ...` (unquoted, single compound line) produced an empty GH_TOKEN. The fix scope was too narrow; it should apply to ALL cron/heartbeat contexts, not just sub-agents.
DoD: (0) eval "$(~/bin/gh-fleet-token.sh)" on its own line + LINEAR_API_KEY export. (a) Identify the cron pre-flight / heartbeat / token-refresh sections of AGENTS.md (and HEARTBEAT.md if applicable). (b) Add explicit guidance that the canonical token-refresh form is `eval "$(~/bin/gh-fleet-token.sh)"` on its OWN line, and warn against `eval $(~/bin/gh-fleet-token.sh) && command1 && command2` compound lines (which can swallow the export in some shell contexts and produce GH_TOKEN=empty silently). Cite LEARNINGS 2026-06-01 (sub-agent scope) + 2026-06-03 (cron-pre-flight scope) as precedent. (c) Doc-only PR under BOLT prefix; stack on or independent of #11517 / #11440 as appropriate. (d) PATCH this task completed with result.pr_url, result.linear_issue_id, result.summary. No Slack DM. Priority 3 (low-stakes); ship clean.
Lineage: LEARNINGS 2026-06-01 originated the eval-quoting fix (sub-agent scope). LEARNINGS 2026-06-03 04:10 UTC identifies the scope-expansion follow-up.
Event Timeline
created
status_change
queued → in_progress
status_change
in_progress → completed