---
title: "Discussion on \"Claude Code hooks that send the agent's Bash commands to its own machine, not your laptop\" | Hashnode"
description: "Discussion on \"Claude Code hooks that send the agent's Bash commands to its own machine, not your laptop\". A PreToolUse hook that rewrites the Bash calls you choose so they run on a Sandscale sandbox, shown to you first."
url: "https://hashnode.com/posts/claude-code-hooks-route-bash-to-a-sandbox/6b0ed2b0f9b4d8df255b3109"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Claude Code hooks that send the agent's Bash commands to its own machine, not your laptop](https://sandscale.hashnode.dev/claude-code-hooks-route-bash-to-a-sandbox?utm_source=hashnode&utm_medium=feed)

A PreToolUse hook that rewrites the Bash calls you choose so they run on a Sandscale sandbox, shown to you first.

19h ago · 6 min read · sandscale.hashnode.dev  
Read the article

-   [#claudecode](https://hashnode.com/tag/claudecode)
-   [#ai](https://hashnode.com/tag/ai)
-   [#devops](https://hashnode.com/tag/devops)
-   [#security](https://hashnode.com/tag/security)

## Written by

[Sandscale](https://hashnode.com/@sandscale)

@sandscale

  
[View profile](https://hashnode.com/@sandscale)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
