# Stop Reasons

Stop Reasons define structured causes for server shutdown or restart.

They describe *why* a stop action was requested.

***

### Overview

Stop Reasons are used to:

* identify the cause of a stop request
* provide consistent diagnostics
* support user-facing messages

They are passed through action events and processed by OMS.

***

### Core Types

#### StopReason

`StopReason` represents a logical reason for stopping or restarting the server.

{% @github-files/github-code-block url="<https://github.com/c0nnor263/OperateMyServer/blob/main/oms-api/src/main/kotlin/io/conboi/oms/api/foundation/reason/StopReason.kt>" %}

***

### Usage

Stop Reasons are typically used when:

* requesting a stop or restart
* logging shutdown causes
* displaying messages to users

Each reason is defined by an addon and remains stable across runtime.

***

### Notes

* Stop Reasons are identifiers, not behavior
* Used in action events (e.g. stop requests)
* Include a localization key via `messageId`
* Scoped per addon


---

# 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://conboi.gitbook.io/oms-wiki/developer-guide/runtime-infrastructure/stop-reasons.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.
