Repository navigation
In review
Labels
bugSomething isn't working
Description
Qoderian version
Qoderian 1.0.19 (latest release)
qodercli version
- qodercli 1.1.97
Obsidian and operating system
- Obsidian desktop, Windows 11 - Another installed plugin: Copilot 4.0.20 (bundles Claude Agent SDK 0.3.306), loaded a few seconds after Qoderian by lazy-plugins
Reproduction steps
2.3 Steps to reproduce
- Install Qoderian and Copilot in the same vault, with Copilot loading after Qoderian.
- Start Obsidian and wait until Qoderian has initialized its daemon.
- Trigger a Claude agent query in Copilot (it runs
process.env.CLAUDE_AGENT_SDK_VERSION = "0.3.306"). - Open a new Qoderian tab.
2.4 Actual behavior
The new tab shows the error above. ~/.qoder/logs/sdk-daemon-*.log records:
[GlobalDaemon] init rejected: configuration conflict with the ready daemon
2.5 Expected behavior
A variable written to process.env by an unrelated plugin should not prevent Qoderian from reusing its daemon.
2.6 Diagnosis
buildDaemonLaunchOptions()spreads the wholeprocess.envintoenv.- The SDK's global daemon compares the stored options with the incoming ones.
envis compared over the union of keys, so a key that appears later counts as a conflict. - I instrumented the comparison and logged the diff on every conflict (7 conflicts, all identical). Every other field matched (
auth,launchMode,pathToQoderCLIExecutable,executable,executableArgs,proxy,noProxy,vpcEndpoint).envdiffered in exactly one key:
{"key":"CLAUDE_AGENT_SDK_VERSION","stored":null,"incoming":"0.3.306"}- The value
0.3.306only exists in Copilot'smain.js, inside its bundled Claude Agent SDKquery()function. - Timeline from the logs:
19:58:53 [DaemonLaunch] command=...\qodercli\qodercli.exe
19:59:00 [GlobalDaemon] init rejected: configuration conflict with an in-flight initialization
19:59:07 [GlobalDaemon] init rejected: configuration conflict with an in-flight initialization
19:59:08 [GlobalDaemon] daemon ready
19:59:38 [GlobalDaemon] init rejected: configuration conflict with the ready daemon
2.7 Suggested fix
- Do not compare the full
process.env. Compare only the keys Qoderian sets itself (PATH,QODER_SDK_CUSTOM_BASE_URL_BYOK,QODER_INTEGRATION_ID), or buildenvfrom a snapshot that excludes variables added later by other code in the renderer. - Alternatively, when the only differences are unrelated env keys, restart the daemon instead of rejecting.
- It would also help if the error message listed the differing keys. I had to patch
main.jslocally to find out which field was conflicting.
Expected behavior
- Do not compare the full
process.env. Compare only the keys Qoderian sets itself (PATH,QODER_SDK_CUSTOM_BASE_URL_BYOK,QODER_INTEGRATION_ID), or buildenvfrom a snapshot that excludes variables added later by other code in the renderer. - Alternatively, when the only differences are unrelated env keys, restart the daemon instead of rejecting.
- It would also help if the error message listed the differing keys. I had to patch
main.jslocally to find out which field was conflicting.
Actual behavior
2.8 Workaround
I patched the env comparison in main.js to ignore CLAUDE_AGENT_SDK_VERSION, and disabled Copilot at the same time. New tabs work after that. I did not test the two changes separately.
Claudian has the same pattern (it writes CLAUDE_AGENT_SDK_VERSION from its bundled SDK), so it is likely to trigger the same conflict.
Redacted logs or screenshots
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
sorrycc commentedon Nov 25, 2026
Thanks for the detailed diagnosis, it was spot on.
Reproduced against the real SDK (1.0.58) with a dummy CLI:
initDaemon(opts), thenprocess.env.CLAUDE_AGENT_SDK_VERSION = '0.3.306', theninitDaemon(opts)again →DaemonConfigurationConflictError: Global daemon is already initialized with different options. Without the env write, the second call joins the first initialization.Fix in #102:
buildDaemonLaunchOptions()now uses a copy ofprocess.envtaken the first time it runs, not the live object. Keys that other plugins add later no longer change the daemon options. There's a regression test for it. This issue will close when the PR merges.Listing the differing keys in the conflict error would need an SDK change, so that isn't in this PR.