Follow-up to the previous fix: the stdin branch dropped "$@", so options like -s read-only silently never reached codex. Stub now records argv and tests assert flags + stdin prompt arrive together; verified live (-s read-only => codex reports READONLY).
11 lines
343 B
Bash
Executable File
11 lines
343 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|args=$*|$stdin_content" > "$out"
|
|
exit 0
|