> For the complete documentation index, see [llms.txt](https://marrow.skeletonarmyftc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://marrow.skeletonarmyftc.com/concepts/retries.md).

# Retries

How to utilize RetryCommand

So, you’ve coded your autonomous routine to near perfection, and it works 90% of the time. That's great! But what about the other 10%? Are you comfortable with leaving that up to chance and risking underperforming in a critical match?

Imagine this scenario: in a deciding match, your auto sequence fails to grab a game element properly. Without any error-detection system, that single failure could cost your team the win.

This is where **a retry system** comes into play.

***

## Real-World Example

A perfect example for this comes from Hypernova 28596’s 2024–2025 INTO THE DEEP autonomous:

{% embed url="<https://www.youtube.com/watch?v=xNpInsjkM50>" %}

* **At 0:05** - Their first transfer fails. Instead of giving up, the robot automatically retries closing the claw a few more times, eventually securing the sample and completing the transfer. Without retries, the robot would have continued as if the transfer succeeded, scoring nothing.
* **At 0:18** - Their first attempt to intake a sample from the submersible doesn’t work. The robot re-detects, realigns, and tries again until it succeeds in picking up and scoring the sample.

As you can see, these retries mean the difference between a poor auto run and a consistently reliable one. Even recovering just a couple more points can be the tiebreaker in close matches.

***

## Using Marrow

To make this easier, Marrow provides a [`RetryCommand`](https://marrow.skeletonarmyftc.com/automations/retrycommand.md) that handles the retry logic for you.

For a full breakdown of how to use it in your own code, see the [`RetryCommand` reference page](https://marrow.skeletonarmyftc.com/automations/retrycommand.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://marrow.skeletonarmyftc.com/concepts/retries.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
