Skip to content

fix(api): preserve or resolve environment when updating agent config #14

Description

@KurosawaGeeker

Area

API

Summary

Updating an Agent prompt without providing environmentId can fail because the update behaves like a full replacement instead of preserving or resolving the current environment.

Steps to reproduce

  1. Update an Agent prompt through the API/CLI without including environmentId.

  2. Observe the error:

    Selected Environment is not available to the agent owner
    

Expected behavior

Automation should be able to update prompt-like fields without having to re-specify unchanged environment state. The API or CLI should preserve the current environment, resolve it when omitted, or return an actionable next step for invalid environment state.

Actual behavior

The update path can reject the request with an environment ownership/availability error, even when the user intent is only to patch prompt/config content.

Evidence

Found during dogfood while updating an Agent prompt.

Environment

Mosoo Agent config update flow through CLI/API.

Contribution

I can test a fix

Checklist

  • I searched existing issues before opening this report.
  • I included a reproducible path or explained why I cannot reproduce it locally.
  • I removed or redacted secrets from logs, screenshots, and config.

Metadata

Metadata

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