From 29c9834ef31a50754ea775ee7b99287e39237502 Mon Sep 17 00:00:00 2001 From: "developing-today[bot]" <5454422+developing-today[bot]@users.noreply.github.com> Date: Thu, 5 Nov 2026 03:56:49 -0600 Subject: [PATCH] quota: default OPENCODE_CONFIG_PATH for subcommand execs (standing runtime config) --- pm-stack/aggregator/scripts/gather-quota.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pm-stack/aggregator/scripts/gather-quota.ts b/pm-stack/aggregator/scripts/gather-quota.ts index 558f11d0a4..69a514849a 100755 --- a/pm-stack/aggregator/scripts/gather-quota.ts +++ b/pm-stack/aggregator/scripts/gather-quota.ts @@ -407,7 +407,18 @@ function execSubcommand(argv: string[]): Promise { { maxBuffer: 64 * 1024 * 1024, timeout: subcommandTimeoutMs, - env: process.env, + env: { + ...process.env, + // The standing runtime config is the CLI's fast, + // deterministic config resolution. Interactive shells on + // this host carry OPENCODE_CONFIG_PATH; the systemd unit + // does not, and without it the CLI's default discovery + // takes minutes (project scan) — the first production + // ticks died on exactly that (opencode#1729). Respect an + // explicitly set value; otherwise name the standing file. + OPENCODE_CONFIG_PATH: + process.env.OPENCODE_CONFIG_PATH ?? join(HOME, ".local/state/opencode/opencode-runtime.jsonc"), + }, // Neutral cwd (the state dir): quota is a machine-level read, // not a project read. From the aggregator's repo cwd the CLI // does project discovery over the code repo's worktrees —