Unverified50% confidenceFactExact time
The OpenCode migration table maps v1's shell.env hook to v2's ctx.shell.hook("create.before", ...), which can be used to inject variables into the command environment, but throwing an error will likewise fail the command.
1
Sources
50%
Confidence
Medium-term (~90 days)
Relevance
10/13/2026
First Seen
Valid until: 1/11/2027
Sources
Related Entities
Related Claims
UnverifiedIn the OpenCode official documentation, both the .env protection example and the company.guard example register an execute.before hook only for the read tool, and do not intercept the behavior of reading files via shell commands (such as cat).67% similarUnverifiedAfter modifying the .env file, the terminal must be restarted for the new configuration to take effect, because most shells read environment configuration only once at startup.67% similarUnverifiedWhen a coding agent's hook crashes, times out, or points to a nonexistent script, most tools by default choose to let it pass (fail-open).62% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1017661API
curl https://kongchang.com/api/v1/knowledge/claims/1017661MCP
get_claim(id=1017661)