# Intro

When a command is invoked, it is wrapped into the centralized `sendCommand(command, args)` pipeline. This pipeline handles network safety checks under the hood:

```mermaid
graph TD

    A([Your Command Call<br>e.g., window.reload]) --> B{Is activeSocket<br>connected & OPEN?}
    B -- YES --> C[Send payload directly<br>over WebSocket wire.]
    B -- NO --> D[Push to commandQueue<br>Drained on next connection.]
```

* **Immediate Execution:** If the native renderer socket is active and open, the command stringifies and sends immediately.
* **Offline Queuing:** If the socket is not ready yet, the command parameters are gracefully pushed into an internal `commandQueue` array so no actions are lost during early initialization cycles.

For more info, refer to [Node <-> Native](/v1/ipc/native.md)


---

# 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://positronjs.gitbook.io/v1/commands/intro.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.
