chore(tasks): add shell efficiency instruction to agent prompts#68805
Merged
Conversation
Contributor
|
Hey @charlesvien! 👋 It looks like your git author email on this PR isn't your
You can fix it for this repo with: git config user.email "you@posthog.com"Or set it globally with |
Contributor
|
Reviews (1): Last reviewed commit: "add shell efficiency to task agent promp..." | Re-trigger Greptile |
MattPua
approved these changes
Jul 7, 2026
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.
Problem
Task agents run shell commands one call at a time, and each tool call re-sends the full conversation context. PostHog/code#3207 benchmarked an instruction that batches related commands: -19% Bash calls, -12% turns, -15% input tokens with no task-success regression. The repo-owned task prompts here don't carry that instruction.
Changes
Adds the benchmarked shell-efficiency block from PostHog/code#3207 to
WIZARD_PR_AGENT_PROMPTandDEFAULT_CI_MESSAGE: batch related commands with&&, emit independent tool calls in one response, read multiple files at once and don't rerun commands for output already seen.How did you test this code?
Prompt string change only. I (Claude) ran no tests locally; CI covers the modules importing these constants. The wording itself was benchmarked in PostHog/code#3207 (120 synthetic-task runs plus 36 real-workload runs).
Automatic notifications
Docs update
N/A
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Charles asked to propagate the shell-efficiency instruction from PostHog/code#3207 (where it covers the PostHog Code agent surfaces) to the repo-owned task prompts here, mirroring how the PR-hyperlink instruction landed in #68770. I (Claude Code) authored the change and shipped it as a single GitHub-signed commit via the GraphQL API. No repo skills invoked.