Skip to content

desk: Grok long-session runtime — session-id mint, land-loop, caffeinate, wall timeout, abort rows (#5706 PR-C) - #3

Open
chasehuh wants to merge 1 commit into
desk/5706-a-steer-killfrom
desk/5706-c-long-session
Open

desk: Grok long-session runtime — session-id mint, land-loop, caffeinate, wall timeout, abort rows (#5706 PR-C)#3
chasehuh wants to merge 1 commit into
desk/5706-a-steer-killfrom
desk/5706-c-long-session

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

  • Fresh grok runs mint --session-id (live log <stamp>-<name>-<uuid8>.log, registry start row has the uuid at t=0); native --prompt-file.
  • --until-landed <PR#> / --until-regex: re-prompt the same session until origin/main --grep='(#N)' hits; LANDED: yes|no always appended; --max-cycles bound → exit 4; land jobs deny monitor,scheduler_* (the -p turn ends on a monitor hand-off: #5697/#5702).
  • caffeinate -i on darwin (48-min sleep gap on #5697); --wall-timeout; INT/TERM trap kills the wrapper's own tree and writes an abort row; EXIT trap writes exit rows with exit code, child pid, landed, cycles + Grok harvest (context %, compaction count, tool calls) via agent-registry.py; stderr teed to <live>.stderr; LATEST-<name>.log.

Tests

Self-test covers minted session id, native prompt-file, land-loop proof on cycle 1 and bound exit 4.

🤖 Generated with Claude Code

@chasehuh
chasehuh force-pushed the desk/5706-c-long-session branch from 77ac9ae to aa41b0b Compare September 2, 2026 00:31
@chasehuh
chasehuh force-pushed the desk/5706-a-steer-kill branch from 17d2b39 to 020a884 Compare September 2, 2026 00:31
…ate, wall timeout, abort rows (#5706 PR-C)

- Fresh grok runs mint --session-id up front: live log is <stamp>-<name>-<uuid8>.log
  and the registry start row carries the uuid before Grok prints anything.
- Grok reads --prompt-file natively (prompt out of ps / tokenmaxxing.log).
- --until-landed <PR#> / --until-regex: after each model turn, re-prompt the
  same session (--resume) until origin/main --grep='(#PR)' hits (or the regex
  matches the last final); LANDED: yes|no is always appended; bound via
  --max-cycles (default 12) → exit 4. Land jobs deny monitor/scheduler_*
  tools unless --allow-monitor (the -p turn ends on a monitor hand-off: #5697).
- caffeinate -i for the wrapper lifetime on darwin (idle sleep froze #5697
  polls for 48 min); --no-caffeinate to opt out.
- --wall-timeout 6h|90m|3600: TERM the session group, abort row.
- INT/TERM trap kills the pipeline, the tokenmaxxing supervisor and the raw
  child (agent-holders), writes an abort row; EXIT trap writes exit rows with
  exit_code, child_pid, landed, cycles, plus a Grok harvest (context %,
  compaction count, tool calls, errors, git/PR counts) via agent-registry.py.
- Grok/supervisor stderr is teed to <live>.stderr; LATEST-<name>.log per job.
- sume-bg-launch passes the new wrapper flags through.

Refs sumelabs/sume#5706
@chasehuh
chasehuh force-pushed the desk/5706-c-long-session branch from aa41b0b to c833868 Compare September 2, 2026 00:33
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