You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Low Risk
Prompt-only changes to Pi agent instructions; no changes to git push, sandbox, or execution flow.
Overview
Adds optional operating instructions to Pi prompts so the harness matches how Sim finishes each run, instead of the agent trying git push, PR creation, or full test runs on its own.
buildPiPrompt now accepts optional guidance, emitted first as # Operating instructions before skills, memory, and the task. Cloud mode passes CLOUD_GUIDANCE: file edits only; no git/GitHub/PR; Sim commits, pushes, and opens the PR; do not depend on project tooling in the sandbox. Local mode passes LOCAL_GUIDANCE: use SSH repo tools only; no commit/push/PR so changes stay in the working tree for Sim’s diff capture.
This PR adds mode-specific operating instructions (CLOUD_GUIDANCE and LOCAL_GUIDANCE) to the Pi agent's prompt, prepended before skills, memory, and the task. The goal is to prevent the agent from attempting git operations (commit, push, PR creation) or running the build/test toolchain in environments where those operations are unavailable or would break the harness's deterministic flow.
context.ts extends buildPiPrompt with an optional guidance field placed at the top of the rendered prompt under # Operating instructions.
cloud-backend.ts defines CLOUD_GUIDANCE covering no-git, no-credentials, no-PR constraints; local-backend.ts defines LOCAL_GUIDANCE scoped to leaving changes in the working tree.
Confidence Score: 5/5
Safe to merge — changes are entirely additive prompt strings with no logic alterations.
Both guidance constants are append-only strings injected at the top of an existing prompt builder. The guidance field is optional and backward-compatible, existing tests mock buildPiPrompt entirely so they are unaffected, and the two backends that call the function are both updated consistently.
No files require special attention.
Important Files Changed
Filename
Overview
apps/sim/executor/handlers/pi/context.ts
Extends buildPiPrompt with an optional guidance field; guidance is prepended as the first section of the prompt, before skills and memory — correct ordering for system-level constraints.
apps/sim/executor/handlers/pi/cloud-backend.ts
Adds CLOUD_GUIDANCE constant instructing the agent not to run git operations or build tooling, and passes it into buildPiPrompt; change is minimal and well-commented.
apps/sim/executor/handlers/pi/local-backend.ts
Adds LOCAL_GUIDANCE instructing the agent to leave working-tree changes uncommitted; passes it into buildPiPrompt alongside the existing task/skills/memory inputs.
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
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.
Summary
Prompting improvement to ensure Pi agent knows that git push is done by our deterministic sandbox runner.
Type of Change
Testing
Tested manuallu
Checklist