What happened?
Enabling Grok agent integration installs hooks, and Settings shows agent presence badges on, but Grok never gets a presence badge (no session_start / busy / idle) on a new install—or after a reinstall that leaves only the current composite hook shape.
Expected: sidebar / tab Grok badge tracks the session (session_start → busy → idle), same as other agents.
Verified cause (local, tip build): Grok loads the installed hooks, then refuses to run them with:
hook not executed: required env var(s) not set: ${PPID}
Installed composite commands embed $PPID in the command string (AgentPresenceOSC.ttyResolveSnippet / emitShell). Grok preflights $VAR / ${VAR} as required env before spawn; PPID is a shell special, not env, so every managed Grok presence hook no-ops. OSC 3008 never fires.
env passthrough for SUPACODE_* is already present on main; this failure is independent of that and hits new installs that only get the composite shape (no legacy helper script on the command line).
Steps to reproduce
- Clean or new machine path: ensure no dual-map legacy helper entries (or use a user who has never had Grok hooks, then enable Grok integration in Supacode Settings so it writes
~/.grok/hooks/supacode.json).
- Confirm Agent presence badges are enabled.
- In a Supacode terminal surface, run
grok (e.g. 0.2.106 stable) and send a prompt that uses tools.
- Observe: no Grok presence badge on the worktree/tab.
- Inspect session hook runs (e.g. session
updates.jsonl hook_execution for global/supacode:*): every run fails with hook not executed: required env var(s) not set: ${PPID}.
- Optional contrast: a command that only invokes a helper script path (no
$PPID on the command line) succeeds; inline composite with $PPID fails.
Supacode version and build
0.10.6 (1784188664)
(tip channel; same composite $PPID shape is on origin/main.)
macOS version
macOS 26.5.2 (25F84)
System locale
en_US
Mac hardware
MacBook Pro (Mac15,6), Apple M3 Pro
Relevant logs or screenshots
From a live Grok session updates.jsonl (hook_execution):
global/supacode:session_start[0].hooks[0]
failed: hook not executed: required env var(s) not set: ${PPID}
global/supacode:user_prompt_submit[0].hooks[0]
failed: same
global/supacode:pre_tool_use[0].hooks[0]
failed: same
Installed command fingerprint (managed hook body includes):
ps -o tty= -p "$PPID"
...
__sp=";pid=$PPID"
Anchors for triage: AgentPresenceOSC.ttyResolveSnippet, AgentPresenceOSC.emitShell, GrokHookSettings / GrokSettingsInstaller, ~/.grok/hooks/supacode.json, Grok error string above. Agent under test: Grok Build 0.2.106 (stable).
Are you planning to fix this yourself?
Before submitting
What happened?
Enabling Grok agent integration installs hooks, and Settings shows agent presence badges on, but Grok never gets a presence badge (no session_start / busy / idle) on a new install—or after a reinstall that leaves only the current composite hook shape.
Expected: sidebar / tab Grok badge tracks the session (session_start → busy → idle), same as other agents.
Verified cause (local, tip build): Grok loads the installed hooks, then refuses to run them with:
Installed composite commands embed
$PPIDin the command string (AgentPresenceOSC.ttyResolveSnippet/emitShell). Grok preflights$VAR/${VAR}as required env before spawn;PPIDis a shell special, not env, so every managed Grok presence hook no-ops. OSC 3008 never fires.envpassthrough forSUPACODE_*is already present on main; this failure is independent of that and hits new installs that only get the composite shape (no legacy helper script on the command line).Steps to reproduce
~/.grok/hooks/supacode.json).grok(e.g. 0.2.106 stable) and send a prompt that uses tools.updates.jsonlhook_executionforglobal/supacode:*): every run fails withhook not executed: required env var(s) not set: ${PPID}.$PPIDon the command line) succeeds; inline composite with$PPIDfails.Supacode version and build
0.10.6 (1784188664)
(tip channel; same composite
$PPIDshape is onorigin/main.)macOS version
macOS 26.5.2 (25F84)
System locale
en_US
Mac hardware
MacBook Pro (Mac15,6), Apple M3 Pro
Relevant logs or screenshots
From a live Grok session
updates.jsonl(hook_execution):Installed command fingerprint (managed hook body includes):
Anchors for triage:
AgentPresenceOSC.ttyResolveSnippet,AgentPresenceOSC.emitShell,GrokHookSettings/GrokSettingsInstaller,~/.grok/hooks/supacode.json, Grok error string above. Agent under test: Grok Build 0.2.106 (stable).Are you planning to fix this yourself?
ready.Before submitting
ready.