Repository navigation
fix(runtime): pass system prompts through private files - #647
Open
cookerpapa wants to merge 1 commit into
Open
cookerpapa wants to merge 1 commit into
cookerpapa wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Fixes #612. Refs #640, #642.
Runtime V2 puts the composed system prompt directly on argv. Large base templates and project overlays can prevent every worker in a batch from starting because of OS command-line limits.
Pass the prompt through a unique private file using pi's existing
--system-prompt <file>support. This preserves replacement semantics for workers, reviewers and mergers. Keep the file for the child's lifetime, remove it after successful completion, and retain failed runs for diagnostics. Empty overrides keep their existing behavior.History check: #365 added file transport to the legacy RPC wrapper. Runtime V2's host was introduced in #370 with inline prompt text; the old wrapper's workaround was not carried into that path. This uses pi's direct replacement flag, without the old append/
@workaround. Whole-argv preflight and doctor diagnostics requested in #642 remain separate work.Validation on Node 24 / Linux:
spawn E2BIGwith a 256 KiB prompt. Coverage includes all three roles, Unicode, paths with spaces, overlapping spawns, defaults, cleanup and failure retention./orchregistered. The effective prompt matches the file plus pi's normal working-directory suffix. This startup/RPC smoke makes no model requests. Native Windows execution has not been run.Base:
293d9a833ba685d4c2291a1d68e9b68b0271e00a.