Files
codex-crew/tests/stub-ok/codex
T
admin 0cfec6880c fix: pass codex flags through in the stdin-prompt branch
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).
2026-07-07 16:58:04 +05:00

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