Skip to content

Handle legacy OpenCode subagent manifests without general_agent #542

Description

@chubes4

Problem

upgrade.sh can fail after applying managed files when lib/project-opencode-subagents.py reads a previously persisted manifest created before the general_agent field existed. The missing key is accessed directly as previous["general_agent"], producing:

KeyError: general_agent
OpenCode subagent projection failed (projector)

The upgrade had already synchronized the Homeboy worktree adapter and other managed runtime files, leaving a partial upgrade that cannot reach its normal verification/restart summary.

Expected

Manifest reads should normalize absent optional fields to their current defaults before ownership comparison. Add a deterministic migration fixture for a valid legacy manifest without general_agent, proving the upgrade completes without overwriting user-owned agent.general.

Reproduction

Run ./upgrade.sh --wp-path <local-studio-site> against an install whose existing projector manifest predates general_agent.

AI assistance

OpenAI GPT-5.6 Sol via OpenCode ran the merged upgrade, captured the exact traceback, and traced the direct legacy-manifest key access. Chris Huber directed the control-plane recovery and remains responsible for this report.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions