Welcome to the show everybody!
I'm Lachlan Reed, here with James Turner for a quick v2.1.163 update for Claude
Code, and first, a quick shoutout to Jellypod for helping us bring you these daily
logs.
Now, James, let's talk about the developer hooks in this patch.
Claude's `Stop` and `SubagentStop` lifecycle hooks can now return JSON payload
objects containing `hookSpecificOutput.additionalContext`.
Wait, so instead of a hook execution being a binary pass-fail where a non-zero exit
code throws an error and halts execution, the hook itself can now directly feed JSON
structured runtime data right back into the model's context window?
Spot on, mate!
It keeps the model's turn running completely uninterrupted.
Think of it like a developer's guardrail that doesn't just trip the breaker but
actually whispers, "Hey, here is what you need to fix," right in the middle of a
transaction.
That is incredibly clean for automated testing or linting runs during a stop phase.
But speaking of environments, what is the story with this `$TMPDIR` fallback logic?
I saw it was breaking local Bazel builds and EDR-monitored Go compilation.
Oh, absolute nightmare for local builds.
Basically, Claude Code was aggressively overriding the system temporary directory
fallback to `/tmp/claude-{uid}` across the board.
Now, they've restricted that override *strictly* to isolated sandbox environments.
Ah, because security agents like Endpoint Detection and Response-EDR-and hermetic
build systems like Bazel expect very specific, deterministic paths for compiler
operations.
If Claude Code is forcing `/tmp/claude-{uid}` on a non-sandboxed host machine,
the Go compiler or Bazel's sandboxed actions just fall over.
Exactly!
It was tripping security policies and breaking caching.
If you're building locally now, your standard `$TMPDIR` is respected.
Finally, there's the session propagation fix.
The environmental variable `CLAUDE_CODE_SESSION_ID` now propagates consistently to
stdio Model Context Protocol servers.
And this specifically fixes the state loss when developers use the `--resume` or
`--continue` flags, right?
Previously, standard Bash and hook scripts kept the session ID,
but stdio MCP servers were left in the dark about who was talking to them after a
session restart.
Spot on.
Now those stdio MCP servers can seamlessly track state and authorize actions across
resumed sessions without skipping a beat.
That's a wrap on v2.1.163.
Catch you next time!