Skip to content

desk: fix Grok steer-kill on macOS — agent-holders kills the session group and waits (#5706 PR-A) - #2

Open
chasehuh wants to merge 2 commits into
mainfrom
desk/5706-a-steer-kill
Open

desk: fix Grok steer-kill on macOS — agent-holders kills the session group and waits (#5706 PR-A)#2
chasehuh wants to merge 2 commits into
mainfrom
desk/5706-a-steer-kill

Conversation

@chasehuh

@chasehuh chasehuh commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Implements sumelabs/sume#5706 (desk Grok Build harness at Codex-class long-session resolution). Stacked: A → C → B → D → E; merge in that order (each PR bases on the previous branch). After landing on main: cd ~/.cstack/src && git stash && git pull && git stash drop && ./install.sh --sume-com ~/sume/sume-com (the desk tree has the same Fable 5.1 edits uncommitted; PR-A carries them as its first commit).

What

  • pgrep -a on macOS = include ancestors (pids only); the old steer never matched → second grok -p --resume hung in session_create (empty live log).
  • New bin/agent-holders.sh list|kill <uuid>: keys on --resume/--session-id <uuid> argv tokens, excludes ancestors and gt merge/submit, TERMs the process group (wrapper + tokenmaxxing supervisor + raw grok child, which the supervisor orphans), waits, KILL-escalates, exit 3 if still held.
  • Wrapper refuses grok --resume while a holder is live and grok --continue while another job is open in the cwd.
  • Also carries the uncommitted desk edits (Fable 5.1 model wiring) as the base commit.

Tests

bin/sume-bg-launch.test.sh (fake pgrep/ps/kill, darwin shape) + agent-human-stream --self-test. Real-binary probe: live session steered via sume-bg-launch --resume → old group released, new run streams (see issue comment).

🤖 Generated with Claude Code

…ssion group and waits (#5706 PR-A)

- sume-bg-launch --resume: pgrep -a on macOS means include-ancestors and prints
  pids only, so the old awk filter never matched and the steer never killed
  anything; two grok -p --resume on one uuid then hung the second in
  session_create (empty live log).
- new bin/agent-holders.sh: list|kill holders keyed on --resume/--session-id
  argv tokens (darwin pgrep -lf / linux -af), excludes ancestors and gt
  merge/submit, TERMs the process group so the tokenmaxxing supervisor and
  the orphan-prone raw grok child both die, waits, KILL escalates, exit 3
  if still held.
- agent-human-stream: refuse grok --resume while a live holder exists
  (AGENT_HUMAN_STREAM_FORCE_RESUME=1 overrides) and refuse grok --continue
  while another grok job is open in this cwd.
- bin/sume-bg-launch.test.sh: offline fakes for pgrep/ps/kill.

Refs sumelabs/sume#5706
@chasehuh
chasehuh force-pushed the desk/5706-a-steer-kill branch from 17d2b39 to 020a884 Compare September 2, 2026 00:31
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