codex icon indicating copy to clipboard operation
codex copied to clipboard

Error running remote compact task: timeout waiting for child process to exit

Open ECamposSoria opened this issue 10 months ago • 30 comments

What version of Codex is running?

codex-cli 0.80.0

What subscription do you have?

pro

Which model were you using?

gpt 5.2

What platform is your computer?

linux server vm

What issue are you seeing?

Error running remote compact task: timeout waiting for child process to exit

What steps can reproduce the bug?

when auto compacting or using command /compact

What is the expected behavior?

to free up context and continue working

Additional information

No response

ECamposSoria avatar Jan 14 '26 16:01 ECamposSoria

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #4824
  • #4878
  • #4584
  • #1308
  • #2607

Powered by Codex Action

github-actions[bot] avatar Jan 14 '26 16:01 github-actions[bot]

Please use the /feedback command to upload your logs and session details, then post your thread ID here.

etraut-openai avatar Jan 14 '26 16:01 etraut-openai

019bbd13-a821-7a93-abe2-d1afa5733ae7

ECamposSoria avatar Jan 14 '26 17:01 ECamposSoria

Thanks for reporting. Looking at your logs, it appears that the compaction request exceeded a 30-second timeout. The CLI retried multiple times but hit the same timeout each time until it gave up.

So far, this is the only report of this that we've received. If you (or anyone else) sees it again, let us know.

etraut-openai avatar Jan 15 '26 01:01 etraut-openai

it happened again, just for you to know thread ID 019bc34c-e247-7341-b2db-06f62d55bf57

ECamposSoria avatar Jan 15 '26 21:01 ECamposSoria

@ECamposSoria, thanks for reporting. Are you on a corporate network/VPN/proxy that you know of? We don't set an explicit timeout ourselves, so trying to see what's terminating the connection.

sayan-oai avatar Feb 03 '26 23:02 sayan-oai

reproduced with thread: 019c83e7-5d40-7331-8572-7dad7fe4cb3c. (vm, screen lock due to inactivity, with vpn)

rusbogdan avatar Feb 22 '26 11:02 rusbogdan

reproduced too, thread 019ca5b7-aa9c-79d3-8866-a5fdf7bcd9dc

estingala avatar Feb 28 '26 20:02 estingala

Hi everyone, I encountered the exact same Error running remote compact task: timeout waiting for child process to exit issue and managed to find a working workaround.

💡 The Workaround: Delete the SQLite temporary files (-wal and -shm) in the .codex directory.

🛠️ Steps:

Open your terminal and navigate to the Codex data directory (usually ~/.codex).

Delete or rename state_5.sqlite-wal and state_5.sqlite-shm:

cd ~/.codex rm state_5.sqlite-wal state_5.sqite-shm Restart Codex. The auto-compact task should now proceed normally.

HopelessLoop avatar Mar 07 '26 14:03 HopelessLoop

the workaround does not resolve this for me unfortunately.

doranm09 avatar Mar 09 '26 16:03 doranm09

Hi all, I'm experiencing the same issue and it only happens when connected to my VPN (Surfshark dedicated IP). Then it seems to always fail auto compacting on large sessions, resulting in "Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)". When disconnecting, or not connected to, the VPN, the auto compacting completes without any issues.

Just had it again: Large session going on while connected to VPN -> Fails (error message above) -> Disconnecting VPN -> "Yo try again and continue" -> [working working] -> "Context compacted" - and it proceeds with the session.

ediks avatar Mar 12 '26 16:03 ediks

switching from xhigh bebore saying "continue" helps

BlackRule avatar Mar 16 '26 10:03 BlackRule

Thread ID: 019cf7a8-8b68-7231-9743-7e6fdfdef9a1

Hitting it multiple times on longer tasks

w0rk3r avatar Mar 16 '26 18:03 w0rk3r

Dealing with this bug every day.

Another thread ID: 019d01dd-ee72-72e1-bb3f-c785c8b3bed1

w0rk3r avatar Mar 19 '26 14:03 w0rk3r

#14860

initpwn avatar Mar 19 '26 19:03 initpwn

ID 019d0517-54f7-7bc0-b372-216a707baf6e

cyskzl avatar Mar 20 '26 03:03 cyskzl

Having this issue on Windows 11:

codex --version codex-cli 0.116.0

thread id = 019cfd9b-cdfd-7aa1-8ccc-e892831f2d0a

kaiospitz avatar Mar 24 '26 11:03 kaiospitz

Image How to solve this problem? It feels like waiting is meaningless and a waste of time.

it-zyf avatar Mar 25 '26 08:03 it-zyf

一样的问题 每次报错5次 之后 才能回答问题。

Beisheng8888 avatar Mar 27 '26 08:03 Beisheng8888

@Beisheng8888 @it-zyf @kaiospitz @w0rk3r

The timeout seems network-related.

Routing egress traffic from my VP through a server in Europe/North America definitely helped.

Using Tailscale, I configured an Azure VM as an exit node through which internet-bound traffic was routed.

I am happy to help if need be.

stevo1403 avatar Mar 27 '26 19:03 stevo1403