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.
11 lines
335 B
Bash
Executable File
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
|