Skip to content

feat(plugin): pass sessionID and callID to shell.env hook input#13662

Merged
rekram1-node merged 1 commit intoanomalyco:devfrom
tesdal:feat/shell-env-identity
Feb 18, 2026
Merged

feat(plugin): pass sessionID and callID to shell.env hook input#13662
rekram1-node merged 1 commit intoanomalyco:devfrom
tesdal:feat/shell-env-identity

Conversation

@tesdal
Copy link
Copy Markdown
Contributor

@tesdal tesdal commented Feb 15, 2026

Fixes #13661

What does this PR do?

Adds optional sessionID and callID fields to the shell.env hook input, for symmetry with other events + state correlation when using concurrent subagents.

The fields are optional because pty/index.ts has no session context. bash.ts and prompt.ts already have both values in scope -- just passing them through.

How did you verify your code works?

  • Confirmed ctx.sessionID and ctx.callID are in scope at bash.ts:166
  • Confirmed input.sessionID and part.callID are in scope at prompt.ts:1625
  • pty/index.ts unchanged -- fields are optional, undefined is correct there
  • Existing plugins unaffected -- new fields are additive on the input object
  • Logged from plugin
    {"type":"debug","timestamp":"2026-02-15T00:03:14.492Z","level":"debug","message":"[shell.env] cwd=opencode sessionID=ses_3a1643f0dffeF2LkERFvZ6xOMw callID=toolu_vrtx_012mf7oncgJQaP6qf13pEGGg"}

@rekram1-node rekram1-node merged commit 1aa18c6 into anomalyco:dev Feb 18, 2026
9 checks passed
jonathanmiddleton pushed a commit to jonathanmiddleton/opencode that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Pass sessionID and callID to shell.env hook input

2 participants