Skip to content

Secrets UX: secrets set rejects multi-agent projects even with --agent; .env.local sync stuck on "restart dev to approve it" #635

Description

@UtpalJayNadiger

Versions: @opencomputer/cli 0.5.1, @opencomputer/agent 0.4.1.

Two related problems hit while setting a first secret (GITHUB_TOKEN):

1. secrets set unusable while the project has more than one agent

$ opencomputer secrets set GITHUB_TOKEN --environment development
opencomputer: This project has multiple agents. Select an agent when starting dev mode.

$ opencomputer secrets set GITHUB_TOKEN --environment development --agent <agent-id>
opencomputer: This project has multiple agents. Select an agent when starting dev mode.

Passing --agent explicitly makes no difference, and opencomputer dev has no agent-selection flag (usage shows only --project/--create-project), so the suggested remedy doesn't exist. Only after deleting the second agent from project.ts did secrets set succeed. Setting a project-level secret arguably shouldn't require agent selection at all.

2. .env.local sync never gets approved

With a declared defineConnection() referencing useSecret("GITHUB_TOKEN") and the value present in opencomputer/.env.local, every dev run prints:

Development secret sync skipped. Use `opencomputer secrets set` or restart dev to approve it.

Restarting dev (the message's own suggestion) prints the same message again — there is no prompt and no way to approve. The only working path was secrets set (after working around problem 1).

🤖 Filed with Claude Code

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