feat: mark task-spawned processes with VP_RUN#570
Merged
Conversation
wan9chi
force-pushed
the
feat/task-marker-env
branch
from
July 26, 2026 13:23
265c6d2 to
6d20c17
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 265c6d25da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
## Motivation A tool started from a task cannot tell whether it was launched by `vp run` or typed directly. Vite+ needs that distinction: its built-in commands point at `vpr <name>` when a same-named script exists, which is misleading when that very script is what spawned them. Every spawned task now carries `VP_RUN=1`. It is set after `env`/`untrackedEnv` filtering so a task's passthrough config cannot drop it, and it is forced rather than inherited so a stale parent value cannot make a task look like a direct invocation. A prefix assignment on the command still wins. The name is exported as `MARKER_ENV_NAME` so consumers do not hardcode it. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
wan9chi
force-pushed
the
feat/task-marker-env
branch
from
July 26, 2026 13:31
6d20c17 to
e54f421
Compare
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 26, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no such script, and when the task runner
spawned the command, since the user is then already on the `vpr` path. That
second case relies on `VP_RUN`, added in voidzero-dev/vite-task#570, which is
why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
wan9chi
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Jul 27, 2026
Built-in commands cannot be overridden, so `vp dev` runs the Vite+ dev server
even in a project whose `dev` script does something else entirely. Users
regularly reach for the built-in when they meant the script.
Every built-in that can be mistaken for a script now prints:
note: You are running `vp dev` as a Vite+ built-in command. If you meant
to run the dev npm script, use `vpr dev` instead.
It stays quiet when the project has no script of that name, when stdout is not
a terminal (IDEs read it as formatted source or the LSP protocol), and when the
task runner spawned the command, since the user is then already on the `vpr`
path. That last case relies on `VP_RUN`, added in voidzero-dev/vite-task#570,
which is why the vite-task revision moves with this change.
Refs #2243
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
A tool started from a task cannot tell whether it was launched by
vp runortyped directly. Vite+ needs that distinction: its built-in commands point at
vpr <name>when a same-named script exists, which is misleading when thatvery script is what spawned them.
Every spawned task now carries
VP_RUN=1. It is set afterenv/untrackedEnvfiltering so a task's passthrough config cannot drop it, and it is forced
rather than inherited so a stale parent value cannot make a task look like a
direct invocation. A prefix assignment on the command still wins. The name is
exported as
MARKER_ENV_NAMEso consumers do not hardcode it.Co-authored-by: Claude Opus 5 noreply@anthropic.com