/autoplan paper cuts: literal <plan_path> placeholders + /office-hours offer fires in non-interactive sessions
- Dominant language
- TypeScript
- Stars
- 133k
- Forks
- 19.9k
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 26
Description
Filed downstream at aviraldua93/gstack-copilot#10. Two paper cuts in upstream gstack `/autoplan` found by reading the SKILL.md.tmpl end-to-end.
## 1. `` literal placeholder is unsafe
Codex prompt templates use `` as a literal placeholder string and instruct the agent to substitute at runtime. Careless implementation passes `` literally to Codex / the subagent. No validation step catches it. Agent returns nonsensical "cannot find the file" output that looks like a review failure.
**Fix:** use shell-substitution-style placeholders that fail noisily if unbound (`\` with `set -u`). Or add a preamble check that errors if literal `` strings remain after substitution.
## 2. /office-hours prerequisite offer fires in non-interactive sessions
The "Prerequisite Skill Offer" block prints `"No design doc found for this branch. /office-hours produces a structured problem statement... want to run it now?"` and gates further progress on the user's answer. In smoke-test, automation, or CI contexts there's no human to answer. The skill has no `SESSION_KIND=spawned` short-circuit (unlike telemetry/proactive prompts which DO check it).
**Fix:** add `SESSION_KIND` guard at the top of the Prerequisite Skill Offer block, mirroring patterns used elsewhere in the preamble:
```bash
if [ "$_SESSION_KIND" = "spawned" ] || [ "$_SESSION_KIND" = "headless" ]; then
echo "Prerequisite skill offer skipped (session kind: $_SESSION_KIND)"
fi
```
---
*Filed via GitHub Copilot CLI by @aviraldua93 during stress-testing a downstream port.*
Contributor guide
Assessment
This issue has not been assessed yet.