Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

The prompt goes to pi on stdin, never as an argument - #6

Merged
elsehow merged 1 commit into
mainfrom
prompt-on-stdin
Oct 19, 2026
Merged

elsehow merged 1 commit into
mainfrom
prompt-on-stdin

Conversation

@elsehow

@elsehow elsehow commented Oct 19, 2026

Copy link
Copy Markdown
Member

Linux hands one argument at most 128 KiB (MAX_ARG_STRLEN), and AIRO's joint prompt passed that on 2026-10-19 when every incident rung became a deaths question and a damages question (forecastingresearch/airo#11). pi reads piped stdin as its first prompt, verbatim but for surrounding whitespace (checked in pi 0.99.2's readPipedStdin / buildInitialMessage: with no positional message, the first prompt is exactly the trimmed stdin, no wrapper).

  • harness.run writes the prompt to pi's stdin; pi_command carries no positional message. Every caller is uncapped by it: AIRO's instrument and the ForecastBench driver alike.
  • harness.PROMPT_ON_STDIN lets a caller check before sending a prompt that would not fit an argument (AIRO's pi_loop does, and refuses by name instead of letting pi die with E2BIG).
  • Tests: the fake pi records what arrived on stdin; the real pi (0.99.2) receives a prompt past the limit and the scripted model sees it as the first user message, verbatim but for pi's trim. 27 passed locally.

Follow-up on the box: reinstall fri-forecaster into the cron venv at this commit (the uv pip install … agent-box@<sha> step) before the first run under AIRO's v11.

🤖 Generated with Claude Code

Linux hands one argument at most 128 KiB (MAX_ARG_STRLEN), and AIRO's joint
prompt passed that on 2026-10-19 when every incident rung became a deaths
question and a damages question. pi reads piped stdin as its first prompt,
verbatim but for surrounding whitespace, so harness.run now writes the prompt
to pi's stdin and pi_command carries no positional message. Every caller --
AIRO's instrument, the ForecastBench driver -- is uncapped by it.
harness.PROMPT_ON_STDIN lets a caller check before sending a prompt that
would not fit an argument.

Tests: the fake pi records what arrived on stdin; the real pi (0.99.2)
receives a prompt past the limit and the scripted model sees it, verbatim
but for pi's trim, as the first user message.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@elsehow
elsehow merged commit 0002d73 into main Oct 19, 2026
2 checks passed
@elsehow
elsehow deleted the prompt-on-stdin branch October 19, 2026 21:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant