Skip to content

Add support for loading environment variables from process.env (OS environment) #5902

@albertedwardson

Description

@albertedwardson

Validations

  • I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • I'm not able to find an open issue that requests the same enhancement

Problem

Currently, when ${{ secrets.some_env_var }} is used in config.yaml, the Continue extension only checks:

  • .continue/.env
  • Workspace .env files
  • User account secrets (via Continue’s API)

However, it does not check the system’s environment variables (process.env). This is problematic because:

  • Security policies (e.g., corporate environments) may block external API calls to Continue’s secrets service.
  • DevOps workflows often rely on OS-level env vars (e.g., CI/CD, Docker, VS Code tasks).
  • Local development becomes harder when forced to duplicate vars in .env files.

Impact:

  • Blocks enterprise adoption (IT policies forbid API secrets). (my case btw)
  • Forces redundant configs (e.g., duplicating OPENAI_API_KEY in .env).
  • Breaks standard 12-factor app practices (config via env vars).

Solution

Add fallback support for process.env when resolving ${{ secrets.var_name }}. For example:

  • Check .env files (current behavior).
  • Check account secrets (current behavior).
  • New: Fall back to process.env if not found elsewhere or request failed.

This maintains backward compatibility while adding flexibility for secure/local workflows.

Workaround (for now):

Users must manually sync env vars to .env files or use config.ts with process.env hacks (which is brittle, and I am currently doing that).

Metadata

Metadata

Assignees

Labels

area:configurationRelates to configuration optionskind:enhancementIndicates a new feature request, imrovement, or extensionreleased

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions