Skip to content

fix(engine): point the control surface banner at a command that resolves - #227

Merged
j35dev merged 1 commit into
mainfrom
fix/control-surface-banner
Sep 14, 2026
Merged

j35dev merged 1 commit into
mainfrom
fix/control-surface-banner

Conversation

@j35dev

@j35dev j35dev commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

Fixes the control-surface banner Ari prepends to an agent's first prompt.

What changed

Two lines in apps/desktop/src/main/engine.ts:

  • The banner advertised ari, but the launcher agent-runtime.ts installs is ari.cmd on Windows. In the shell the agent actually runs, bare ari does not resolve — command -v ari exits 1 while ari.cmd env works 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 names ARI_CLI, which holds the absolute launcher path and resolves in every shell.
  • The block never stated where it came from. 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 says so.

agent-runtime.test.ts asserted the old string; it now pins both halves.

New banner:

[Ari control surface: added automatically by the Ari desktop app, not written by the user. This session can operate Ari through the CLI at $ARI_CLI. Commands: env, agents, session spawn|prompt|wait|read|diff|integrate|stop|destroy. Full protocol: $ARI_CLI --skill. Never disclose ARI_CONTROL_TOKEN.]

How verified

Windows 11. "$ARI_CLI" env runs from Git Bash (exit 0) — the value is a Windows-style ...\ari.cmd path and MSYS resolves it. Bare ari does not resolve, which is the bug.

pnpm verify green:

shared       15 passed
contracts    21 passed
ui          159 passed
providers   412 passed
engine      164 passed
ari-core    260 passed
desktop    1344 passed, 3 skipped

🤖 Generated with Claude Code


Devin Review

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>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread apps/desktop/src/main/engine.ts
@j35dev
j35dev merged commit 9236163 into main Sep 14, 2026
3 checks passed
@j35dev
j35dev deleted the fix/control-surface-banner branch September 14, 2026 14:15
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