MCPcopy Index your code
hub / github.com/codeaashu/claude-code / withoutSSHTunnelVars

Function withoutSSHTunnelVars

src/utils/managedEnv.ts:23–36  ·  view source on GitHub ↗

* `claude ssh` remote: ANTHROPIC_UNIX_SOCKET routes auth through a -R forwarded * socket to a local proxy, and the launcher sets a handful of placeholder auth * env vars that the remote's ~/.claude settings.env MUST NOT clobber (see * isAnthropicAuthEnabled). Strip them from any settings-sourced

(
  env: Record<string, string> | undefined,
)

Source from the content-addressed store, hash-verified

21 * isAnthropicAuthEnabled). Strip them from any settings-sourced env object.
22 */
23function withoutSSHTunnelVars(
24 env: Record<string, string> | undefined,
25): Record<string, string> {
26 if (!env || !process.env.ANTHROPIC_UNIX_SOCKET) return env || {}
27 const {
28 ANTHROPIC_UNIX_SOCKET: _1,
29 ANTHROPIC_BASE_URL: _2,
30 ANTHROPIC_API_KEY: _3,
31 ANTHROPIC_AUTH_TOKEN: _4,
32 CLAUDE_CODE_OAUTH_TOKEN: _5,
33 ...rest
34 } = env
35 return rest
36}
37
38/**
39 * When the host owns inference routing (sets

Callers 1

filterSettingsEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected