mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
Two related fixes for OpenCode agent runner in headless mode: 1. Strip OPENCODE, OPENCODE_PID, OPENCODE_RUN_ID, OPENCODE_SERVER_PASSWORD from the child env before spawning opencode CLI. Inheriting these from a parent OpenCode session causes `opencode run` to fail with "Session not found" in non-attached headless mode. 2. Inject per-run `permission.external_directory` allowlist rules into OPENCODE_CONFIG_CONTENT for the managed project cwd and staged extra directories. Without these, opencode auto-rejects absolute project paths with "external_directory" in headless runs.