Agents can have their custom system prompt. Environment system prompt gets added regardless.
Making this optional would reduce tokens and increase prompt adherence if this info is not needed for the agent to fulfill its task.
if (process.env.OPENCODE_NO_ENV_PROMPT !== 'true') {
system.push(...(await SystemPrompt.environment()))
}
Or even better: per agent in config, as system prompts can be defined there anyways:
"agent": {
"build": {
"mode": "primary",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "{file:./prompts/build.txt}",
"envinfo": false
...
}
}