Skip to content

Prevent repository OpenCode config from breaking planning #9209

Closed

Description

@forestileao

Problem

OpenRouter planning fails when the checked-out repository contains an OpenCode V2 configuration.

The runner reports this error:

Configuration is invalid at /home/ubuntu/repo/opencode.json
V2 permissions are not supported by OpenCode V1.

SuperPlane installs opencode-ai@1.18.31, which uses OpenCode V1 configuration rules.

The repository configuration uses V2 fields such as:

  • permissions
  • agents.triaging.permissions

SuperPlane writes a separate V1 configuration to $SUPERPLANE_TASK_DIR/opencode.json. It sets this path through OPENCODE_CONFIG.

However, OpenCode merges configuration files. It loads the SuperPlane configuration and then loads opencode.json from the project directory.

The project configuration fails validation before OpenCode sends a request to the OpenRouter model.

Codex does not have this problem. The Codex runner starts the Codex CLI directly and does not read opencode.json.

Goal

Prevent repository OpenCode configuration from breaking SuperPlane-managed OpenRouter planning.

The OpenRouter runner must use a predictable configuration for all repositories.

Scope

Review these files:

  • pkg/components/runner/openrouter/run.js
  • pkg/components/runner/openrouter/run_test.go
  • pkg/components/runner/codex/run.js
  • release/runner/Dockerfile

Determine how to isolate the SuperPlane configuration from incompatible project configuration.

Preserve repository instructions and skills that SuperPlane supports independently.

Do not change the Codex execution path.

Acceptance criteria

  • OpenRouter planning succeeds when the repository contains a V2 opencode.json.
  • OpenRouter planning still succeeds when the repository contains no OpenCode configuration.
  • SuperPlane continues to apply its generated permission and provider settings.
  • The runner does not load incompatible project permission fields.
  • Tests cover a repository with permissions and agents.<name>.permissions.
  • Tests confirm that OPENCODE_CONFIG still points to the SuperPlane-generated configuration.
  • The runner log identifies configuration failures clearly if the managed configuration is invalid.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions