[Bug]: Codex sub-agents keep failing after the shared App Server is killed by SIGKILL
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Run T3 server with Codex as a provider and start a few Codex-backed delegated tasks (
delegate_task) so the Codex App Server is running. - Kill the
codex app-serverprocess withSIGKILL. In our case the kernel's out-of-memory killer did it. - Start a new Codex delegated task, or retry one.
Expected behavior
T3 notices the App Server has exited and starts a new one for the next thread or turn.
Actual behavior
Every new Codex thread fails in ensureThread with "Provider turn failed to start". T3 retries each one 4 times, about 0.1 s apart, and all retries fail the same way. No new codex app-server process is started. We saw 12 tasks fail this way over 22 minutes, and it did not recover by itself. Claude threads on the same server keep working.
This is close to #12904, which was closed when #2829 (the new orchestrator) merged. Our build includes #2829 and has the same nested cause. The difference is that here brand-new delegated threads fail too, not only further turns on the thread that was running when the process died.
From the bundled code, makeTerminationError in effect-codex-app-server/src/stdio.ts turns a failed handle.exitCode into CodexAppServerTransportError (read-process-exit-status). The handlers we found treat only CodexAppServerProcessExitedError and CodexAppServerInputStreamEndedError as a dead process. For a signal death exitCode fails rather than returning a code, so the session doesn't look exited and stays in use. We haven't tested this against source.
Impact
Blocks work completely (for Codex, until the server restarts)
Version or commit
0.0.46-nightly.20261005.2702
Environment
Ubuntu, Linux 6.8.0, headless t3 serve as a systemd user service, Codex CLI 0.160.0, model GPT-6 Astra via delegate_task
Logs or stack traces
# kernel
Out of memory: Killed process 23099 (codex) total-vm:2572184kB, anon-rss:1505720kB ... oom_score_adj:200
# T3 server, repeated for every new delegated Codex task from 16:12 onwards
WARN Orchestration effect execution failed effectType: 'provider-turn.start'
[cause]: ProviderTurnStartError
[cause]: ProviderAdapterEnsureThreadError: Failed to ensure codex provider thread for app thread thread:delegated-task:...
[cause]: CodexAppServerTransportError: Codex App Server transport operation 'read-process-exit-status' failed.
[cause]: PlatformError: Unknown: ChildProcess.exitCode (codex app-server)
[cause]: Error: Process interrupted due to receipt of signal: 'SIGKILL'
Workaround
Restart the T3 server.
Related: #12904, #15359 (the same signal-as-read-error mapping on the desktop backend).
[!NOTE] Grok responding on behalf of Julius.
Triage
Thanks @BenWortley for the detailed report and the cause chain, it made this quick to trace. Reading current main (ac8e9453ca), this looks like a Codex session that stays stuck after the shared app-server dies. It's separate from #12904 and #15359.
What I found
- How the error is produced. Effect's
ChildProcess.exitCodefails when Node reports a signal and a null exit code (Process interrupted due to receipt of signal: 'SIGKILL').makeTerminationErrorinpackages/effect-codex-app-server/src/_internal/stdio.tsmaps that failure toCodexAppServerTransportError(read-process-exit-status), and only maps a numeric code toCodexAppServerProcessExitedError. The protocol keeps that error, so every later RPC fails with it, andensureThreadwraps it asProviderAdapterEnsureThreadError("Provider turn failed to start"). The four quick retries are the effect worker: five attempts with backoff starting at 100ms. - The error tag alone may not be the deciding factor. On the new orchestrator, the only catch of
CodexAppServerProcessExitedError/CodexAppServerInputStreamEndedErroristerminateBackgroundTerminalinCodexAdapterV2.ts. A numeric exit would fail the nextthread/startwithProcessExitedErrorand still leave the same dead process in place, so remapping SIGKILL would change the log line without starting a new app-server. - Why no new app-server is spawned.
- Codex sets
supportsMultipleProviderThreadsPerSession, so every Codex thread for an instance shares one derived session id (provider-session:…:shared). A newdelegate_taskattaches to that session instead of opening another. - The adapter event stream is
Queue.takeon a queue that isn't ended or failed when the child dies, andProviderSessionManageronly drops a session when that stream ends or fails. The Codex client also doesn't wireonTermination. So the dead client stays the live session, andopenreturns it instead of spawning. - Idle release is 30 minutes and each attach resets it. If the killed turn still has running commands, tools, or subagents in memory,
hasPendingBackgroundWorkcan pin the session for up to 4 hours. That fits "no recovery over 22 minutes" and "restarting the T3 server fixes it". Claude uses a separate per-thread session, which is why it keeps working.
- Codex sets
- Related items. #12904 was this signal-exit symptom on the old runtime and was closed when the new orchestrator landed. #15359 and #15406 are about desktop backend log wording for the same Effect
exitCodebehavior, not this shared Codex process.
Likely fix area
The Codex adapter / ProviderSessionManager session lifecycle. One option is to treat any app-server death, including a signal, as session death: end or fail the adapter event stream and the in-flight turns so the shared session is released and the next thread spawns a fresh codex app-server. Adjusting the error tag in stdio.ts could go alongside that, but probably wouldn't be enough on its own.
Workaround: restarting the T3 server, as you found.
A maintainer will decide on the fix direction.
Another occurrence, this time hitting an in-flight turn (steer/interrupt path) rather than a new thread:
- T3
0.0.46-nightly.20261011.2955(72fbad7b), Codex CLI0.162.1, Linux x64 (headless,t3 serve), shared custom Codex provider instance. Host was under heavy memory pressure (no swap, global OOM kills nearby); OOM is the likely killer but not confirmed for this PID. - The shared
codex app-serverdied mid-turn (last notification was a completed reasoning item, noturn/completed). T3 kept the runrunning. - ~23 min later a follow-up message failed
provider-turn.steerfive times:ProviderAdapterSteerRunError→CodexAppServerTransportError(read-process-exit-status) →Process interrupted due to receipt of signal: 'SIGKILL'. - Stop:
ProviderAdapterInterruptErroragainst the same dead transport; the fallback then marked the runinterrupted. The next message's run failed to start, and the shared provider session is still projected asready. - Source at that commit matches the analysis above:
CodexAppServerClient.makedoesn't wire the protocol'sonTermination, so theCodexAdapterV2event stream never ends andProviderSessionManagerkeeps reusing the dead shared runtime.
Suggested extra regression case for #17046: kill the app-server after turn/start but before turn/completed, then assert the in-flight run goes terminal, steer/interrupt fail fast (not 5× retries), and the next message spawns a fresh app-server.
Hitting this one constantly on a 16GB ram host where systemd-oomd kills the codex app server constantly.
Additional confirmed Linux occurrence, including T3 0.1.1-nightly.20261016.3203: a systemd-oomd kill of the shared Codex App Server leaves the T3 server healthy but Codex work stuck until manual recovery. Adding evidence here rather than opening a duplicate of this issue or #17045.
Environment
- Linux x86_64, Omarchy/Arch, kernel
7.2.5-3-omarchy, systemd261.2. - Approximately 30 GiB RAM and 30 GiB swap.
- Desktop client connected to a single headless
t3 servesystemd user service. - Codex CLI
0.162.1, using a custom OpenAI-compatible backend withfeatures.instant_interrupt=false. - The first two incidents below occurred on
0.0.46-nightly.20261014.3132. The package was updated at 09:14 local time; the backend restarted at 09:17:44, and the last incident occurred on0.1.1-nightly.20261016.3203(release commite3b35d1b2440b104f0bc2e357377c348121234dd).
Three scope kills on October 16, 2026
Times are UTC−03:00. Memory figures and killed counts are the systemd journal's own reporting, not an independently enumerated count of unique OS processes.
| Time | Journal-reported killed count | Scope memory peak | Scope swap peak |
|---|---|---|---|
| 00:33:15 | 3,917 | 11.7G | 17.6G |
| 08:51:05 | 2,557 | 12.9G | 10G |
| 09:29:30 | 2,752 | 11.4G | 7.1G |
Sanitized excerpt from the last incident:
09:29:30 systemd-oomd: marked the t3code-codex-<scope>.scope for killing:
host memory and swap usage both exceeded 90%
09:29:30 systemd: systemd-oomd killed 2752 process(es) in this unit.
09:29:30 systemd: Failed with result 'oom-kill'.
09:29:30 systemd: 11min 21.897s wall clock time,
11.4G memory peak, 7.1G memory swap peak.
The earlier same-day failure was captured in the T3 trace as:
orchestrationV2.providerTurnStart.start
ProviderAdapterProtocolError: Failed to inject historical context
CodexAppServerTransportError:
Codex App Server transport operation 'read-process-exit-status' failed
Process interrupted due to receipt of signal: 'SIGKILL'
At 09:35, after the third kill:
t3code.servicewas stillactive/running, and its HTTP endpoint returned 200.- No active
t3code-codex-*scope remained; the killed scope hadResult=oom-kill. - Thirteen runs were still projected as
running: the main conversation and twelve delegated tasks. No pending/running effect-outbox entries or unresolved runtime requests were present. - The UI subsequently displayed:
The provider could not start this turn. Retry the turn; if it keeps failing, check the provider setup and server logs.
Using Stop on the main conversation terminalized all thirteen runs as interrupted. Restarting the T3 service then passed probeCodexAppServerProvider and requestAllCodexModels, and the user resumed the conversation. No database rows were edited manually.
Mitigations tested before the third kill
The third incident happened despite launching the same MCP versions directly instead of through three retained npx parents, setting thread_unload_delay_secs=1, and setting native Codex agents.max_threads=4 (read back as max_concurrent_threads_per_session=4). That native limit does not bound independent T3 delegate_task runs.
A separate no-inference JSONL probe (initialize, two ephemeral thread/start calls) measured:
| Configuration | Descendant tree process count including App Server | Summed RSS |
|---|---|---|
Existing stdio MCP configuration with npx launchers |
25 | 2,744 MiB |
| Same top-level MCP versions, direct launchers | 19 | 1,651 MiB |
Direct launchers, after thread/unsubscribe with 1-second delay |
1 | 290 MiB |
Summed RSS can double-count shared pages. This demonstrates startup overhead and that Codex can release these MCP children when explicitly unsubscribed; it does not establish a T3 memory leak or prove which processes held all memory at the actual kill. thread/loaded/list became empty after the explicit unsubscribe test.
Related: #15979 covers MCP residency and was closed after idle unloading was added. The installed T3 bundle still uses a 30-minute idle timeout; the latest scope was killed after only ~11 minutes, so this occurrence does not establish that the timeout implementation is broken. The distinct confirmed recovery problem remains: a dead shared Codex runtime and its runs are not promptly retired/replaced. #18139 appears relevant to that recovery path. This was a whole-scope systemd-oomd kill, not proof of the single-tool kernel-OOM propagation case discussed in #18329.
Private prompts, project data, full provider logs, credentials, and local connection addresses are omitted.
Another confirmed occurrence on Linux on Oct 18: the kernel OOM-killed a Node subprocess inside the shared Codex scope. With OOMPolicy=stop, systemd stopped the whole scope (Result=oom-kill), including the app-server.
Threads stayed “working” for over an hour, and the provider session remained ready despite no Codex process being alive. A later steer reported Codex App Server process exited with code 0; stopping and retrying the turn then failed to start it.
This also supports covering exit code 0 in the recovery fix: the OOM cause was visible in the scope status, not the provider exit code.
Another occurrence, on the 0.1.0 stable desktop build (Arch t3code-bin 0.1.0, Electron-bundled server). Two things here that the earlier reports don't cover: how it shows up for delegated tasks from the parent's side, and that an unrelated new thread was still failing almost an hour later.
Environment: Linux x86_64 (Omarchy/Arch), 61 GiB RAM + 61 GiB swap, systemd-oomd enabled, Codex CLI 0.162.1, GPT-6.1 Sol. Several Claude parent sessions were delegating tasks to Codex via delegate_task.
Timeline (local time)
- ~20:33: five delegated Codex tasks start on the shared app-server.
- 20:56:10: systemd-oomd kills the shared
t3code-codex-<hash>.scope. Journal:systemd-oomd killed 805 process(es) in this unit,Consumed 2h 39min CPU time over 1h 2min wall clock time, 21.9G memory peak, 9G memory swap peak. Most of that was tool children (builds/tests) of the parallel Codex tasks, not the app-server itself. - 20:58 to 21:45: 25 failed spans, every one against the same dead scope. No new Codex scope was ever started. 24 were
orchestrationV2.providerTurnStart.startand one wasorchestrationV2.deliverContextHandoffs. Same chain as in the report:ProviderAdapterEnsureThreadError/Failed to inject historical context→CodexAppServerTransportError ('read-process-exit-status')→Process interrupted due to receipt of signal: 'SIGKILL'. - 21:42: the five in-flight delegated runs finally go
failed, 46 minutes after their process died. They stayedrunningthe whole time. - 21:45:36: a brand-new top-level Codex thread, with no relation to the delegated work, fails to start about 5 ms after the first message. The UI shows "Provider turn failed to start". So 49 minutes after the kill, every new Codex thread on the instance was still dead.
- Two other Codex runs that were in flight at the kill were still projected as
runningwhen I checked afterwards. They never went terminal.
What it looks like from the delegating parent
- New delegations after the kill failed within about 2 s, and the parent got
status: "failed"withlatestTerminalSummaryset to the raw transport stringCodex App Server transport operation 'read-process-exit-status' failed.Nothing told the parent that the process had been killed, or that a retry on the same provider would fail. - The parents did the reasonable thing and retried on Codex (
<task>-retry). Those failed the same way in about 2 s. Then they re-delegated the work to a different provider. - Net result in the sidebar: a "Failed" copy of each task next to a working copy, and no way to tell whether the failed ones had finished. The in-flight ones hadn't. They were killed mid-turn, so their worktrees may hold partial changes.
Still present on main
As of 13aa882c22, CodexAdapterV2 still builds the session event stream as Stream.fromEffectRepeat(Queue.take(events)) with nothing ending that queue when the child exits, which matches the triage above. #18139 and #18764 both look like they'd fix this. Neither is merged yet, and #18329 (OOM-specific) has conflicts. Happy to test a build of either PR against a real oomd kill.
Two small asks beyond recovery, since they shaped what the parent agents did:
- Report a signal death to
delegate_taskcallers as "the provider process was killed (SIGKILL)" rather than the transport-operation name, so an agent doesn't burn a retry on the same dead process. - When the app-server dies, end its in-flight runs right away as interrupted, rather than leaving them "running" for most of an hour and then plain "failed". That makes it clear the work didn't finish.
Workaround is still restarting T3.
Another occurrence, on Windows, with a cause that isn't running out of memory, so it isn't specific to Linux.
Environment: Windows 11 Pro (26200), T3 desktop 0.1.1-nightly.20261017.3238, Codex CLI 0.163.0 installed globally with npm, default Codex home, no shadow home, no launch args.
Trigger: An agent in another thread ran taskkill /F /IM node.exe to clear a hung test runner. The npm codex.cmd shim runs node …\@openai\codex\bin\codex.js, so the shared codex app-server was killed with every other Node process. There's no systemd scope or OOM killer on Windows; any broad process kill does it. Agents use taskkill /IM node.exe fairly often on Windows.
What's different from earlier reports:
- Exit code 1, not a signal. On Windows a forced kill sets exit code 1, so the chain is
ProviderAdapterEnsureThreadError→CodexAppServerProcessExitedError: Codex App Server process exited with code 1. This shows that when the exit is reported as a number, T3 still keeps reusing the dead session, which is what the triage predicted. Changing how a signal is reported won't fix it; only ending the session when the process exits will. - The Codex status check stays green.
checkCodexProviderStatus/probeCodexAppServerProviderstart their own short-lived app-server, so they keep succeeding and the provider looks healthy in Settings. Meanwhile every turn fails within milliseconds. - No new process is started (verified). I temporarily pointed
binaryPathat a wrapper script that logged each launch. The only launch was the status check after the settings change. Delegated Codex turns run at the same time started no process and failed with the same code-1 error. - Settings changes don't release the session. Neither turning the Codex provider instance off and back on nor changing its
binaryPathcleared it. The next turn still got the dead shared session. This looks related to #19025. Only a T3 restart clears it. - No diagnostics are kept. The client discards app-server stderr (
runDrain(handle.stderr)), and Codex's own log (~/.codex/logs_2.sqlite) stops at the kill. The only way to trace this was matching timestamps against the other thread's tool calls.
Timeline (local time): Codex's last log entry was at 00:01:05, the taskkill ran at 00:02:41, and the first Codex turn failed at 00:07:15. It was still failing at 00:26, after four test delegations; no Codex app-server process was alive.
As far as I can tell, #21013 and #20992 would cover this too, because both trigger on any end of the connection to the app-server, regardless of how the exit is reported.
Written by Claude Opus 5.5 (claude-opus-5-5), running in Claude Code inside T3 Code, at the request of the user who hit this. The investigation and the tests above were done on their machine.
Another occurrence on Linux, same cause as the Oct 18 OOM report above.
Environment: Ubuntu (x86_64), T3 Code 0.1.0 running as the t3code.service systemd user service, Codex CLI 0.163.0 (npm global install, default Codex home, no shadow home, no launch args).
Trigger: At 12:03:27 UTC the kernel OOM killer killed processes in the shared Codex scope (t3code-codex-*.scope, memory peak 13G, probably from agent workloads running in that scope). systemd then stopped the whole scope (Result: oom-kill). The Codex log ends with a graceful shutdown at 12:03:28, so T3 reports exited with code 0 instead of a SIGKILL.
Symptom: For the next 8+ hours, every Codex turn and every new delegated Codex task failed in about 5 ms with ProviderAdapterEnsureThreadError caused by CodexAppServerProcessExitedError: Codex App Server process exited with code 0. No new codex app-server was spawned. The short-lived Codex probes (skills, model list, provider status, thread title generation) kept working, so the provider showed as healthy. Turning the provider instance off and on in settings did not help. Only restarting t3code.service recovers it.
Follow-up to my comment above: after restarting t3code.service at 20:34 UTC, it happened again 31 minutes later. One detail I haven't seen mentioned yet: T3 makes its own Codex processes the kernel's first OOM target, even when the memory hog is outside T3.
At 21:05:24 UTC there was a global OOM (constraint=CONSTRAINT_NONE, global_oom). From the kernel's task dump at that moment:
| RSS | Process | oom_score_adj |
|---|---|---|
| ~9.9 GB | qsmxt (root, inside a Docker container started by an agent) |
0 |
| ~4.5 GB | Xvnc |
0 |
| ~0.9 GB | MainThread in t3code-codex-*.scope |
800 |
| ~0.6 GB | MainThread in t3code-codex-*.scope |
800 |
The kernel killed the 0.9 GB process in the Codex scope (Killed process 1805091 (MainThread) ... oom_score_adj:800), not the 9.9 GB container process. systemd then stopped the whole t3code-codex-*.scope (Result: oom-kill), and the Codex App Server went with it, which leads to this bug.
So on a shared machine, any memory pressure from outside T3 is likely to land on the shared Codex App Server. With oom_score_adj=800 on its scope and systemd stopping the whole scope when any process in it is OOM-killed, every Codex thread breaks until T3 restarts. The fixes in #18764 / #21013 would make this recoverable. It may also be worth separating the app-server process from the agent's child processes, or not stopping the whole scope on a single OOM kill (e.g. OOMPolicy=continue), so that one killed child doesn't take down the shared server.
Environment as before: Ubuntu x86_64, 31 GB RAM, T3 Code 0.1.0 (t3code.service), Codex CLI 0.163.0.
Confirmed the same session-lifecycle failure on T3 Code 0.1.1, commit fe27e8e3dc12, Codex CLI 0.163.0, Linux x64. This occurrence retained a protocol parse error:
ProviderAdapterEnsureThreadError
CodexAppServerProtocolParseError: Codex App Server protocol operation 'decode-wire-message' failed.
SchemaError: Expected a valid JSON string
The shared session stayed ready. Subsequent attempts reused its failed transport and failed before a new turn could start. An independently started app-server could read the saved native thread, so deleting the conversation was unnecessary.
The public source at the tested commit shows the missing lifecycle connection:
protocol.ts,handleTerminationrecordsterminationFailure, fails pending requests, signals termination, and supports anonTerminationcallback.client.tsdoes not connect that callback. Its returned client also does not expose a termination effect.CodexAdapterV2.tscreates an independent event queue and returns a stream that takes from it. Transport failure never fails that queue.ProviderSessionManager.tsalready has cleanup for a failed provider event stream. Without that failure,openkeeps returning the cached runtime.
A deterministic regression test reproduced the missing propagation without a model request or external connection:
- Construct the real Codex client over in-memory
Stdio, with queues for input and output. - Construct the real
makeCodexAdapterV2, supply a client factory that returns that client, and open a test session. Use synthetic IDs and stub unrelated dependencies. - Inject the synthetic input
unexpected stdout\n. In a separate test, end the input queue to simulate stdout EOF. - Collect
session.eventswith a 500 ms test deadline and inspect the terminal error.
| Input | Unmodified shipped code | Local lifecycle patch |
|---|---|---|
| Synthetic malformed JSON line | Event stream stays open; test ends with TimeoutError |
Event stream fails with ProviderAdapterEventStreamError |
| Stdout EOF | Event stream stays open; test ends with TimeoutError |
Event stream fails with ProviderAdapterEventStreamError |
The 500 ms deadline detects the open stream; it is not a performance measurement. Both baseline failures and both patched passes were checked.
The tested fix exposes a replayable termination effect from the protocol through the client, then watches it in the adapter's scope. When the transport fails, the watcher fails the adapter event queue. The session manager can then release the failed runtime and open a replacement for later work. The adapter-side watcher is equivalent to the following, with raw.termination being the proposed new client member:
yield* client.raw.termination.pipe(
Effect.catch((cause) =>
Queue.fail(
events,
new ProviderAdapterEventStreamError({
driver: "codex",
providerSessionId: input.providerSessionId,
cause,
}),
),
),
Effect.forkScoped,
);
This must cover fatal parse failures as well as process exit and EOF. Restricting recovery to selected process-exit error tags would leave the parse-failure case broken. A termination observer also needs to see a failure that occurred before it subscribed.
After replacing the failed live runtime, thread/read and thread/resume succeeded for the original saved native thread. Conversation history and project files were preserved. Stale task state was cleaned separately. This verification did not replay the full workload or prove automatic recovery of interrupted work. Recovery must not silently resubmit an in-flight request whose outcome is unknown.
The actual invalid wire line was not retained, so its producer and the initial parse-failure trigger remain unconfirmed. This report establishes the subsequent failure to release the shared session. It does not establish an OOM event or require logging raw prompts, credentials, or wire payloads.
The approaches described in #20992 and #21013 appear relevant. The malformed-JSON test would be useful alongside their process-exit coverage. Neither PR was used for the local validation above.
Additional confirmed occurrence on 2026-10-25. Reporting here because the local cause chain matches this issue.
Environment
- Ubuntu 26.04.1 LTS, Linux
7.0.0-38-generic, x86_64. - Running T3 server:
0.0.46-nightly.20261011.2955, confirmed from the live server executable under~/.t3/runtime/versions/0.0.46-nightly.20261011.2955/. - Headless server running as an active
t3code.serviceuser service; user interacting through the web client. - Affected thread: ordinary top-level Codex conversation, provider instance
codex, modelgpt-6-astra, reasoning efforthigh. This occurrence was not limited to delegated tasks. codex-cli 0.164.0is currently on PATH. The exact app-server binary version used at the time of the failure was not established.
Observed sequence, UTC
- The Astra thread started at
07:06:36and produced replies and tool calls. Its last visible work included repository checks. No deliberate app-server termination was performed as part of this report. - At
07:21:59, the server trace already recordsCodexAdapterV2.unloadThreadandCodexAppServerProtocol.requestfailing with the nestedSIGKILLcause below. This is an observed failed operation, not a claim about the exact process-death time. - A user follow-up at
08:29:15reachedProviderTurnControlService.steer/CodexAdapterV2.steerTurn. Five attempts between08:29:15.675and08:29:17.220failed against the same transport error. - Stop/interrupt at
08:29:29also encountered that error; the original run was then recorded as interrupted. - Sending “Continue where you left off.” at
08:29:31produced a failed run at08:29:32, with the generic UI message: “The provider could not start this turn. Retry the turn; if it keeps failing, check the provider setup and server logs.” - Sending “continue” again at
08:30:21failed before the run started. At08:30:23, the UI showedCodex App Server transport operation 'read-process-exit-status' failed.The correspondingCodexAdapterV2.resumeThreadtrace at08:30:23.034840retains the sameSIGKILLcause.
The failed transport remained observable for at least 68 minutes, from the first captured failure to the final retry. The T3 server itself remained available to accept the follow-ups.
Sanitized cause chain from the server trace
CodexAdapterV2.resumeThread
CodexAppServerTransportError:
Codex App Server transport operation 'read-process-exit-status' failed.
PlatformError: Unknown: ChildProcess.exitCode
Error: Process interrupted due to receipt of signal: 'SIGKILL'
The stored thread timeline independently confirms the interrupted original run and the two failed retries. Logs and timeline were read only; no live database writes, service restart, process kills, or code changes were performed to investigate this incident.
Expected
Once the shared app-server dies, fail the affected work with an understandable explanation and establish a healthy app-server connection for a subsequent retry. The UI's advice to retry should not repeatedly route the user to the same dead transport.
Limits
SIGKILL is confirmed by the nested trace cause. Its sender is not established; I found no matching kernel OOM evidence in the available journal query, so this report does not attribute it to OOM. This is a captured real incident, not a new deterministic kill/recovery experiment. No workaround was tested as part of this report.
Report assembled from local logs and durable thread history using GPT-6.1-Sol via the Codex harness in T3 Code. The affected coding run used GPT-6 Astra at high reasoning.
Follow-up with a newer confirmed occurrence on T3 0.1.3-nightly.20261025.3655, plus a correction to my earlier Oct 25 report. Adding it here because the actual logs match this issue, rather than opening another report for the generic UI message.
Environment and version evidence
- Ubuntu 26.04.1 LTS, Linux
7.0.0-38-generic, x86_64; approximately 5.2 GiB RAM; headless T3 service. - The live server executable resolves to
~/.t3/runtime/versions/0.1.3-nightly.20261025.3655/t3;server-runtime.jsonrecords the same server version and a start time of2026-10-25T05:56:10.739Z. - Crucially, the retained failing stack traces themselves name that version, including the morning failures in my previous comment. My earlier
0.0.46-nightly.20261011.2955attribution was incorrect; the retained traces identify the newer build. - This newer occurrence affects an ordinary top-level thread on a custom Codex provider instance, using
gpt-6.1-solwithreasoningEffort: xhigh. Another Codex instance was able to run work afterwards, so this does not establish an outage of every instance. - The configured launcher currently reports
codex-cli 0.164.0. Its exact version at process launch was not independently recorded.
New incident, October 25, all times UTC
12:36:38: systemd starts the affectedt3code-codex-<scope-B>.scopewithcodex app-server.13:13:07.193: the affected conversation's fourth run starts.13:19:40: the user journal recordssystemd-oomd killed some process(es) in this unitfor that same scope, reporting a 1.1G memory peak and 115.9M swap peak. The thread's native provider-event log ends at13:19:40.323Z.13:40:55.156: interrupting the run fails throughProviderTurnControlService.interrupt/CodexAdapterV2.interruptTurn, with the nestedSIGKILLtransport cause below. The run is subsequently recorded as interrupted at13:40:55.270Z.- A retry is requested at
13:40:56.448Z.CodexAdapterV2.startNativeTurnfails at13:40:56.873Z, retaining the same scope-B identifier andSIGKILLcause. The retry is recorded as failed at13:40:56.902Z. - Its persisted error item contains exactly:
The provider could not start this turn. Retry the turn; if it keeps failing, check the provider setup and server logs.
Sanitized excerpts, with the scope identifier consistently replaced:
# user journal (original local time UTC+05:30 converted to UTC)
2026-10-25T13:19:40Z systemd:
t3code-codex-<scope-B>.scope: systemd-oomd killed some process(es) in this unit.
memory peak 1.1G; memory swap peak 115.9M
# server trace, 2026-10-25T13:40:56.873150Z
CodexAdapterV2.startNativeTurn
CodexAppServerTransportError:
Codex App Server transport operation 'read-process-exit-status' failed.
PlatformError: Unknown: ChildProcess.exitCode
(... systemd-run ... --unit=t3code-codex-<scope-B>.scope
--property=OOMPolicy=continue ... codex app-server)
Error: Process interrupted due to receipt of signal: 'SIGKILL'
The retry still reached the killed transport more than 21 minutes after the scope kill. The T3 server remained running and accepted the retry. Expected behavior remains to retire the dead runtime, terminalize affected work, and establish a healthy runtime for a later retry.
Additional evidence for the morning incident
The user journal also identifies systemd-oomd killed 17 process(es) in this unit at 07:12:13Z for the distinct scope-A named in the morning read-process-exit-status / SIGKILL traces. This supplies the matching scope-kill evidence missing from my earlier comment. It is separate from the afternoon incident above.
Limits
This is investigation of retained logs and read-only durable state, not a controlled reproduction. No provider setup change, service restart, process kill, database write, or product-code change was performed for this investigation. Separate validation scopes were OOM-killed later at approximately 13:27 and 13:33 UTC; those are different units and are not the provider kill reported above. The journal identifies the killed provider scope, but does not establish which workload caused the host memory pressure or a T3 memory leak. No automatic recovery or workaround was tested. Thread identifiers, custom instance name, prompts, private paths, credentials, and complete logs are omitted.
Diagnostic investigation and report: GPT-6.1-Sol, high reasoning, through the Codex harness in T3 Code.
Same failure on T3 0.1.2 (Ubuntu, Linux 7.0, headless t3code.service user service, Codex through delegate_task).
During a memory spike across the agents slice, the kernel OOM killer killed the shared codex app-server scope (t3code-codex-*.scope, 4.3 GB peak). T3 never started a new app-server. For the next ~13 hours every Codex delegated task failed about 1.5 s after it was requested, with the same chain as above:
ProviderAdapterEnsureThreadError: Failed to ensure codex provider thread for app thread thread:delegated-task:...
CodexAppServerTransportError: Codex App Server transport operation 'read-process-exit-status' failed.
PlatformError: Unknown: ChildProcess.exitCode (/bin/sh -c ... systemd-run --user --scope ... -- codex app-server)
Error: Process interrupted due to receipt of signal: 'SIGKILL'
Eight tasks across four threads failed this way. Claude threads on the same server kept working, and the Codex provider did not recover on its own.
Until #22791 lands, we work around it with a watchdog that reads the t3code-codex-*.scope journal. When a Codex scope ended within seconds of an OOM kill and no newer Codex scope has started since, it restarts t3code.service once no agent turns are running.
Another occurrence on the newest nightly, 0.1.4-nightly.20261027.3783, this time a clean exit code 0 with no signal, OOM kill, or settings change on record.
Environment
- Linux x64, Omarchy (Arch), kernel 7.2.8, 15 GiB RAM and 31 GiB swap
- T3 Code desktop AppImage, nightly
0.1.4-nightly.20261027.3783(release commitdc84b0962e), Electron-bundled server; it auto-updated to this build at 22:19 UTC, 20 minutes before the failure - Codex CLI 0.164.0, default Codex home
- A Claude parent thread was running four Codex delegated tasks through
delegate_task
Timeline (UTC, 2026-10-27)
- 22:19:59: the shared app-server starts in
t3code-codex-<hash>.scopeafter the update restart. - 22:39:09: last line that app-server's PID wrote to
~/.codex/logs_2.sqlite, in the middle of anitem/agentMessage/deltastream. It logged no WARN or ERROR lines in its whole 19-minute life. - 22:39:29: the scope ends:
Consumed 1h 10min 155ms CPU time over 19min 30.038s wall clock time, 6.9G memory peak, 1.5G memory swap peak. The journal has no "Stopping" line for it, no systemd-oomd or kernel OOM entry, and coredumpctl has no dump. - 22:39:48: the next delegated task fails in
ensureThread:ProviderAdapterEnsureThreadError→CodexAppServerProcessExitedError: Codex App Server process exited with code 0. Each retry over the next 5 seconds fails the same way, with the underlying request failing in under 1 ms. - 22:40:26: a retry task fails the same way.
- 22:41:17: five
steerattempts on a run T3 still had as active fail withProviderAdapterSteerRunError. - 22:45: quitting and relaunching the desktop app started a new app-server, and Codex work resumed.
What the trace shows
No new codex app-server was spawned between 22:39:29 and the relaunch, and there is no ProviderSessionManager.removeLiveEntry span in that window, so the dead session was never released. The provider status probe (withCodexAppServerClient, which runs its own short-lived app-server) kept succeeding every minute while every real Codex turn failed.
Source
The gap described in this issue is still present at the release tag and on current main. CodexAdapterV2 returns events: Stream.fromEffectRepeat(Queue.take(events)) (apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts:6536 at dc84b0962e, :6731 on main), and nothing ends that queue when the protocol's termination signal fires. ProviderSessionManager.startEventPump releases a session only when that stream ends, so the dead session is reused until T3 restarts. #18764, #21759, and #22791 are still open.
What this occurrence adds
- The exit was a clean code 0, so a fix keyed to SIGKILL or the
read-process-exit-statusmapping alone would miss it. The session-release fix covers it. - Why Codex exited can't be recovered from T3's side.
makeChildStdiodrains the app-server's stderr (stderr: () => Sink.draininpackages/effect-codex-app-server/src/_internal/stdio.ts), and the server trace has no span for the process exit itself. Keeping the last stderr lines and logging the exit code, signal, and scope result would make the next one diagnosable.
Workaround: quit and relaunch T3 Code.
Drafted by Claude Opus 5.5 in Claude Code (launched by t3 triage), following the T3 Code triage playbook.