When your agent can’t use its mount, check the daemon first, then the mount, then the harness. Most problems show in `stash status`, the `_sources/` page of a source, or the daemon log.

```bash
stash daemon status          # is the daemon running, and which mounts it has
stash status ops             # the state of the mount and each source
cat /tmp/ops-context/_sources/incidents.md
tail -n 50 "${STASH_DATA_ROOT:-$HOME/.stash}"/logs/daemon/*.log
```

Outside AgentCore Runtime, the data root is `$STASH_DATA_ROOT` when set, or `$HOME/.stash` by default. Runtime uses the data root of its session. See [Deploy on AgentCore Runtime](/docs/user-guide/stash/integrations/agentcore-runtime/index.md).

The `/stash-diagnose` agent skill runs these checks for you in Claude Code, Codex, or Kiro, and offers each fix. It’s in [`skills/`](https://github.com/strands-agents/stash/tree/833198a2b91f6490291149d06b4daac8de0727c8/skills).

## The mount

### A search fails with `mount "ops" is starting`

`create` returns before the mount is ready. Run `stash status ops` until it shows `state: ready`, then search again.

### The state is `pending_config_resolution`

The config has `${...}` variables with no value. `stash status ops` lists them as `unbound`. Give each one a value:

```bash
stash bind ops --set actorId=ops-agent
```

### The state is `failed`

`stash status ops` shows the error. A mount fails when no source of its config starts, or when it can’t start at all. Fix the cause, then delete the mount and create it again:

```bash
stash delete ops --yes
stash create ops --config stash.toml
```

### The health is `degraded`

At least one source didn’t start, and the mount serves the others. The `Sources` section of `stash status ops` gives the reason, and so does the source’s page in `_sources/`.

### `create` refuses a different config

`create` keeps a copy of the config from the first create, and refuses a different one for the same name. Apply the new config with `update`:

```bash
stash update ops --config stash.toml
```

`update` can’t change `mount_point`, `cache_max_bytes`, or `[telemetry]`. For those, delete the mount with `--remove-data`, then create it again. `--remove-data` removes each file in the mount point and the notes, and refuses while turns are unsent.

### `create` refuses the mount point

The mount point must be empty, or belong to this mount. It can’t be inside the data root or another mount point. Choose an empty folder, or remove what is in it.

### A tool call exits `0`, but the tool failed

`stash tool call` exits `0` when it called the tool, also when the tool reported an error. It exits `1` only when nothing was called. Read the first lines of the answer: `[the tool reported an error]` or `possible error: …` names the failure.

Stash never calls a tool again by itself, because a tool can change data. Before you retry a call that writes, check whether the first call changed anything.

### Two processes can’t find the same daemon

Each `stash` command, hook, and Strands process must use the same data root as the daemon: the same `HOME`, or the same `STASH_DATA_ROOT`. A command that uses another data root refuses the running daemon. By default, one daemon runs on each machine.

### A Gateway source has no tools, or a tool is missing

The `target` of the source must be the name of the Gateway target. Stash keeps only the tools whose names start with that target. Copy the name from the Gateway console, then run `stash update`.

## Credentials

### A source fails with access denied

The daemon uses the environment of the command that started it. A later `AWS_PROFILE` doesn’t reach it. Restart the daemon in the right environment:

```bash
stash daemon stop
AWS_PROFILE=ops AWS_REGION=us-east-1 stash daemon start
```

The mounts and their data stay. The daemon restores each mount when it starts.

If the role lacks a permission, the daemon log names the action:

```text
agentcore-memory/incidents: hydration listing /summaries/* failed: access denied (AccessDeniedException: User is not authorized to perform: bedrock-agentcore:ListMemoryRecords)
```

### A Gateway refuses each request

A source with no `auth` sends no credential. A Gateway with `AWS_IAM` or `CUSTOM_JWT` inbound auth refuses it. Add `auth = { sigv4 = {} }` to the source, as the error says.

To keep a mount and its unsent writes, stop the daemon, add the same `auth` to `mounts/ops/config.toml` in the data root, and start the daemon again. Add it to your own `stash.toml` too.

### A Gateway URL is refused

`gateway_url` must have a path. An AgentCore Gateway serves MCP at `/mcp`. The error gives the URL that ends with `/mcp`.

## The harness

### `attach` refuses

-   **No daemon runs.** `attach` never starts one. Run `stash daemon start`.
-   **The config has no `harnesses`.** Add `harnesses = ["claude"]`, or the harnesses that you use, run `stash update ops --config stash.toml`, then `attach` again.
-   **The folder is your home folder.** Use `stash attach ops --global`.
-   **A server named `stash` is already there, and Stash didn’t add it.** Rename or remove that server, then run `attach` again.

### The agent has no `stash` tools

-   **Claude Code** asks once before it runs a server of `.mcp.json`. Approve it.
-   **Codex** reads `.codex/config.toml` only in a project that it trusts, and runs a new hook only after you trust it in `/hooks`.
-   In either harness, you can attach in CLI mode instead: `stash attach ops --no-mcp`. See [Attachment modes](/docs/user-guide/stash/guides/attachment-modes/index.md).

### The agent sees each tool twice

The harness also runs its own copy of an MCP server that the mount has. Turn off the copy: `/mcp` or `disabledMcpjsonServers` in Claude Code, `enabled = false` in Codex, or `"disabled": true` in Kiro.

### The agent doesn’t follow the new steering

`attach` updates the steering block, but a session that runs reads the old one. Start a new session.

## Write-back

### Turns don’t reach AgentCore Memory

-   Check that the source has `write.trajectory.actor`. A source with no `write` table is read-only.
-   The mount gets only turns after the attach. Earlier turns of a session aren’t sent.
-   A refused write waits in `mounts/ops/writers/<writer>/terminal/` in the data root. Fix the cause, for example an expired credential, then send it again:

```bash
stash redrive ops
```

`redrive` needs no running daemon.

## Recover the daemon

```bash
stash daemon stop    # stop each mount; unsent turns stay queued on disk
stash daemon start   # restore each mount, also after a crash
stash ls
```

`daemon stop` keeps each mount, its config, its files, and its unsent writes. When the socket doesn’t answer, `daemon stop` ends the daemon by its process ID.

## Next steps

-   [Observe and measure](/docs/user-guide/stash/guides/observe/index.md): the logs and metrics of a mount.
-   [Command reference](/docs/user-guide/stash/reference/cli/index.md): the exit code and output of each command.