claude-code - 💡(How to fix) Fix [Feature Request] Encrypted secrets store for scheduled triggers [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51854Fetched 2026-04-23 07:43:09
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Fix Action

Fix / Workaround

Current workaround

Code Example

{
  "secrets": {
    "MY_API_KEY": "encrypted-value",
    "MY_TOKEN": "encrypted-value"
  }
}
RAW_BUFFERClick to expand / collapse

Problem

Scheduled triggers (RemoteTrigger / claude.ai/code/scheduled) have no way to securely store secrets. The only option today is embedding API keys directly in the trigger prompt as plaintext.

This means:

  • API keys, private keys, and tokens are stored in the prompt text visible to anyone with account access
  • Keys appear in trigger run history
  • No way to rotate a secret without editing every trigger prompt that uses it
  • No masking in logs or output

This is a basic capability that every CI/CD platform (GitHub Actions, Vercel, Railway, Render) has had for years.

Real-world impact

Any pipeline that integrates with external APIs (SaaS tools, databases, notification services, third-party platforms) needs to store credentials. Currently the only option is pasting them into the prompt. For keys that control sensitive services, this is unacceptable.

Proposed solution

Add an encrypted secrets store to cloud environments (environment_id). Triggers running in that environment can access secrets as environment variables.

Option A: Environment-level secrets

{
  "secrets": {
    "MY_API_KEY": "encrypted-value",
    "MY_TOKEN": "encrypted-value"
  }
}

Accessible as env vars inside the trigger container.

Option B: Template syntax in prompts

${{secrets.MY_API_KEY}} in the prompt, resolved server-side at runtime, never exposed in the trigger config or logs.

Requirements

  • Secrets encrypted at rest
  • Not readable after creation (write-only, like GitHub Actions secrets)
  • Masked in trigger run logs
  • Accessible as environment variables inside the trigger container
  • Manageable via API and UI (claude.ai/code/scheduled)
  • Scoped per environment so multiple triggers can share secrets

Current workaround

Embedding keys directly in the trigger prompt text.

extent analysis

TL;DR

Implementing an encrypted secrets store for cloud environments, accessible as environment variables, is the most likely fix to securely store secrets for scheduled triggers.

Guidance

  • Consider implementing Option A: Environment-level secrets, where secrets are stored in an encrypted format and accessible as environment variables inside the trigger container.
  • Evaluate Option B: Template syntax in prompts, which resolves secrets server-side at runtime, to prevent exposure in trigger config or logs.
  • To verify the effectiveness of the proposed solution, test the storage and retrieval of secrets in a controlled environment, ensuring they are encrypted at rest and masked in trigger run logs.
  • Assess the manageability of secrets via API and UI, ensuring they are scoped per environment to allow multiple triggers to share secrets.

Example

{
  "secrets": {
    "MY_API_KEY": "encrypted-value",
    "MY_TOKEN": "encrypted-value"
  }
}

This example illustrates how secrets can be stored in an encrypted format, accessible as environment variables inside the trigger container.

Notes

The proposed solution requires careful consideration of encryption, access control, and logging to ensure the secure storage and management of secrets. The current workaround of embedding keys directly in the trigger prompt text is insecure and should be replaced with a more robust solution.

Recommendation

Apply a workaround by implementing an encrypted secrets store, such as Option A or Option B, to securely store secrets for scheduled triggers, as this addresses the current security concerns and provides a more robust solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Feature Request] Encrypted secrets store for scheduled triggers [1 participants]