Skip to content

docs(TaskCreate): steer parallel TaskCreate calls for multi-task batches - #58

Merged
tintinweb merged 1 commit into
tintinweb:masterfrom
elecnix:feat/parallel-taskcreate
Aug 23, 2026
Merged

tintinweb merged 1 commit into
tintinweb:masterfrom
elecnix:feat/parallel-taskcreate

Conversation

@elecnix

@elecnix elecnix commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Purpose

Replaces the closed #24 (batch TaskCreate parameter). Instead of adding a batch API, this PR steers the model through the tool description to batch-create tasks the way the runtime already supports: by issuing multiple TaskCreate calls in a single response.

Pi executes independent tool calls from one assistant message in parallel (default parallel tool execution mode; results restored to the model's original call order). Verified empirically: three parallel bash calls started within ~34ms of each other and ran concurrently; three parallel TaskCreate calls created tasks without collisions (sequential IDs, results in call order). So the model can create N tasks in one turn with no extension API change at all.

Change

Description-only, 3 lines in TaskCreate's tool description (visible to the coding agent):

  • ## When to Use — "User provides multiple tasks" bullet now says: Create them all in one response with one TaskCreate call per task
  • ## Tips — new bullet: To create several tasks at once, call TaskCreate multiple times in a single response — independent tool calls run in parallel, so the whole batch is created in one turn (one task per call).

No schema or behavior changes: subject/description remain required, and the tool stays 1:1 with Claude Code. This also sidesteps the earlier concern about making subject/description optional to accommodate a batch parameter.

Verification

  • npm run typecheck — clean
  • npm test — 346 passed (16 files)
  • npm run build — clean

— swift-viper-90 🤖

Instead of adding a batch parameter, the tool description now tells the
model it can create several tasks at once by issuing multiple TaskCreate
calls in a single response — pi executes independent tool calls in
parallel, so the whole batch is created in one turn with one call per
task (subject + description stay required).

Co-authored-by: swift-viper-90 <swift-viper-90@pi-agent.local>
@elecnix
elecnix marked this pull request as ready for review August 18, 2026 14:38
@tintinweb
tintinweb merged commit b7fbda7 into tintinweb:master Aug 23, 2026
3 checks passed
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