You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Set universal AI_AGENT marker for subprocesses #40441
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Set AI_AGENT=opencode in the environment inherited by subprocesses and tools started during an OpenCode session. If a caller already provides a non-empty AI_AGENT, preserve it so wrappers can identify themselves.
AI_AGENT is a universal marker used across coding agents. It gives downstream CLIs one stable signal for agent-friendly behavior—such as disabling prompts and pagers or choosing machine-readable output—without maintaining product-specific heuristics. OpenCode-specific environment variables can continue serving their existing purposes; this marker complements rather than replaces them.
The value should be advisory only: not telemetry, authentication, authorization, sandboxing, or a trust boundary. The proposed slug follows the standard's lowercase hyphen naming: opencode.
Closing as a duplicate of #34065. I added the universal AI_AGENT=opencode naming, wrapper-preservation behavior, and advisory-only boundary to the existing design thread.
Activity
complynx commentedon Aug 4, 2026
Closing as a duplicate of #34065. I added the universal
AI_AGENT=opencodenaming, wrapper-preservation behavior, and advisory-only boundary to the existing design thread.