Repository navigation
feat(tui): inherit terminal environment per session - #42957
Merged
Merged
Conversation
thdxr
enabled auto-merge (squash)
August 17, 2026 20:08
shuv1337
added a commit
to shuv1337/shuvcode
that referenced
this pull request
Aug 17, 2026
Superseded by anomalyco#42957 (42fc297): per-session in-memory environment inheritance via SessionEnvironment and Env.session(). Upstream forwards the entire client process.env (minus OPENCODE_PASSWORD/OPENCODE_SERVER_PASSWORD) into an in-memory SessionEnvironment map rather than an allowlist with PATH/hijack-var rejection. Env is not durable across server restarts and has no per-message semantics; Shell.create merges the session map when a local sessionID is present, so direct ! session.shell paths share the same inheritance. Trade-offs vs the retired plan: broader privacy surface, no restart survival, no forbidden-key backstop — acceptable given upstream shipped the core shared-service need.
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
session.environmentAPITesting
bun test test/session-environment.test.ts test/session-remove.test.ts test/session-create.test.ts test/tool-shell.test.ts(packages/core)bun test test/env.test.ts test/server-connection.test.ts(packages/cli)bun typecheck(packages/protocol)bun typecheck(packages/client)bun typecheck(packages/cli)Notes
Headers/Request/Responseerrors under core dependents and ended with a Bun SIGSEGV. No errors referenced files changed by this PR.