[FEATURE] API for managing environment secrets (RemoteTrigger/environments)

Resolved 💬 2 comments Opened Mar 27, 2026 by TweedBeetle Closed Apr 26, 2026

Problem

When creating remote triggers via the RemoteTrigger tool (or API), there's no way to programmatically set environment secrets on the target environment. Secrets must be configured manually through the claude.ai web UI at /code/environments.

This breaks the workflow for Claude Code sessions that want to set up end-to-end automated triggers. For example, setting up a daily monitoring trigger with Pushover notifications requires:

  1. Create the trigger (API - works)
  2. Add Pushover API keys as env secrets (web UI - manual step)

Step 2 can't be automated, forcing the user out of their terminal workflow.

Proposed Solution

Add environment management endpoints, at minimum:

  • GET /v1/code/environments - list environments
  • GET /v1/code/environments/{id} - get environment details
  • POST /v1/code/environments/{id}/secrets - set a secret (name + value)
  • DELETE /v1/code/environments/{id}/secrets/{name} - remove a secret

Expose these through the RemoteTrigger tool (or a new RemoteEnvironment tool) so Claude Code can manage secrets in-session.

Use Case

Setting up a daily GitHub issue watcher that sends Pushover notifications when tracked issues change. The trigger creation works via API, but the Pushover credentials need manual web UI configuration. With this feature, the entire setup would be automatable from a single Claude Code session.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗