Files
magpie/docs
yetone 13f9c7fca1 claude bridge: a caller elsewhere is told its environment is where the tools run
vv_nil on X: a Mac Claude Code through a Linux gateway's Claude
subscription gets Claude Code's own prompt from the gateway's run, which
names Linux and a temp folder, beside the caller's, which names the Mac
and its project. The model spent extra tool calls finding out whether its
environment had changed. A run that can't work in the caller's folder
(the folder isn't on this computer, or Claude Code is in WSL) now has
envElsewhereNote after the caller's instructions: the environment they
describe is where every tool runs, and goes before one given earlier.
Every tool of a run is the caller's, so that is true. The note names no
app or vendor. A run in the caller's own folder, a lean run and a caller
naming no folder are told nothing more. clientWorkDir is split so
clientNamedWorkDir gives the folder named, wherever it is.

Run: go test ./internal/gateway -run
'Claude|Bridge|Subscription|Lean|Vendor|Prompt' (ok, 49s), go vet for
linux and windows, gofmt -l. TestClaudeCallersWorkDirElsewhereIsNotUsed
now checks the note in both runs for a folder not here, a relative one
and a Windows path, and not for no folder; TestClaudeRunsInTheCallersWorkDir
checks a run in the caller's folder isn't told it. With envElsewhere
forced false by hand the first is red (0 of 2 runs).
Not tried: a real Claude Code run from a Mac client through a Linux
gateway, so how many tool calls it saves is not measured.
2026-10-26 11:01:58 +08:00
..