Repository navigation
Commit 96ccee7
fix(upstream-fixes): agents no longer inherit the live server's port settings (#1828)
## Problem
A service unit can pass `T3CODE_PORT`, `T3CODE_HOST`, `T3CODE_MODE`, and `T3CODE_NO_BROWSER` as env.
The server passed them on to every agent and terminal.
A plain `vp run dev` there resolved `serverPort=3773`, the live server, so the dev web proxied to the live install.
The removed dev-app launcher hid this; #1827 makes plain `vp run dev` the agent path.
## Change
- `stripInheritedProviderEnvironment` also drops those four keys
- it now runs after `resolveServerConfig`, which reads them
- `T3CODE_HOME` stays: worktree dev outranks it
## Scope and approval
Found by aftercare A1 on #1827.
Upstream desktop never passes these to its backend, so this stays fork-only.
## Verification
```text
vp test run src/provider/providerSessionEnvironment.fork.test.ts src/provider/providerSessionEnvironment.test.ts src/cli → exit 0 (97 passed)
vp run typecheck → exit 0
vp run fork:ci → exit 0
```
`vp run dev --dry-run` in an agent shell:
| Env | serverPort |
| --- | --- |
| inherited | 3773 (live) |
| stripped | 15977 |
Claude Opus 5.5, via Claude Code.
## Fork trailers
Squashes:
- 6c1ea93 fix(upstream-fixes): agents no longer inherit the live server's port settings (#1828) (#1828)
- 2ca7974 fixup! fix(upstream-fixes): agents no longer inherit the live server's port settings (#1828) (#1828)
Fork-Domain: upstream-fixes
Fork-Tier: bugfix
Fork-Upstreamable: no
Co-authored-by: donjor <[email protected]>1 parent 5d5f3eb commit 96ccee7
3 files changed
Lines changed: 19 additions & 8 deletions
File tree
- apps/server/src
- cli
- provider
- packages/provider-core/src/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
0 commit comments