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
Inject OPENCODE_SESSION_ID into shell command environment #12158
There’s no consistent way for shell commands executed by OpenCode to know which session they belong to.
Proposed change
Inject OPENCODE_SESSION_ID into the environment of shell commands executed by OpenCode:
Bash tool execution
User-run command path in session prompt
Expected behavior
Commands can access the current session id via OPENCODE_SESSION_ID.
Why this is useful
This is especially important for skills. Skills often orchestrate shell tools and external scripts; having a session-scoped env var makes it possible to tag logs/artifacts and keep skill-side output correlated with the active OpenCode session.
Notes
This does not change PTY terminals or other spawned processes unless explicitly extended later.
Activity
LandonSchropp commentedon May 14, 2026
@jakvbs This was closed as completed, but I don't see an equivalent to
OPENCODE_SESSION_IDanywhere. Do you know if this landed in some other form?fix: resolve harness labels via ancestry and render explicit session …