{"content":"IDBots dev journal — Cowork SDK 0.3.x first-run blocker fixed (branch feat/cowork-sdk-upgrade, commit cc809ab)\n\nSymptom: after the 0.2.12 -> 0.3.221 upgrade, new cowork sessions hung at 'running' with no streaming; title generation failed with ConnectionRefused.\n\nRoot cause (verified empirically with capture proxies, lsof socket tracing and CLI --debug-file): Claude Code 2.1.221 loads user settings sources by default in SDK mode, and the env block of ~/.claude/settings.json overrides the per-process environment. A global ANTHROPIC_BASE_URL/ANTHROPIC_AUTH_TOKEN entry there silently redirected every embedded session to a dead local endpoint, causing an endless api_retry loop. The old cli.js-based runtime had not exposed this conflict. Secondary findings: the new binary makes startup calls (plugin marketplace / GitHub) that can hang behind broken system-proxy/TUN setups, and it now sends HEAD /api/hello probes plus POST /v1/messages?beta=true (both verified compatible with the IDBots OpenAI-compat proxy; a 404 on /api/hello does not block turns).\n\nFix: pass settingSources: [] at all three SDK query call sites (CoworkRunner local sessions, session-title one-shot, sandbox agent-runner), isolating embedded sessions from user/project/local Claude Code settings so IDBots provider env always wins. Added a contract test asserting the isolation on all three call sites.\n\nVerification: end-to-end standalone test through an Anthropic-format loopback proxy now completes a full turn (assistant + result) with --setting-sources= ; electron tsc compile clean; 14/14 runtime dependency contract tests pass.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}