# Troubleshooting

<details>

<summary><code>stackai: command not found</code></summary>

Reopen your terminal so the PATH refreshes after `npm install -g stackai`.

</details>

<details>

<summary>PowerShell: "running scripts is disabled on this system"</summary>

Run once (no admin needed):

```powershell
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
```

Or call it directly: `stackai.cmd login`.

</details>

<details>

<summary><code>Error: 401</code> / Invalid API key</summary>

Your key is wrong, expired, or revoked. Create a fresh one in the [Dashboard](https://usestackai.com) and run `stackai login` again.

</details>

<details>

<summary><code>429</code> / rate limit reached</summary>

You've hit the daily request limit (50/day on the free tier). Wait until tomorrow, or use a different key.

</details>

<details>

<summary>"Reached the step limit"</summary>

A complex task hit the per-run step ceiling. The agent stops gracefully — just run the same prompt again to continue from where it left off.

</details>

<details>

<summary>Interactive mode won't start</summary>

It needs a real terminal (TTY). If you're piping output or in a restricted shell, use a one-shot instead: `stackai "your prompt"`.

</details>

{% hint style="info" %}
**Still stuck?** Open an issue on [GitHub](https://github.com/Stackaiagent/Usestackai/issues).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usestackai.com/help/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
