Files
Aleksander DygońandClaude Opus 5.5 0f90cb3fb2 Start an agent's long job in its own process group (#8673)
* Start an agent's long job in its own process group

Codex ends the whole process group of a command when the command ends, so
a job that an agent started with `nohup ... &`, as OpenBot told it to,
stopped at once with no result. The instruction now gives `setsid` on
Linux and `set -m` in a subshell on macOS, so the job outlives the call.
The automation instruction uses the same way. Windows text is unchanged.

Fixes #7980

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the long-job instruction in the context budget

The agent context budget does not let the instructions grow. Give a short
text: "start your own long job with setsid" on Linux, and the set -m form
on macOS. setsid alone keeps the job alive when Codex ends the command's
process group. The instructions are now 3 bytes smaller, so the baseline
goes down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tell agents to detach a long job with set -m and a log file

A job that writes to the command's output stops when Codex closes that
output, and `setsid` can lose a race when the shell owns a terminal. A
real Codex run showed that only a job with its output in a file stays
alive. The text is now "(set -m; nohup ... >log 2>&1 &)" on Linux and
macOS. It is 1 byte shorter than the old text, so the context budget
goes down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 04:25:05 +01:00
..