Skip to content

Cache remote Bash environment exports#30252

Draft
jif-oai wants to merge 1 commit into
mainfrom
jif/remote-bash-env-snapshot
Draft

Cache remote Bash environment exports#30252
jif-oai wants to merge 1 commit into
mainfrom
jif/remote-bash-env-snapshot

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • initialize remote Bash exports once per logical exec-server session
  • keep the captured environment executor-local and in memory
  • reuse it for remote non-TTY Bash -c commands when shell snapshots are enabled
  • fall back to the existing BASH_ENV behavior when capture is unsupported or fails

Why

App/SSH environments cannot inherit the already-initialized terminal environment, so each fresh Bash currently sources the workspace BASH_ENV again. This keeps the fix intentionally narrow: exported variables and PATH only, with no shell-state serializer, temp snapshot files, or command replay.

The one-time initializer runs through the same executor-side sandbox and managed-network preparation as the real command. The original command argv is then launched unchanged with BASH_ENV removed.

@jif-oai jif-oai force-pushed the jif/remote-bash-env-snapshot branch from 2b4e2e0 to 8ba845c Compare June 28, 2026 08:25
@jif-oai jif-oai force-pushed the jif/remote-bash-env-snapshot branch from 8ba845c to 6a501fb Compare June 28, 2026 08:37
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.

1 participant