Skip to content

Refresh the guard binaries before run and sandbox launch an agent - #302

Merged
codeyevsky merged 1 commit into
solongate:mainfrom
j-ai-cmd:fix/refresh-guard-on-run-sandbox
Nov 4, 2026
Merged

codeyevsky merged 1 commit into
solongate:mainfrom
j-ai-cmd:fix/refresh-guard-on-run-sandbox

Conversation

@j-ai-cmd

@j-ai-cmd j-ai-cmd commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #283

Cause

run() in packages/app/main.go only calls install.InstallGoBinaries() for commands in cliSubcommands. run and sandbox are left out of that map on purpose, so scripts can launch an agent without a terminal. The side effect is that the two commands that actually start an agent against the guard never replaced a stale guard binary after an upgrade.

Fix

  • New guardRunnerSubcommands map with run and sandbox. They refresh the binaries the same way the human commands do, but stay out of the human-only gate, so scripts keep working.
  • installGoBinaries is now a package variable pointing at install.InstallGoBinaries, so the test can check the refresh without launching an agent.

How I tested

  • New TestAgentLaunchersRefreshGuardBinaries: run -- claude, run claude and sandbox 001 claude all refresh before the command starts, and an unknown command does not. It fails without the fix.
  • go test -count=1 -race ./... and go vet ./... in packages/app pass, including the existing human-only gate tests.

🤖 Generated with Claude Code

The installed guard was only refreshed for commands in cliSubcommands, and
run and sandbox are left out of that map on purpose so scripts can call them
without a terminal. That meant the two commands that actually start an agent
against the guard never replaced a stale one after an upgrade.

They now refresh the binaries too, without joining the human-only gate.
installGoBinaries is a package variable so the test can check this without
launching an agent.

Fixes solongate#283

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jai Dhingra <297267163+j-ai-cmd@users.noreply.github.com>
@codeyevsky
codeyevsky merged commit 6a64442 into solongate:main Nov 4, 2026
35 checks passed
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.

app: cliSubcommands map excludes run and sandbox from guard binary refresh

2 participants