Skip to content

feat: add batch task creation to TaskCreate tool (rebased onto v0.7.0) - #1

Closed
elecnix wants to merge 3 commits into
masterfrom
feat/batch-taskcreate
Closed

elecnix wants to merge 3 commits into
masterfrom
feat/batch-taskcreate

Conversation

@elecnix

@elecnix elecnix commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Purpose

Creating several related tasks currently requires multiple sequential TaskCreate tool calls — slow and noisy for multi-step plans, and it burns extra model/tool round trips when the agent already knows the full task list.

This is a rebase of tintinweb/pi-tasks#24 (feat: add batch task creation to TaskCreate tool) onto v0.7.0, so the batch feature sits cleanly on top of the current upstream master (including the @earendil-works scope migration, widget display settings, and the context-hook system-reminder rework).

Summary

  • TaskCreate accepts a batch array to create multiple tasks in a single tool call
  • Backwards-compatible: top-level subject + description single-task usage still works unchanged
  • batch and scalar params are mutually exclusive (validated with a clear error)
  • TaskStore.createMany() for atomic-ish batch creation
  • Prompt guidelines nudge models to prefer batch for multi-task plans
  • README documents the new bulk format
  • Tests: batch creation coverage + integration tests (184 tests pass)

Verification

  • npm run typecheck — clean
  • npm run lint — no new warnings (4 pre-existing useOptionalChain warnings in untouched code)
  • npm test — 184 passed (6 files)
  • npm run build — clean

Note

Upstream has a competing PR (tintinweb/pi-tasks#25) solving the same problem with a tasks array instead of batch. This branch keeps the batch naming from PR tintinweb#24 — happy to align with either shape.

— swift-viper-90 🤖

v2nic added 3 commits August 17, 2026 16:40
Extend TaskCreate to accept an optional  array parameter for
creating multiple tasks in a single atomic call. The existing scalar
/ parameters remain fully backward-compatible.

Key changes:
- Add  for atomic batch creation within a single lock
- Add  array parameter to TaskCreate tool (mutually exclusive with scalar params)
- Add validation: reject mixing  with /
- Add validation: require + when not using
- 6 new unit tests for createMany (IDs, persistence, metadata, empty array)
- 10 new integration tests for TaskCreate batch mode
- Updated README with batch usage docs and parameter tables

This approach modifies the existing tool rather than adding a new one,
avoiding context bloat from an additional tool definition while keeping
the API surface minimal.
The parameter descriptions and prompt guidelines already convey
the distinction. The extra section was redundant and added context
bloat for the LLM.
Rename the TaskCreate batch array parameter from `tasks` to `batch`
to make it more distinctive and searchable. Update all references in
source, tests, and README accordingly.
@elecnix

elecnix commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

Closing this in favor of the rebased branch on v2nic/pi-tasks, which updates tintinweb#24 — that's the correct home for this work.

@elecnix elecnix closed this Aug 17, 2026
@elecnix
elecnix deleted the feat/batch-taskcreate branch August 17, 2026 20:50
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