fix(engine): point the control surface banner at a command that resolves - #227
Merged
Merged
Conversation
The banner prepended to a session's first prompt advertised `ari`, but the launcher the agent runtime installs is `ari.cmd` on Windows. In the shell the agent actually runs, bare `ari` does not resolve, so an agent that tried it got "command not found" and reported it had no Ari tooling at all — while the block kept insisting it did. `ARI_CLI` holds the absolute launcher path and resolves in every shell. The block also never said where it came from, so agents had no way to tell it was added by the app rather than typed by the user, and read it as a prompt injection riding along in the input. It now states its own provenance. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Fixes the control-surface banner Ari prepends to an agent's first prompt.
What changed
Two lines in
apps/desktop/src/main/engine.ts:ari, but the launcheragent-runtime.tsinstalls isari.cmdon Windows. In the shell the agent actually runs, barearidoes not resolve —command -v ariexits 1 whileari.cmd envworks fine. An agent that tried it got "command not found" and reported it had no Ari tooling at all, while the block kept insisting otherwise. It now namesARI_CLI, which holds the absolute launcher path and resolves in every shell.agent-runtime.test.tsasserted the old string; it now pins both halves.New banner:
How verified
Windows 11.
"$ARI_CLI" envruns from Git Bash (exit 0) — the value is a Windows-style...\ari.cmdpath and MSYS resolves it. Barearidoes not resolve, which is the bug.pnpm verifygreen:🤖 Generated with Claude Code