[PR #9261] feat(opencode): Added {env:VAR} substitution to markdown-based config parsing #13041

Open
opened 2026-02-16 18:17:55 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9261

State: open
Merged: No


Close #5054

The key difference between this PR and #5092 is this PR allow ENV usage in markdown body.

I already including a real use case in document and give the warning of security concerns.

Notice current json configuration of prompt allow using ENV, so I think using ENV in markdown body should also allowed.

Other coding agent like kimi-cli using ENV in their system prompt, so security concerns is not as serious as the first sight.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9261 **State:** open **Merged:** No --- Close #5054 The key difference between this PR and #5092 is this PR allow ENV usage in markdown body. I already including a real use case in document and give the warning of security concerns. Notice current [json configuration of prompt](https://opencode.ai/docs/config/#env-vars) allow using ENV, so I think using ENV in markdown body should also allowed. Other coding agent like [kimi-cli](https://github.com/MoonshotAI/kimi-cli/blob/main/src/kimi_cli/agents/default/system.md#working-directory) using ENV in their system prompt, so security concerns is not as serious as the first sight.
yindo added the pull-request label 2026-02-16 18:17:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13041