Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/superpowers/plans/verify-trigger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ SCRATCH="$(mktemp -d)"
export FAKE_OUT="$SCRATCH/calls.log"
cat > "$SCRATCH/fake.sh" << 'EOF'
#!/usr/bin/env bash
printf 'PROMPT-START\n%s\nPROMPT-END\n' "$1" >> "$FAKE_OUT"
printf 'PROMPT-START\n%s\nPROMPT-END\n' "${@: -1}" >> "$FAKE_OUT"
# `claude` options like --mcp-config are variadic: the prompt must sit after `--`.
[ "${@: -2:1}" = "--" ] || echo "PROMPT-NOT-AFTER-DASHDASH" >> "$FAKE_OUT"
EOF
chmod +x "$SCRATCH/fake.sh"
export AGENTBOARD_SESSION_CMD="$SCRATCH/fake.sh"
Expand Down Expand Up @@ -135,6 +137,7 @@ if [ -f "$AGENTBOARD_DATA/session.lock" ]; then fail "dry-run left a lock file";
$CLI runner >/dev/null
[ "$(grep -c PROMPT-START "$FAKE_OUT")" = "1" ] || fail "fake session was not spawned exactly once"
grep -q "main/weekly.md" "$FAKE_OUT" || fail "routine path missing from the prompt"
if grep -q PROMPT-NOT-AFTER-DASHDASH "$FAKE_OUT"; then fail "prompt not preceded by --"; fi
grep -q "AGENT.md" "$FAKE_OUT" || fail "AGENT.md path missing from the prompt"
$CLI routines due --json | python3 -c "
import json,sys
Expand Down
3 changes: 3 additions & 0 deletions src/core/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ export function runSession(
...parts.slice(1),
'--mcp-config',
mcpConfigArg(),
// --mcp-config is variadic: without `--` it swallows the prompt
// as a second config file and claude exits before doing anything.
'--',
promptOverride ?? buildPrompt(active, card?.id ?? null),
],
{
Expand Down
Loading