Skip to content

fix: stop telling the per-task pi harness to use a TaskUpdate tool it never gets#982

Draft
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-code/mini-agent-remarks-1
Draft

fix: stop telling the per-task pi harness to use a TaskUpdate tool it never gets#982
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-code/mini-agent-remarks-1

Conversation

@posthog

@posthog posthog Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Problem

Multiple integration-v2 task types (identify, capture, review) remarked in production that a task-management tool their instructions referenced was unavailable, at ~9 occurrences across the last cycle's fleet. Verified against the code: runPiTask (src/lib/agent/runner/harness/pi/task.ts), the per-task orchestrator session on the pi harness, never registers TaskCreate/TaskUpdate — only the linear harnesses (pi/index.ts, the anthropic preset in agent-interface.ts) wire up pi/tasks.ts. Yet every session, including the leaner per-task one, got the same universal wizard commandment: "Create tasks... Drive the work with TaskUpdate." Agents correctly noticed the contradiction and reported it as lost turns.

Refs #588, which already flagged commandments.ts's shared task-list commandment as needing harness-aware guidance.

Changes

  • getWizardCommandments() now takes an { includeTaskTracking?: boolean } option; the two task-list-specific commandments move to a separate TASK_TRACKING_COMMANDMENTS block, included by default.
  • runPiTask (pi/task.ts) now calls getWizardCommandments({ includeTaskTracking: false }) since it never grants the tool.
  • The two linear-harness call sites (pi/index.ts, agent-interface.ts) are unchanged — they keep the default (true) and still get the full commandment set.

Test plan

  • npx vitest run — 113 files / 1541 tests pass (updated the commandments snapshot for the reordering)
  • pnpm build — succeeds, including the warlock smoke test
  • pnpm fix — no lint/format changes needed

Created with PostHog Code

…r gets

Orchestrator per-task sessions on the pi harness (runPiTask) never register TaskCreate/TaskUpdate — only the linear harnesses (pi index.ts, anthropic preset) do — but every session got the same universal commandment telling it to "drive the work with TaskUpdate." Multiple task types (identify, capture, review) repeatedly remarked that a task-management tool referenced by their instructions was unavailable. getWizardCommandments() now takes an includeTaskTracking flag; the per-task harness opts out.

Generated-By: PostHog Code
Task-Id: d5b36c7d-a77f-416e-a17d-db79843ab95a
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

@posthog posthog Bot changed the title Stop telling the per-task pi harness to use a TaskUpdate tool it never gets fix: stop telling the per-task pi harness to use a TaskUpdate tool it never gets Jul 25, 2026
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.

0 participants