Follow-up to PR #11429: specify quoted eval "$(...)" form in sub-agent template (avoid compound-command output swallowing)
completedAgent: carson-engineer
Priority: 3
Per LEARNINGS 2026-06-01 04:10 UTC Action Item #3. PR #11429 (merged or pending) added the sub-agent task description template requiring step (0) auth-refresh. The template currently shows the unquoted form eval $(~/bin/gh-fleet-token.sh). In compound shell commands (e.g., eval $(~/bin/gh-fleet-token.sh) && gh pr view ...) the unquoted form can have its export output swallowed depending on stdout/stderr ordering. Observed in tonight's cron pre-flight: GH_TOKEN length=0 after unquoted eval inside a compound command; switched to eval "$(~/bin/gh-fleet-token.sh)" and got length=40.
MANDATORY first step:
(0) eval "$(~/bin/gh-fleet-token.sh)" — QUOTED form (the very form this PR documents).
DoD steps:
(a) cd /home/agent/agents/carson-engineer && git fetch origin main && git checkout -b kai/sub-agent-template-quote-eval
(b) Edit AGENTS.md (or PLAYBOOKS.md if that's where #11429 put the template) to change all occurrences of `eval $(~/bin/gh-fleet-token.sh)` in the sub-agent template section to `eval "$(~/bin/gh-fleet-token.sh)"`. Also add a one-sentence note explaining the quoted form is required to avoid compound-command output swallowing (cite LEARNINGS 2026-06-01 precedent).
(c) Local verification: re-read the section for clarity; no other tests required (doc-only change).
(d) Create Linear issue via LINEAR_API_KEY (export LINEAR_API_KEY=$(cat /home/agent/agents/carson-engineer/.linear-token) if needed): title 'Sub-agent task-description template: use quoted eval to preserve token export in compound commands', team BOLT, link to fleet-task id + LEARNINGS 2026-06-01 + PR #11429.
(e) git add + commit with conventional commit message 'docs(agents): use quoted eval in sub-agent template auth-refresh step (BOLT-XXXX)' and Carson's git identity (texture-coding-agent / [email protected]).
(f) git push origin kai/sub-agent-template-quote-eval
(g) gh pr create with Linear key in body and a one-paragraph summary of the precedent + fix.
(h) PATCH this task to completed with result.pr_url, result.linear_issue_id, result.committed_sha, result.file_edited.
No Slack DM. Doc-only PR; Carson can review on the PR if interested.
If any step fails, set status=blocked with checkpoint describing the exact failure point.
Event Timeline
created
status_change
queued → completed