Make Omni/Agent accept prompts from stdin when no script argument is given. Delimiter is a single null byte (\0) between prompts. EOF on stdin = clean exit.
Current flow: agent script.md parses frontmatter + markdown, pushes initial user message, runs agentLoop once, exits.
New flow:
1. Read bytes from stdin until a \0 is encountered.
2. Decode as UTF-8, push as a user message into session state.
3. Call agentLoop with the same state; it runs until no more tool calls / natural termination.
4. When the loop returns, reset asHitMaxIterations / other per-turn flags, go to step 1.
5. EOF on stdin → exit 0.
echo -ne "hello\0" | agent runs one loop iteration and exits.printf "first prompt\0second prompt\0" | agent runs two loops, preserving session state between them (context accumulates, conversation continues).agent script.md still works exactly as before (shebang case is untouched).Compaction.compactMessages hook.Omni/Agent.hs — main entry point and agentLoopOmni/Agent/Session.hs or wherever session state init lives--mode or --interactive flag. Stdin-reading mode is activated by absence of a script argument. This is how python, ghci, bc, sh all work.<utf8-bytes>\0. Nothing else.Ava verified: last comment from human author documents shipping/deployment with concrete evidence. Moving to Verified.
Implemented null-byte stdin prompt mode in Omni/Agent.hs (no prompt arg => \0-delimited stdin loop). Shebang/argv mode remains oneshot. Session state now persists across prompts by threading AgentState across turns and updating Op runAgent to append user messages instead of resetting state. Added regression test in Omni/Agent/Programs/Agent.hs for multi-turn state persistence. Verified with bild Omni/Agent.hs, bild --test Omni/Agent.hs, bild --test Omni/Agent/Programs/Agent.hs, and smoke run: printf 'first\0second\0' | agent --provider ollama --model llama3 produced two iterations/errors.