Files
codex-crew/tests/stub-ok/codex
T
admin 32aaaa9b7a fix: prompt.md via stdin now combines with codex flags
Options like -s read-only routed execution into the /dev/null branch,
so codex got no prompt at all. codex natively appends piped stdin as
a <stdin> block, so feeding prompt.md unconditionally is safe.
2026-07-07 16:56:04 +05:00

11 lines
335 B
Bash
Executable File

#!/usr/bin/env bash
# fake codex: emits thread.started, writes last message file, exits 0
out=""
prev=""
for a in "$@"; do [[ $prev == "-o" ]] && out=$a; prev=$a; done
echo '{"type":"thread.started","thread_id":"test-thread-123"}'
echo '{"type":"turn.completed"}'
stdin_content=$(cat)
echo "stub answer|$stdin_content" > "$out"
exit 0