Repository navigation
opencode: send the side-call prompt on stdin, not the command line - #244
Open
Have-Purple wants to merge 1 commit into
Open
Have-Purple wants to merge 1 commit into
Have-Purple wants to merge 1 commit into
Conversation
The proposer's prompt -- eight task digests plus the facts -- is about 35,000 characters on this install, and Windows stops a command line at 32,767: CreateProcess failed with WinError 206 before any session existed, so every proposer tick was skipped (and logged) once the prompt crossed the limit, and micro-skills ran on the free layer alone. `opencode run` reads the message from stdin when it is given none. Verified on opencode 2.3.0 against a local OpenAI-compatible endpoint: a 48,000-character prompt arrives intact and the reply comes back, where the argv form raises FileNotFoundError WinError 206 on the same prompt. The `--model` and other flags are unchanged. Tests: a 48,000-character prompt never appears on argv and is passed as `input=`; the placement test now expects opencode's prompt on stdin rather than in the command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The proposer's prompt — eight task digests plus the facts — is about 35,000 characters on a
real install, and Windows stops a command line at 32,767:
CreateProcessfails withERROR_FILENAME_EXCED_RANGE, which Python raises asThe whole prompt was passed as the last argv element, so as soon as the window plus the fact list
grew past the limit, every proposer tick failed: no session was created, the tick was skipped
and logged, and micro-skills ran on the free env-facts layer alone. The log line is the one above,
repeated per fold.
Change
opencode runreads the message from stdin when it is given none, so the prompt goes there:--modeland the other flags are unchanged; the session-delete call is unchanged.Verification
the same
FileNotFoundError: [WinError 206].a 48,000-character prompt through
sidecall.opencode_callreturns the model's reply(
done, 106 effective tokens), and the prompt arrives at the endpoint intact.main(583fff7):FileNotFoundError [WinError 206].The 48,000-character prompt is the same one; only the argv/stdin placement differs.
input=; theexisting placement test now expects opencode's prompt on stdin. Full offline suite:
1168 passed, 35 skipped, 0 failed.
Scope
opencode only, and deliberately: other hosts also put the prompt on argv, but each has its own
CLI contract and this was the host whose calls were failing.
claude_callalready passes theprompt via
input=.