---
title: Goose
description: Run the native Goose coding agent in an isolated project copy
icon: "/images/recipes/agents/goose.svg"
---

Goose publishes native Linux binaries for both `aarch64` and `x86_64`. Its installer detects the guest architecture, which makes it a relatively small agent setup compared with a large Python environment.

## Run Goose

<Steps>
<Step title="Start Goose">

<Tooltip tip="On microsandbox cloud, create the named volume first and omit replace-on-create from this command."><span className="msb-badge-limited">Limited on cloud <Icon icon="circle-info" size={11} /></span></Tooltip>

<CodeGroup>
```sh macOS & Linux
msb run -t --name goose-demo --replace \
  --cpus 2 --memory 2G --root-disk 3G \
  --copy-dir ./my-project:/workspace \
  --workdir /workspace \
  --mount-named goose-data:/data/goose \
  -e GOOSE_PATH_ROOT=/data/goose \
  debian:bookworm-slim -- sh -lc '
    apt-get update &&
    apt-get install -y --no-install-recommends ca-certificates curl bzip2 git &&
    curl -fsSL https://github.com/aaif-goose/goose/releases/download/v1.44.0/download_cli.sh |
      GOOSE_BIN_DIR=/usr/local/bin GOOSE_VERSION=v1.44.0 CONFIGURE=false bash &&
    exec goose session
  '
```

```powershell Windows
msb run -t --name goose-demo --replace `
  --cpus 2 --memory 2G --root-disk 3G `
  --copy-dir ./my-project:/workspace `
  --workdir /workspace `
  --mount-named goose-data:/data/goose `
  -e GOOSE_PATH_ROOT=/data/goose `
  debian:bookworm-slim -- sh -lc '
    apt-get update &&
    apt-get install -y --no-install-recommends ca-certificates curl bzip2 git &&
    curl -fsSL https://github.com/aaif-goose/goose/releases/download/v1.44.0/download_cli.sh |
      GOOSE_BIN_DIR=/usr/local/bin GOOSE_VERSION=v1.44.0 CONFIGURE=false bash &&
    exec goose session
  '
```
</CodeGroup>

On first launch Goose asks whether to share anonymous usage data, then walks through provider configuration. `GOOSE_BIN_DIR` installs the executable on the sandbox's normal `PATH`, including later `msb exec` sessions. `GOOSE_PATH_ROOT` keeps its configuration, data, and session state in the `goose-data` volume.

<Tip>
  To test Goose without copying a project, replace `--copy-dir ./my-project:/workspace` with `--mkdir /workspace`.
</Tip>

</Step>

<Step title="Start another session">

After leaving Goose, return to the same sandbox and workspace with:

```sh
msb exec -t goose-demo -- goose session
```

</Step>

<Step title="Verify the installation">

Exit the session and run:

```sh
msb exec goose-demo -- goose --version
```

The pinned installer reports `1.44.0`.

</Step>

<Step title="Export changes">

Use the same review boundary as other coding-agent examples:

```sh
msb exec goose-demo -- sh -lc 'cd /workspace && git add -N . && git diff --binary > /tmp/goose.patch'
```

Copy the patch to the host:

```sh
msb cp goose-demo:/tmp/goose.patch ./goose.patch
```

Check that it applies cleanly before applying it:

```sh
git apply --check ./goose.patch
```

</Step>

<Step title="Clean up">

Remove the sandbox:

```sh
msb rm -f goose-demo
```

Remove persisted Goose data only when you no longer need it:

```sh
msb volume rm goose-data
```

</Step>
</Steps>

## Reference

- [Goose repository and installer](https://github.com/aaif-goose/goose)
- [Goose environment variables](https://github.com/aaif-goose/goose/blob/main/documentation/docs/guides/environment-variables.md)
