v1.4.2
Fixes
dispatch-codex-appserver.sh — tool resolution
TOOL is now resolved once at script startup (reading state.json with 2>/dev/null || echo "codex-spark" fallback) and reused across all five stuck/exhausted paths:
- Before: 3 early-exit branches (crash, init timeout, init failure) hardcoded
"codex-spark"— incorrect forcodex-gptdispatches. The wrong tool's stuck count was incremented. - Before: 2 dynamic-lookup branches ran
jqagain mid-script and were missing|| trueunderset -euo pipefail, meaning a missingstate.jsoncould abort the script before emitting the stuck event. - After: Single lookup at top,
|| trueon all five call sites.
extract-context.sh — awk heading pattern
- Removed
.*before keyword anchor:^#+[[:space:]]*.*(keyword)→^#+[[:space:]]*(keyword). The old pattern matched any header that contained the keyword anywhere in the line; the new pattern requires the heading to start with it. - Removed redundant
rm -f "$TEMP_FILE"— thetrap EXITadded in v1.4.1 already handles cleanup on all exit paths. - Fixed comment: "deduplicate sections" was inaccurate (no deduplication occurs).
Upgrade
No breaking changes. Drop-in replacement for v1.4.1.