Codex IDE chat loses SSH/network access after idle/resume in same conversation
What version of the IDE extension are you using?
openai.chatgpt@26.5616.81150
What subscription do you have?
ChatGPT Plus
Which IDE are you using?
VS Code 1.125.1
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
In the same Codex IDE chat/session, SSH/network access works initially but is lost after returning to the chat later.
Earlier in the same conversation, Codex successfully connected to a LAN SSH host at 192.168.1.250 and started/monitored a long-running benchmark.
After leaving the chat idle and coming back later, the same conversation could no longer access the same SSH/network target.
Observed errors:
- Paramiko SSH failed with:
PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions.
- Test-NetConnection 192.168.1.250 -Port 22 returned False.
Expected:
A resumed Codex IDE chat should preserve the same SSH/network capability, or clearly indicate that the sandbox/network permission profile changed.
Impact:
Long-running remote benchmark monitoring becomes unreliable because Codex can start a remote run successfully, but later cannot reconnect to inspect run.log, summary.csv, or per-sample outputs.
This appears to be a Codex IDE session/resume or sandbox/network permission issue, not a remote SSH server issue, because SSH worked earlier in the same chat.
What steps can reproduce the bug?
- Open VS Code with the Codex IDE extension.
- Start a Codex chat in a local workspace.
- Ask Codex to connect to a LAN SSH host and run a remote command, for example:
"Connect to SSH host auriclee-dgx and run: hostname && whoami"
- Confirm Codex can successfully connect over SSH.
- In the same Codex chat, ask Codex to start or monitor a long-running remote command, for example a benchmark that writes logs on the remote host.
- Leave the chat idle for some time, then return to the same chat.
- Ask Codex to reconnect to the same SSH host or inspect the same remote run logs.
- The resumed chat can no longer access the SSH/network target.
Example commands used by Codex before the issue:
- SSH target: auriclee@192.168.1.250
Observed after resume:
- Paramiko SSH failed with:
PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions.
- Test-NetConnection 192.168.1.250 -Port 22 returned False.
Expected:
The same chat should keep the same network/SSH capability after idle/resume, or clearly report that the sandbox/network permission profile changed.
What is the expected behavior?
A Codex IDE chat that already had SSH/network access should preserve that capability after the chat is resumed from idle.
If the sandbox or network permission profile changes during resume, Codex should clearly report that the environment changed and that existing SSH/network access is no longer available.
The same remote SSH host should remain reachable from Codex in the same conversation, so long-running remote jobs can be monitored after returning to the chat.
Additional information
This affects long-running remote workflows. In this case, Codex successfully started a remote benchmark over SSH, but later could not reconnect in the same chat to inspect run.log, summary.csv, or per-sample result files.
The failure appeared after returning to the same chat later, not at the beginning of the workflow.
No remote SSH server change was made between the successful connection and the later failure.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Potentially related to #28296 and #29610, but I am reporting this separately because my repro is in the IDE extension and the visible regression is loss of SSH/TCP access to a LAN host after idle/resume in the same chat.
I re-tested this after the recent fix/update and I can no longer reproduce the issue.
In the same Codex IDE chat/session, Codex was able to open an SSH connection to the same LAN host that previously failed with WinError 10013.
SSH/network access works again from Codex, so I am closing this issue as resolved. Thanks.
Reopening because this has reproduced again, now with stronger local evidence that the failure is caused by stale per-thread sandbox permissions rather than by the SSH server or Windows networking.
New environment/evidence
Microsoft Windows NT 10.0.26200.0 x64OpenAI.Codex_26.707.6957.0_x64019f5ac1-aafc-7a00-b146-ddfb01c005b7agent-mode-by-host-id.local = full-access``
toml
``[windows]
sandbox = "elevated"
However,
.codex-global-state.jsonpersisted this thread underheartbeat-thread-permissions-by-idas:Permission transition captured in
logs_2.sqliteImmediately after
ThreadRollback, the next user-input submission explicitly carried the managed/restricted permission profile. This overrode both the visible Full Access mode and the global Windows sandbox setting.The effects were broader than one SSH destination:
PermissionError: [WinError 10013].curl.exealso failed immediately because outbound sockets were blocked.DangerFullAccess, SSH worked again.This suggests the Desktop/IDE client is reapplying stale task-level permissions from
heartbeat-thread-permissions-by-idduring rollback/resume. The sandbox runner appears to be enforcing the policy it was given; the likely fault is in client-side permission persistence or propagation.This looks closely related to #29693 and #25810, but this reproduction specifically adds
ThreadRollbackas a trigger and shows the exact permission transition in runtime logs.I did not attach the complete global-state or SQLite files because they contain unrelated prompt, repository, and host metadata. I can provide further sanitized excerpts if maintainers need them.