You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 52d26c1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(agent): failClosed says whether anything is in place; failOpen names its policy and cleans up without a sidecar
Review on #138.
- failClosed without the proxy: the program reports "no managed entries are
in place, so the tool keeps its own settings" when nothing of the daemon's
is in the file (a first apply without the proxy, or entries removed by
hand), and keeps "the managed entries stay and the tool fails" when they
are. In place = a managed provider or chat-model entry with a pairing
header, or a VS Code override pointing at an agentdesktop loopback route;
the file is read for this only under failClosed and never written. A file
that cannot be read is logged and counts as not in place; one that does not
parse counts as not in place (the merge reports it once the proxy is back).
Before, the status claimed the tool fails while VS Code on GitHub's models
went to GitHub directly.
- failOpen: all three planners report "the managed entries are removed until
the proxy is back (whenProxyUnavailable: failOpen)" instead of the generic
proxy-absent reason, which is removed.
- Cleanup without a sidecar while the daemon has no pairing (proxy off,
failOpen or program removed): Copilot CLI providers and VS Code chat-model
entries under the managed names that carry any pairing header are removed;
user entries stay; with a known pairing only that value counts, as before.
Before, such entries were left pointing at the unavailable port.
- README (when failClosed has nothing to keep, the status row, the
any-pairing rule), schema (`llmGateway.whenProxyUnavailable`), the
controller's toggle text and a Storybook fixture.
Tests: 13 new (Copilot CLI 5, VS Code chat models 5, VS Code settings 3;
2 of them guard existing behaviour). The two "keeps its mode" tests assume
umask 022, as the existing file-mode tests do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,11 @@ Avoid repeating `/v1` in both URLs.
140
140
programs that use the proxy (`programs.copilot`, `programs.vscode`). With
141
141
`failClosed`, the default, the daemon leaves their managed entries as they
142
142
are: the Copilot CLI and VS Code stay pointed at the loopback port, and those
143
-
requests fail instead of reaching GitHub past the gateway. If the address could
143
+
requests fail instead of reaching GitHub past the gateway. This needs entries
144
+
to be in place: on a first apply without the proxy, or after the entries were
145
+
removed by hand, nothing points at the loopback port, so VS Code on GitHub's
146
+
models talks to GitHub directly and the Copilot CLI and VS Code on own models
147
+
have no gateway models; the status says so. If the address could
144
148
not be bound because another process holds it, that process receives those
145
149
requests, with VS Code's Copilot tokens and the pairing value: use the default
146
150
on devices with a single user, as for the proxy in general. With
@@ -348,7 +352,10 @@ startup stops the daemon from starting, as for the other programs). If the
348
352
daemon's sidecar next to the file is gone, entries under the managed names
349
353
that carry a pairing header are replaced on the next apply, and those that
350
354
carry this daemon's own pairing value are removed when the program goes
351
-
away; entries with another pairing value are left alone. The file is written owner-only. The
355
+
away; entries with another pairing value are left alone. While the daemon runs
356
+
without the proxy it has no pairing of its own, so any pairing value counts
357
+
(only an agentdesktop daemon writes that header). The file is written
358
+
owner-only. The
352
359
daemon's sidecar next to it (`.providers.json.agentdesktop`, owner-only) keeps
353
360
a copy of the file as last written, including the user's own providers and
354
361
their `apiKey` values, until the next apply. Removing
@@ -432,7 +439,8 @@ resolved (and stops the daemon at startup, as for the other programs); an
432
439
empty file is filled. If the daemon's sidecar next to the file is gone, an
433
440
`agentdesktop`entry carrying a pairing header is replaced on the next apply,
434
441
and one carrying this daemon's own pairing value is removed when the program
435
-
goes away. Pass-through
442
+
goes away (while the daemon runs without the proxy, one carrying any pairing
443
+
value). Pass-through
436
444
model keys are written as given, so a misspelt key reaches VS Code unchanged.
437
445
The daemon's sidecar next to the file (`.chatLanguageModels.json.agentdesktop`,
438
446
owner-only) keeps a copy of the file as last written, including the user's
@@ -672,7 +680,7 @@ device-wide state. The device page in the controller lists them under
672
680
| `unchanged` | The program is configured and nothing needed to change. |
673
681
| `removed` | The program is no longer configured and its managed content was removed. |
674
682
| `conflict` | A managed file holds configuration the daemon will not overwrite; the detail names the file. |
675
-
| `inactive` | The program uses the LLM gateway but the local LLM proxy is not running (see `llmProxy.error` in daemon-info): its entries were left pointing at the loopback port (`whenProxyUnavailable: failClosed`, the default) or removed (`failOpen`). |
683
+
| `inactive` | The program uses the LLM gateway but the local LLM proxy is not running (see `llmProxy.error` in daemon-info): its entries were left pointing at the loopback port (`whenProxyUnavailable: failClosed`, the default; the detail says when no entries were in place, so the tool keeps its own settings) or removed (`failOpen`). |
676
684
| `blocked` | The program had changes, but none were written because another program conflicted or failed; the detail names that program. |
677
685
| `failed` | Planning or writing this program failed; the detail carries the error. |
"programs.copilot is configured but the local LLM proxy is not available; whenProxyUnavailable: failClosed, so the managed Copilot CLI providers are left as they are"
114
+
"programs.copilot is configured but the local LLM proxy is not available; whenProxyUnavailable: failClosed, so the Copilot CLI providers file is left as it is"
115
115
);
116
116
returnOk(());
117
117
}
118
118
tracing::debug!(
119
119
path = %path.display(),
120
120
"programs.copilot is configured but the local LLM proxy is not available, so the Copilot CLI is not pointed at the gateway; the reason is llmProxy.error in daemon-info (or daemon.llmProxy.listen is unset); whenProxyUnavailable: failOpen, removing the managed Copilot CLI providers"
"programs.vscode is configured but the local LLM proxy is not available; whenProxyUnavailable: failClosed, so the managed chat language models are left as they are"
109
+
"programs.vscode is configured but the local LLM proxy is not available; whenProxyUnavailable: failClosed, so the chat language models file is left as it is"
110
110
);
111
111
returnOk(());
112
112
}
113
113
tracing::debug!(
114
114
path = %path.display(),
115
115
"programs.vscode is configured but the local LLM proxy is not available, so VS Code is not pointed at the gateway; the reason is llmProxy.error in daemon-info (or daemon.llmProxy.listen is unset); whenProxyUnavailable: failOpen, removing the managed chat language models"
0 commit comments