Skip to content

chore(tasks): add shell efficiency instruction to agent prompts#68805

Merged
charlesvien merged 2 commits into
masterfrom
fix/shell-efficiency-in-task-prompts
Jul 7, 2026
Merged

chore(tasks): add shell efficiency instruction to agent prompts#68805
charlesvien merged 2 commits into
masterfrom
fix/shell-efficiency-in-task-prompts

Conversation

@charlesvien

Copy link
Copy Markdown
Member

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_PROMPT and DEFAULT_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

  • Publish to changelog?
  • Alert Sales and Marketing teams?

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.

@charlesvien charlesvien self-assigned this Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Hey @charlesvien! 👋

It looks like your git author email on this PR isn't your @posthog.com address (me@charlesvien.com). Since you're on the PostHog team, it's worth pointing your local git author email at your @posthog.com address. Why it matters:

  • Consistent work identity in git history — internal tooling that attributes commits to team members keys off your @posthog.com address.
  • Keeps team contributions easy to tell apart from external community ones when scanning history.

You can fix it for this repo with:

git config user.email "you@posthog.com"

Or set it globally with git config --global user.email "you@posthog.com". No need to redo this PR — just a nudge for next time. 🙂

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "add shell efficiency to task agent promp..." | Re-trigger Greptile

Comment thread products/tasks/backend/temporal/constants.py Outdated
@charlesvien charlesvien marked this pull request as ready for review July 7, 2026 00:51
@assign-reviewers-posthog assign-reviewers-posthog Bot requested a review from a team July 7, 2026 00:52
@charlesvien charlesvien enabled auto-merge (squash) July 7, 2026 01:00
@trunk-io

trunk-io Bot commented Jul 7, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@charlesvien charlesvien merged commit 819f68c into master Jul 7, 2026
182 checks passed
@charlesvien charlesvien deleted the fix/shell-efficiency-in-task-prompts branch July 7, 2026 01:15
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-07 01:38 UTC Run
prod-us ✅ Deployed 2026-07-07 01:48 UTC Run
prod-eu ✅ Deployed 2026-07-07 01:50 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants