agent: Codex in a running WSL distro is connected once Codex on Windows is (@not_4O4 on X)

The Codex app's work mode on a project whose run environment is WSL starts
its app-server inside the distro, on the distro's ~/.codex (the app resolves
CODEX_HOME there with `bash -lc 'printf %s "${CODEX_HOME:-$HOME/.codex}"'`).
magpie wired Codex on Windows and, as a separate Agents row, the distro's
twin (codex@wsl:<distro>) only when the user connected that too, so the
picker listed OpenAI's models alone there.

ConnectCodexTwins, run at the start of each SyncCatalog, connects the twin
of each running distro once while Windows' Codex is connected. It leaves a
twin alone that is connected or disconnected already, whose config names a
provider or base URL of the user's own, or whose distro is stopped (asking
one starts it). A stash mark (<id>.autoconnected) keeps it to once, so a
later Disconnect stands. docs/subsystems/agent-wiring.md says so.

Run: TestConnectCodexTwins and TestConnectCodexTwinsKeepsOwnProvider; go
test ./internal/agent on mote (ok, 305s); TestWSL* and the new tests on the
Windows box (ok); gofmt; go vet darwin, linux and windows (nogui).
Broken by hand: Windows-connected check removed (red), own-provider check
removed (red). The Disconnected check is covered by the mark alone.
Not tried: the Codex app itself with a WSL project (read its bundle for the
CODEX_HOME resolution only); the reporter's distro and networking.
This commit is contained in:
yetone
2026-11-13 11:01:27 +08:00
parent 092a86ad22
commit 861a0442c1
4 changed files with 175 additions and 1 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ something else shows up as drift.
| Codex: DeepSeek models | A DeepSeek model's entry (`codexcat.deepSeek`: deepseek-v4*, -flash, -pro, -chat, -reasoner after any provider or relay prefix; not a routing group, not a distill) takes what DeepSeek's own Codex setup (cdn.deepseek.com/api-docs/codex-deepseek-setup-en.sh, its models.json) says of its models: `shell_type` `shell_command` (Codex 0.165 reads it as `unified_exec`, its only shell; older Codex had a one-shot `shell_command` tool), `support_verbosity` with `default_verbosity` low, `default_reasoning_summary` none (no `reasoning.summary` sent), `multi_agent_version` v2, and `supports_image_detail_original` on a model whose entry takes images. Not taken: its `base_instructions`/`model_messages` (magpie never rewrites a Codex prompt), its `auto_compact_token_limit` null (magpie's 272K default stays, from e950eb080's DeepSeek latency report; Full window or the model's Compact at gives the whole window), `supports_search_tool` false on v4-pro (#258), its reasoning levels (the provider's). `default_reasoning_summary` is tagged `keep:"unset"`, so a value the user put in another model's entry stays (`Keep`). Other vendors' entries are unchanged. `TestCodexCatalogDeepSeekAsDeepSeekSays`, `TestCodexCatalogKeepsUsersSummary`. | [`codexcat.go`](../../internal/codexcat/codexcat.go) |
| Named omp profiles | omp keeps a profile's settings under `~/.omp/profiles/<name>` (or under `PI_CONFIG_DIR`), each with its own `config.yml` and `models.yml`. Every such profile is an agent of its own — `omp#<name>` on Windows, `omp#<name>@wsl:<distro>` in a distro — so each can be connected, drifted and disconnected on its own. They share omp's model lists (`ListsFor`), and the default `omp` row is the folder `ompDir`/`ompIn` already pick, so an `OMP_PROFILE` that row is already pointed at is not listed twice. A name omp refuses is not a row: `default`, a trailing dot, or a Windows reserved device name (`aux`, `nul`, `com1`, `lpt9.x`, `con.work`), on every platform (`ompProfileOK`). A distro's profile names come from its probe and are kept in `wsl.json`; a stopped distro is never started to list them, its profile rows showing what was last seen (`asleep`). | [`omp.go`](../../internal/agent/omp.go), [`wsl.go`](../../internal/agent/wsl.go) |
| Claude Code in more than one folder | A Claude Code kept elsewhere with `CLAUDE_CONFIG_DIR` (an alias per account or workspace) has its own settings.json. The claude row is the folder the variable names, else `~/.claude`; every other folder under the home folder named `.claude…` that holds Claude Code's own files (`settings.json`, `.credentials.json` or `projects/`) is a row of its own, `claude#<name>` (`.claude-work` → `Claude Code · work`; the default `~/.claude` is `claude#default` while the variable points elsewhere), made by `claudeIn` at that folder (`place.dir`, as the `claude#launch` file is) and connected, set and checked there alone. The file `~/.claude.json`, another tool's `.claude-…` folder with none of those files and the launch file's folder are not listed. A folder outside the home folder is not found (BieJian21872 on X; `TestClaudeCodeInMoreThanOneFolder`). | [`claude_dirs.go`](../../internal/agent/claude_dirs.go) |
| WSL twins | On Windows each running distro is probed once, without starting a stopped one. The `wslKinds` agents found there become agents of their own, `<id>@wsl:<distro>`, edited through `\\wsl.localhost\<distro>`. A kind is found by its folder under the distro's home or by its command there (not one on a Windows drive). The probe runs `sh -l`, which reads `~/.profile` but not `~/.bashrc`, so a command off its PATH is looked for where Node's managers and installers keep one, as `proc.UserBinDirs` does here (`wslbin`): bun, `~/.local/bin`, volta, pnpm, nvm's default then the highest, fnm's default then the highest (`FNM_DIR`, `~/.local/share/fnm`, `~/.fnm`), mise's installs and shims, asdf, `~/.npmrc`'s prefix, cargo, deno and Homebrew (千里不再 on Discord: a Pi from fnm, not run yet so with no `~/.pi`, wasn't found). One on a Windows drive, which WSL's PATH reaches first when the distro's isn't on it, is looked past rather than taken as the only one (`wslcmd`, `wslwin`; `TestWSLProbeFindsNodeManagersBins`, `TestWSLProbeLooksPastWindowsCommand`). The shell isn't asked interactively for `~/.bashrc`'s PATH: under `timeout` such a bash stops itself on WSL and outlives the timeout. Where another tool shares one of them, the kind leaves it out: Gemini CLI is found by its command alone, because Antigravity keeps `~/.gemini` too. Antigravity CLI is found by its own `~/.gemini/antigravity-cli` or its `agy` command (mimi001234 on Discord). Goose is found by its folder alone, because a `goose` command can be pressly's migration tool. Reasonix also needs the version its command gives (`accept`), because the old npm client is named `reasonix` too. The gateway address and key follow the distro's networking: mirrored or NAT (`place`, `keyAt`). Under NAT the key is the gateway's WSL key (`gateway.WSLKey`, `-<agent>` after it where the agent's key names it), sharing on or off; the gateway listens at that address itself (gateway-routing's WSL under NAT). `ListsFor` keeps a twin's model picks under the Windows twin's id (#927). With Settings' Detect agents in WSL off (`NoWSLAgents`, #1264) magpie starts no wsl.exe at all: `proc.Command`, `CommandContext` and `ProbeContext` refuse one by any name or path with `proc.ErrWSLOff` (`wslOff` in [`proc/wsl.go`](../../internal/proc/wsl.go)), where every command magpie runs is made, so a path past agent's and wslrun's own gates (a request's Claude Code stand-in and classifier, #4872: on a computer without WSL each ask put up Windows' install window) asks nothing either (`TestWSLOffStartsNoWSL`, `TestWSLRunnerRefusedWhenOff`, `TestRunRefusedWhenOff`, `TestWSLStandInAsksNothingWhenOff`). With detection on, the same gate refuses wsl.exe with `proc.ErrNoWSLDistro` while the registry has no distro for the user (`HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss`, a key with a `DistributionName` each, read at every start, so one installed later is listed at once; a read that fails is unknown and wsl.exe is asked as before), and agent's and wslrun's listings take that as none (TraderX219 on X: Windows' own wsl.exe without WSL's package put up its update console every 20 to 30 seconds). A failed run whose output says WSL must be installed or updated (`wsl.exe --update`, the inbox prompt, the optional component missing; `proc.WSLSaid`, told by agent's and wslrun's runners) writes `wsl-update` beside settings.json, and wsl.exe is then refused with `proc.ErrWSLNeedsUpdate` for six hours, by every magpie process, unless WSL's package version or the registered distros change; a refused listing is unknown, so nothing remembered of a distro is forgotten (`TestNoWSLDistroStartsNoWSL`, `TestWSLUpdateBacksOff`, `TestNoWSLDistroRunsNoWSL`, `TestWSLUpdateKeepsDistros`). | [`wsl.go`](../../internal/agent/wsl.go), [`gatewaykey.go`](../../internal/agent/gatewaykey.go), [`proc/wsl.go`](../../internal/proc/wsl.go) |
| WSL twins | On Windows each running distro is probed once, without starting a stopped one. The `wslKinds` agents found there become agents of their own, `<id>@wsl:<distro>`, edited through `\\wsl.localhost\<distro>`. A kind is found by its folder under the distro's home or by its command there (not one on a Windows drive). The probe runs `sh -l`, which reads `~/.profile` but not `~/.bashrc`, so a command off its PATH is looked for where Node's managers and installers keep one, as `proc.UserBinDirs` does here (`wslbin`): bun, `~/.local/bin`, volta, pnpm, nvm's default then the highest, fnm's default then the highest (`FNM_DIR`, `~/.local/share/fnm`, `~/.fnm`), mise's installs and shims, asdf, `~/.npmrc`'s prefix, cargo, deno and Homebrew (千里不再 on Discord: a Pi from fnm, not run yet so with no `~/.pi`, wasn't found). One on a Windows drive, which WSL's PATH reaches first when the distro's isn't on it, is looked past rather than taken as the only one (`wslcmd`, `wslwin`; `TestWSLProbeFindsNodeManagersBins`, `TestWSLProbeLooksPastWindowsCommand`). The shell isn't asked interactively for `~/.bashrc`'s PATH: under `timeout` such a bash stops itself on WSL and outlives the timeout. Where another tool shares one of them, the kind leaves it out: Gemini CLI is found by its command alone, because Antigravity keeps `~/.gemini` too. Antigravity CLI is found by its own `~/.gemini/antigravity-cli` or its `agy` command (mimi001234 on Discord). Goose is found by its folder alone, because a `goose` command can be pressly's migration tool. Reasonix also needs the version its command gives (`accept`), because the old npm client is named `reasonix` too. The gateway address and key follow the distro's networking: mirrored or NAT (`place`, `keyAt`). Under NAT the key is the gateway's WSL key (`gateway.WSLKey`, `-<agent>` after it where the agent's key names it), sharing on or off; the gateway listens at that address itself (gateway-routing's WSL under NAT). `ListsFor` keeps a twin's model picks under the Windows twin's id (#927). While Codex on Windows is connected, `ConnectCodexTwins` (run by `SyncCatalog`, [`codex_wsl_auto.go`](../../internal/agent/codex_wsl_auto.go)) connects each running distro's Codex once, because the Codex app's work mode on a WSL project runs its app-server on the distro's `~/.codex`, not Windows': the twin is skipped when it is already connected or disconnected, when its config names a provider or base URL of the user's own, or when the distro is stopped; a mark in the stash (`<id>.autoconnected`) keeps it from being done again after a Disconnect. With Settings' Detect agents in WSL off (`NoWSLAgents`, #1264) magpie starts no wsl.exe at all: `proc.Command`, `CommandContext` and `ProbeContext` refuse one by any name or path with `proc.ErrWSLOff` (`wslOff` in [`proc/wsl.go`](../../internal/proc/wsl.go)), where every command magpie runs is made, so a path past agent's and wslrun's own gates (a request's Claude Code stand-in and classifier, #4872: on a computer without WSL each ask put up Windows' install window) asks nothing either (`TestWSLOffStartsNoWSL`, `TestWSLRunnerRefusedWhenOff`, `TestRunRefusedWhenOff`, `TestWSLStandInAsksNothingWhenOff`). With detection on, the same gate refuses wsl.exe with `proc.ErrNoWSLDistro` while the registry has no distro for the user (`HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss`, a key with a `DistributionName` each, read at every start, so one installed later is listed at once; a read that fails is unknown and wsl.exe is asked as before), and agent's and wslrun's listings take that as none (TraderX219 on X: Windows' own wsl.exe without WSL's package put up its update console every 20 to 30 seconds). A failed run whose output says WSL must be installed or updated (`wsl.exe --update`, the inbox prompt, the optional component missing; `proc.WSLSaid`, told by agent's and wslrun's runners) writes `wsl-update` beside settings.json, and wsl.exe is then refused with `proc.ErrWSLNeedsUpdate` for six hours, by every magpie process, unless WSL's package version or the registered distros change; a refused listing is unknown, so nothing remembered of a distro is forgotten (`TestNoWSLDistroStartsNoWSL`, `TestWSLUpdateBacksOff`, `TestNoWSLDistroRunsNoWSL`, `TestWSLUpdateKeepsDistros`). | [`wsl.go`](../../internal/agent/wsl.go), [`gatewaykey.go`](../../internal/agent/gatewaykey.go), [`proc/wsl.go`](../../internal/proc/wsl.go) |
| WSL folders that are links | Through `\\wsl.localhost` Windows can't follow a link the distro has: with `~/.codex` a link to `/mnt/c/Users/<user>/.codex`, a mkdir of it says it exists and nothing below it can be made, written, read or listed (#4502, linusxiong). The probe asks `readlink -f` there where each agent folder, its `skills` and the folders beside them lead (`wslLinkPaths`, `distro.Links`; a `$HOME` that is itself through a link is left as it was) and which drive each Windows mount is (`distro.Drives`). `distro.open` opens a path at or below a link where it leads: on a Windows drive the drive's own path (`C:\Users\<user>\.codex`), elsewhere in the distro through its root again; `native` spells such a path back through the link for the agent. A link `readlink -f` couldn't resolve is never guessed at: its agent is unreached (`Agent.Unreached`), says why in its notice and refuses each change and sync. Every writer goes through it: the agents' own files (`place.join`, `place.open`), the library's targets (`wslOpen`, a `wsl` problem per agent), RTK (`rtkAt`, `agent.WSLOpen`), the Sessions page's reads (`sessions.WSLHome.Open`) and the Copilot CLI's sign-in (`provider.CopilotWSLDirs`). Links deeper than the probed paths aren't resolved (`TestWSLOpenThroughLinks`, `TestWSLAgentFolderIsALink`, `TestWSLAgentFolderLinkUnresolved`, `TestWSLProbeLinks`, `TestWSLFolderIsALinkToC`, `TestRTKWSLFolderIsALink`). | [`wsl.go`](../../internal/agent/wsl.go), [`targets.go`](../../internal/library/targets.go), [`rtk_wsl.go`](../../internal/library/rtk_wsl.go) |
| WSL CLI versions and updates | A twin's CLI is read and updated in its distro, as the host's is (`cliupdate_wsl.go`; mewcoder on X): the Agents row shows the version, the newest and an Update button for every `cliSpecs` kind a distro has a command for, and Update all takes them in. Where the binary is comes from the probe (`distro.Paths`, else the command asked of the distro's PATH); one `wsl.exe -d <distro> -e sh` script says where its links lead, its `--version` and exit code (`wslCLIScript`, kept ten minutes in `wslProbes`, asked again by Rescan and after an update), with the CLI's own folder, its npm prefix, `~/.local/bin` and `~/.bun/bin` first on PATH, since `wsl.exe -e` has no login PATH and a node CLI would not find node. How it was installed is read from that Linux path by the same rules (`wslHowInstalled`: its own updater via `cliSpec.self`, Homebrew's Cellar, npm, bun or pnpm; volta, yarn and an npm prefix the user can't write, `/usr/lib`, are left alone), and the update runs in the distro through wsl.exe (`wslRunUpdate`) with a Linux brew asked for its newest in the distro too. A distro that isn't running is never started to be asked: its rows show no version and an update says to start it. Not carried over: the host's proxy settings (the distro has its own network), and Grok Build's newest is read from this computer's channel setting. Kinds with no command of their own (Goose, mu) show nothing, as on the host. | [`cliupdate_wsl.go`](../../internal/agent/cliupdate_wsl.go), [`cliupdate.go`](../../internal/agent/cliupdate.go) |
| Settings tuned from use | Usage › Context's "Tuned for you" advises, per agent, the settings that would have spent the fewest tokens on the user's own calls of the range, and puts one in on a click. Package `tune` replays the calls `sessions.Calls` reads from the agents' session files under each candidate value (`Compact`, `CacheTTL`), each model's tokens weighed at what magpie bills them where the agent asked for a model magpie wrote (a provider/model id resolves as the gateway resolves it and is weighed at that provider's price, `pricedWeights`, so a Claude model on Copilot has its 1-hour cache write at the 5-minute one Copilot bills, #3435), else at its maker's list ratios (`tune.WeightsFor`); `tuneOf` picks the agents and models (Claude Code per model, Codex pooled). `TuneRead`, `TuneApply` and `TuneUndo` know where each setting lives: Claude Code's `modelSettings.<model>.autoCompactWindow` (where its `/autocompact` saves), `promptCacheTtl` and `subagentPromptCacheTtl` in `~/.claude/settings.json`. Where Codex compacts, and Claude Code wherever magpie's own window is what it runs at, is one value with Long conversations in the agents' settings sheet (`settings.CompactAt`/`FullContext`, source `long`; 7eleven on Discord): the card reads it, Use sets it through `provider.SetCompactAt`, and Sync writes it into each agent's config as it does for the sheet; the note says it is Long conversations, shared by Codex and Claude Code (`compact-one-value.test.cjs`). The advice is weighed by tokens alone: it is labelled "Fewest tokens", and a compaction window it would change says it doesn't measure how well the agent keeps the task after a compaction, and that a lower window compacts more often (#1854, `context-tune.test.cjs`). A compaction row's "Other window…" opens the app menu with every value of the curve, each with its estimated tokens against the setting now (fewer or more, the setting itself marked "Your setting now", hayden4608 on Discord), "Fewest tokens" beside the leanest, and about how many compactions it would have made (`Point.compacts`, from the same replay), and puts the one picked in like Use (#1860). An agent whose files time its compactions also has their wait weighed (HirotaNagai on X): Claude Code's `compact_boundary` line says `compactMetadata.durationMs`, which `sessions` puts on the first call after it, and Codex compacts by a call of its own (the record a `compacted` line names, in rollouts since 2026-09), whose time is the compaction's (`Call.Compact`; an older rollout's compaction has no call and stays untimed). With 3 or more timed for a model (`minTimed`), `Facts.took` is their median seconds, each window says its wait (`Point.wait`, its compactions × `took`), and the row says what a compaction took, the wait at the advice against the window now, and the cheaper window the advice passed over for waiting longer (`Compaction.cheapest`, `wait_cheapest`) when it saves 3% or more; the advice is labelled "Tokens + wait", its caveat says tokens and waiting only, and the picker says each window's wait with "Fewest tokens" on the cheapest (`context-tune.test.cjs`). An agent or model with fewer timed reads and is advised as before. | [`internal/tune`](../../internal/tune/tune.go), [`tune.go`](../../internal/agent/tune.go), [`internal/gui/tune.go`](../../internal/gui/tune.go) |
+79
View File
@@ -0,0 +1,79 @@
package agent
import (
"path/filepath"
"strings"
"github.com/yetone/magpie/internal/edit"
)
// codexTwinAutoKey, after a twin's id, marks in the stash that magpie
// connected it once from Windows' Codex being connected (or found it
// connected or disconnected already): it is never done again, so a Disconnect
// or a change the user makes in the distro stands.
const codexTwinAutoKey = ".autoconnected"
// ConnectCodexTwins connects Codex in each running WSL distro when Codex on
// Windows is connected. The Codex app's work mode on a project whose run
// environment is WSL starts its app-server inside the distro, on the
// distro's ~/.codex, not Windows' (the app resolves CODEX_HOME there with
// `bash -lc 'printf %s "${CODEX_HOME:-$HOME/.codex}"'`): a Codex connected
// only on Windows listed OpenAI's models alone there (@not_4O4 on X).
//
// It runs once per distro, and not at all for one the user disconnected, one
// not running (asking a stopped distro starts it), one whose config names a
// provider or base URL that isn't magpie's, or while Windows' Codex isn't
// connected. Off Windows there are no distros and nothing happens.
func ConnectCodexTwins() {
if !wslLooks() {
return
}
var win *Agent
for _, a := range All() {
if a.ID == "codex" {
win = a
break
}
}
if win == nil || !win.Wired() {
return
}
for _, d := range wslDistros() {
k := wslKindOf("codex")
if !d.Running || !k.found(d) {
continue
}
a := wslAgent(k, d)
mark := a.ID + codexTwinAutoKey
if stashLoad()[mark] == "1" {
continue
}
if a.Disconnected() || a.Wired() {
stash(map[string]string{mark: "1"})
continue
}
if codexTwinHasOwn(d.place(a.ID)) {
continue
}
if _, err := a.ConnectHow(); err != nil {
// no model to connect to yet, or a file that can't be written
// now: tried again at the next sync
continue
}
stash(map[string]string{mark: "1"})
}
}
// codexTwinHasOwn is whether the distro's Codex config names a provider or a
// base URL that isn't magpie's: the user's own, which magpie doesn't take
// over without being asked.
func codexTwinHasOwn(at place) bool {
path := filepath.Join(at.codexHome(), "config.toml")
if p, _ := edit.GetTOMLTop(path, "model_provider"); p != "" && p != magpieID {
return true
}
if u, _ := edit.GetTOMLTop(path, "openai_base_url"); u != "" && !strings.Contains(u, "/backend-api/codex") {
return true
}
return false
}
+94
View File
@@ -0,0 +1,94 @@
package agent
import (
"os"
"path/filepath"
"strings"
"testing"
)
// The Codex app's work mode on a WSL project runs its app-server on the
// distro's ~/.codex: Codex connected on Windows connects the running
// distro's Codex too, once (@not_4O4 on X).
func TestConnectCodexTwins(t *testing.T) {
_, _ = codexHome(t, "", "")
root := t.TempDir()
cfgPath := filepath.Join(root, "home", "me", ".codex", "config.toml")
if err := os.MkdirAll(filepath.Dir(cfgPath), 0o755); err != nil {
t.Fatal(err)
}
undo := FakeWSL(map[string]string{"Ubuntu": "home:/home/me\ndir:.codex\n"}, map[string]string{"Ubuntu": root})
defer undo()
read := func() string { b, _ := os.ReadFile(cfgPath); return string(b) }
win := func() *Agent {
for _, a := range All() {
if a.ID == "codex" {
return a
}
}
t.Fatal("no codex")
return nil
}
// Windows' Codex not connected: the distro's is left alone
ConnectCodexTwins()
if strings.Contains(read(), "magpie") {
t.Fatalf("connected before Windows' Codex:\n%s", read())
}
if err := win().Fields[0].Set("fake/m1"); err != nil {
t.Fatal(err)
}
ConnectCodexTwins()
if cfg := read(); !strings.Contains(cfg, `model_provider = "magpie"`) || !strings.Contains(cfg, "magpie-models.json") {
t.Fatalf("distro's Codex not connected:\n%s", cfg)
}
if _, err := os.Stat(filepath.Join(filepath.Dir(cfgPath), "magpie-models.json")); err != nil {
t.Fatal(err)
}
// the user disconnects it: it stays so
var tw *Agent
for _, a := range All() {
if a.ID == "codex@wsl:Ubuntu" {
tw = a
}
}
if tw == nil {
t.Fatal("no twin")
}
if err := tw.Disconnect(); err != nil {
t.Fatal(err)
}
ConnectCodexTwins()
if strings.Contains(read(), `model_provider = "magpie"`) {
t.Fatalf("connected again after Disconnect:\n%s", read())
}
}
// A distro's Codex on a provider of the user's own is not taken over.
func TestConnectCodexTwinsKeepsOwnProvider(t *testing.T) {
_, _ = codexHome(t, "", "")
root := t.TempDir()
cfgPath := filepath.Join(root, "home", "me", ".codex", "config.toml")
if err := os.MkdirAll(filepath.Dir(cfgPath), 0o755); err != nil {
t.Fatal(err)
}
own := "model_provider = \"mine\"\n[model_providers.mine]\nbase_url = \"https://x.example/v1\"\n"
if err := os.WriteFile(cfgPath, []byte(own), 0o644); err != nil {
t.Fatal(err)
}
undo := FakeWSL(map[string]string{"Ubuntu": "home:/home/me\ndir:.codex\n"}, map[string]string{"Ubuntu": root})
defer undo()
for _, a := range All() {
if a.ID == "codex" {
if err := a.Fields[0].Set("fake/m1"); err != nil {
t.Fatal(err)
}
}
}
ConnectCodexTwins()
if b, _ := os.ReadFile(cfgPath); string(b) != own {
t.Fatalf("changed:\n%s", b)
}
}
+1
View File
@@ -45,6 +45,7 @@ func SyncCatalog() {
for {
// the catalog built once for every agent's lists, not for each
// look-up of each (thousands at magpie's start, with 30 providers)
ConnectCodexTwins()
release := provider.Hold()
// and each agent's files looked at once a round, not each time
// one is asked about (#1665: settings.json hundreds of times a