Repository navigation
Conversation
…ker (sume#7839) Astra (codex) Mini workers kept "disconnecting": the outer session read the launcher flags quoted in its prompt plus the desk's "you are the main agent unless told otherwise", launched a nested worker via sume-bg-launch, reported "Started …" and exited rc=0. Codex's unified exec had returned the tool call early (status: failed) and killed the tracked child at turn end, so the nested session vanished with no remote-jobs trace; --host mini from the Mini (ssh to itself) made duplicate jobs instead. - agent-human-stream: export SUME_WORKER_SESSION, prepend a "[sume worker session]" preamble to every launched prompt (prompt_head stays original), refuse launches inside a worker session (exit 5; --sessions/--self-test are reads). AGENT_HUMAN_STREAM_WORKER_PREAMBLE=0 / SUME_BG_ALLOW_NESTED=1. - sume-bg-launch: same guard for launches (control plane still allowed). - sume-bg-remote run: export SUME_BG_REMOTE_JOB so the refusal names the Mini job; also commit the live Mini keychain file-store export. - install.sh: append "Sume worker mode (always on)" to ~/.codex/AGENTS.md and ~/.grok/AGENTS.md (Claude Code inherits via the import); check-wiring asserts it. AGENTS.md / SKILL.md: worker exception + prompt hygiene (no launcher flags in the prompt body). docs/MINI-WORKER-HOST.md: the pattern and the guards. - tests: host test 10/11 (guard, control plane, override, job marker) and a wrapper self-test for the preamble + guard; both scrub inherited markers so install.sh works from inside a worker. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the "Astra Mini workers disconnect" pattern tracked in https://github.com/sumelabs/sume/issues/7839. Do not merge without Chase's confirm (the Mini currently runs this branch from
~/.cstack/src).Root cause
--backend codex --model gpt-6-astra --effort mid,--host mini, "Fresh worker", "Job title: …"), and the deskAGENTS.mdsays "You are the main agent unless told otherwise". Nothing told the Codex worker otherwise, so it read the orchestration skill and launched itself as a nested worker.--host localfrom inside the worker: Codex'sunified_exec_startupreturned the tool call early (status: failed, child banner in stdout), the model reported "Started …", the outer job exited rc=0, and Codex killed the tracked child pid at turn end (nested log's last write 05:36:18, outer end 05:36:19). Noremote-jobs/dir →--status"unknown job".--host minifrom the Mini (ssh to itself) → a duplicate detached job on the same clone while the outer job still exited rc=0.turn.completed.Changes
agent-human-stream.sh:SUME_WORKER_SESSIONexport,[sume worker session]prompt preamble, nested-launch refusal (exit 5).sume-bg-launch.sh: same refusal for launches;--status/--jobs/--attach/--killstill work;SUME_BG_ALLOW_NESTED=1override.sume-bg-remote.sh:SUME_BG_REMOTE_JOBexport (+ the live Mini keychain file-store line that was uncommitted on the Mini).install.sh+sume-desk/worker-mode-snippet.md: "Sume worker mode (always on)" appended to~/.codex/AGENTS.mdand~/.grok/AGENTS.md;check-wiring.shasserts it.AGENTS.md,SKILL.md,docs/MINI-WORKER-HOST.md: worker exception, prompt hygiene, the pattern.sume-bg-launch.test.sh10/11,agent-human-stream.test.py::test_worker_preamble_and_nested_guard.Verification
sume-bg-launch.test.sh: all ok (11 cases).agent-human-stream --self-test: ok.sume-bg-launch --host mini, codex/gpt-6-astra, prompt with the same misleading header): job20260917T055755Z-astra-nest-probestayed attached, sawSUME_WORKER_SESSION/SUME_BG_REMOTE_JOBin its tool shell, both nested launch attempts returned exit 5, finishedPROBE: done,exit_code=0, zero child logs / registry rows. Details on sume#7839.🤖 Generated with Claude Code