Skip to content

fix(antigravity): pass plugin version, launch client, and local flag to monk-agent - #227

Open
emohack wants to merge 1 commit into
monk-io:mainfrom
emohack:fix/antigravity-hook-env
Open

fix(antigravity): pass plugin version, launch client, and local flag to monk-agent#227
emohack wants to merge 1 commit into
monk-io:mainfrom
emohack:fix/antigravity-hook-env

Conversation

@emohack

@emohack emohack commented Aug 2, 2026

Copy link
Copy Markdown

Context

The main launchers (scripts/start-monk-agent.sh / .ps1) hand the spawned monk-agent companion MONK_PLUGIN_VERSION, MONK_AGENT_LAUNCH_CLIENT, and MONK_AGENT_LOCAL so session metadata/telemetry report the real plugin version and launching client (see start-monk-agent.sh start_with_background_process() and the launchd plist).

The Antigravity PreInvocation cold-start hooks (.antigravity-plugin/hooks/ensure-monk-agent.sh / .ps1) start the companion with only the four auth/autospin variables, so every cold start on Antigravity:

  • reports an empty pluginVersion and no launch_client in telemetry,
  • silently drops a user-set MONK_AGENT_LOCAL (the agent's local-mode switch).

Change

Mirror the launcher exports in both Antigravity hooks. Behavior-preserving for existing users; the launch client defaults to antigravity (this hook is Antigravity-specific), matching the existing hardcoded telemetry comment.

Verification

  • sh -n passes on the POSIX hook.
  • Additive env exports only; no change to the spawn command or fast path.

…to monk-agent

The main launchers (scripts/start-monk-agent.sh/.ps1) hand the spawned
companion MONK_PLUGIN_VERSION, MONK_AGENT_LAUNCH_CLIENT, and
MONK_AGENT_LOCAL so session metadata/telemetry report the real plugin
version and launching client. The Antigravity PreInvocation cold-start
hooks (.antigravity-plugin/hooks/ensure-monk-agent.sh/.ps1) start the
companion with only the four auth/autospin variables, so every cold start
reports an empty plugin version and no launch client, and a user-set
MONK_AGENT_LOCAL is silently dropped.

Mirror the launcher exports in both Antigravity hooks (behavior-preserving
for existing users; launch client defaults to antigravity).
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.

1 participant