Skip to content

feat(plan): let synthesized commands declare a tool entry script - #789

Open
lifeiscontent wants to merge 1 commit into
voidzero-dev:mainfrom
lifeiscontent:fix/portable-tool-entry
Open

lifeiscontent wants to merge 1 commit into
voidzero-dev:mainfrom
lifeiscontent:fix/portable-tool-entry

Conversation

@lifeiscontent

@lifeiscontent lifeiscontent commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

When a task runs a built-in tool such as vp lint or vp test, the command is planned with the absolute path of the tool's entry script in args, and args are part of the cache key. If the workspace moves, or you run from a second checkout or a git worktree, that path changes and every one of those tasks misses the cache. Closes #790.

Changes

  • SyntheticPlanRequest gets an optional tool_entry. It's inserted before args, and when it's inside the workspace it's passed relative to the task's cwd. The command that runs and the cache key both use that relative form.
  • Paths outside the workspace, or containing .., stay absolute. Other args are never rewritten.
  • Nothing sets it yet. Vite+ would pass the entry it resolves for each built-in tool.

Built-in tools are planned with the absolute path of their entry script in
args, and args go into the cache key as is. Moving the workspace, or using a
second checkout, changes that path and misses the cache.

SyntheticPlanRequest gets an optional tool_entry. When the entry is inside
the workspace, the planner passes it relative to the task's cwd, so the
command and the cache key stay the same after a move. Other paths and all
other args are left alone.

This branch has not been deployed

No deployments
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.

Built-in tool tasks miss the cache after the workspace moves

1 participant