Skip to content

[codex] Refresh SSH agent for app-server proxy#28131

Draft
abhinav-oai wants to merge 1 commit into
mainfrom
codex/forward-remote-ssh-agent
Draft

[codex] Refresh SSH agent for app-server proxy#28131
abhinav-oai wants to merge 1 commit into
mainfrom
codex/forward-remote-ssh-agent

Conversation

@abhinav-oai

@abhinav-oai abhinav-oai commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

A long-running app-server can retain the SSH_AUTH_SOCK path from the SSH session that launched it. Once that session exits, the path points to a deleted socket even though the current proxy connection has a live forwarded agent.

Add an opt-in codex app-server proxy --forward-ssh-agent mode. The proxy validates its inherited agent socket and atomically refreshes a stable forwarded-ssh-agent.sock symlink beside the app-server control socket. If no live agent is available, it removes the stale link.

A detached app-server launched with that stable path can therefore follow the current proxy connection across SSH reconnects without changing turn or command execution behavior.

Fixes #22567

Testing

  • proxy flag parsing
  • live socket symlink replacement, connection, and clearing
  • cargo clippy -p codex-cli --tests -- -D warnings

@abhinav-oai abhinav-oai force-pushed the codex/forward-remote-ssh-agent branch from 05f1891 to 678c078 Compare June 14, 2026 00:16
@abhinav-oai abhinav-oai changed the title [codex] Forward SSH agents through app-server proxy [codex] Refresh SSH agent for app-server proxy Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex App Remote SSH does not honor ForwardAgent from ~/.ssh/config, breaking docker buildx --ssh

1 participant