Skip to content

feat(run): rerun tasks when inputs change with --watch - #730

Draft
kdy1 wants to merge 2 commits into
voidzero-dev:mainfrom
kdy1:codex/watch-task-inputs
Draft

kdy1 wants to merge 2 commits into
voidzero-dev:mainfrom
kdy1:codex/watch-task-inputs

Conversation

@kdy1

@kdy1 kdy1 commented Sep 18, 2026

Copy link
Copy Markdown

Motivation

vp run should keep tasks up to date as their inputs change, including restarting long-running commands. This implements the file-change-triggered task execution described in delinoio/oss#894.

Related reference: @cnakazawa's post on X.

Changes

  • Add vp run --watch build: run immediately, then restart affected tasks and their dependents after input changes, keeping unrelated tasks running.
  • Discover inputs while commands are still running through live file-access tracing. Reuse existing input patterns and exclusions, including when caching is disabled, and retain subscriptions on cache hits.
  • Preserve dependency ordering and concurrency limits, coalesce changes, recover after task failures, and prevent canceled or invalidated executions from entering the cache.
  • Stop process trees before restarting with Unix process groups and Windows Job Objects. Close task stdin, retain existing log modes, and clean up all tasks on Ctrl+C.
  • Handle new files, deletions, renames, atomic saves, and directory reads; suppress restarts from a task's own outputs while propagating those changes to consumers.
  • Document usage and limitations, update generated configuration types, and add regression coverage for scheduling, file events, caching, cancellation, and live tracing.

Task definitions and dependency relationships are fixed when watch starts. Existing dependency tasks must finish before their dependents run; service-readiness dependencies are outside this change.

AI disclosure

This implementation was developed with AI assistance from OpenAI Codex (GPT-6). The commits include an AI co-author trailer.

kdy1 and others added 2 commits September 18, 2026 17:18
Add a persistent watch scheduler that restarts affected tasks and their
dependents while preserving unrelated running commands. Observe file access
while commands are running, retain input tracking without caching, and manage
process trees across Unix and Windows.

Include watch usage documentation and regression coverage for file changes,
dependency scheduling, caching, cancellation, and live tracing.

Developed with AI assistance from OpenAI Codex (GPT-6).

Co-authored-by: GPT-6 Codex <codex@openai.com>
Co-authored-by: GPT-6 Codex <codex@openai.com>
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.

1 participant