The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 09:00 UTC
fix(server): run OpenCode CLI commands sequentially (#10427)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Theo Browne committed
Sep 6, 2026 at 17:02 UTC
9ab0635db6abb1abf15e664141a0f8b6f0c33eae
1 file changed
+4
-3
apps/server/src/provider/opencodeRuntime.ts
+4
-3
@@ -945,10 +945,11 @@ const makeOpenCodeRuntime = Effect.gen(function* () {
945
...commandContext,
946
}).pipe(Effect.exit);
947
948
- // First attempt — run all inventory commands in parallel.
948
+ // Every OpenCode CLI command opens the same shared SQLite database. Running them
949
+ // concurrently causes "database is locked" failures, so run them one at a time.
950
const [initialModelsResult, initialAgentsResult, initialSkillsResult] = yield* Effect.all(
951
[runModelsCli(), runAgentsCli(), runSkillsCli()],
951
- { concurrency: "unbounded" },
952
+ { concurrency: 1 },
953
);
954
let modelsResult = initialModelsResult;
955
let agentsResult = initialAgentsResult;
@@ -966,7 +967,7 @@ const makeOpenCodeRuntime = Effect.gen(function* () {
967
needsAgentsRetry ? runAgentsCli() : Effect.succeed(agentsResult),
968
needsSkillsRetry ? runSkillsCli() : Effect.succeed(skillsResult),
969
],
969
- { concurrency: "unbounded" },
970
+ { concurrency: 1 },
971
);
972
modelsResult = m2;
973
agentsResult = a2;