# Atlas bash tool: "Invalid timeout value: <n>. Timeout must be a positive number."

> To fix "Invalid timeout value" in Atlas bash, pass a positive number of milliseconds, or omit `timeout` entirely to use the configured default.

Atlas bash fails with "Invalid timeout value: <n>. Timeout must be a positive number." because the shell tool validates the timeout parameter and throws on any negative value, so a bad argument is caught before a process is spawned. The fix is to pass a positive number of milliseconds, or to omit timeout entirely and use the configured default. Two things trip people up here. The parameter is in milliseconds, not seconds, so do not pass seconds where milliseconds are expected. And the value must be a number, not a string, so check the type before you re-run the command.

## Symptom

The bash tool fails before running anything with: Invalid timeout value: <n>. Timeout must be a positive number. No process is spawned and no command output is returned.

## Cause

The Atlas shell tool validates the timeout parameter and throws on any negative value, so a bad argument is caught before a process is spawned. The value you passed was not a positive number, either because it was negative, or because it was not a number at all.

## Fix

1. Pass a positive number of milliseconds, or omit `timeout` to use the configured default.
2. Do not pass seconds where milliseconds are expected. The parameter is in ms, so thirty seconds is 30000, not 30.
3. Check that the value is a number, not a string. A quoted value is not the same as a numeric one.
4. Re-run the command with a valid timeout and confirm the shell tool spawns the process.

## Why does Atlas reject an invalid timeout value

Atlas rejects the value because the shell tool validates the timeout parameter and throws on any negative value, so a bad argument is caught before a process is spawned. The failure message is "Invalid timeout value: <n>. Timeout must be a positive number." and Atlas spawns 0 processes.

The validation happens up front, which is why you get no command output at all rather than a partial run. That is the useful property of the error: a negative or non-numeric timeout never reaches the process-spawning path, so there is no half-executed command to clean up and no ambiguity about whether your command touched the system. It did not. The tool refused the argument and stopped. Compare that to the separate timeout-expiry error, which happens after a command has been running and killed. The two are easy to confuse by name and are completely different in effect: one means your command was cut short, and this one means your command never started.

## How to fix the Atlas bash Invalid timeout value error

Fix the Atlas bash timeout error by passing a positive number of milliseconds, or by omitting `timeout` altogether so the shell tool uses the configured default. A value of 60000 gives the command a minute. A negative value, or no value at all in numeric form, is what triggers the rejection.

Omitting the parameter is underrated. If you have no specific reason to override the ceiling, the configured default is already tuned for ordinary commands, and leaving it alone removes an entire class of argument mistakes. Set an explicit timeout when you know a command runs long and you want to give it room, not as a reflex on every call. When you do set one, pick a round number in milliseconds that reflects the actual work: 30000 for a quick script, 300000 for a heavy build. The rejection is instant and costs nothing but a retry, so a wrong value here is cheap to correct.

## Milliseconds versus seconds in the Atlas timeout parameter

The Atlas bash timeout parameter is in milliseconds. Do not pass seconds where milliseconds are expected. Passing 30 does not give the command thirty seconds, it gives it thirty milliseconds, and a command that cannot finish in 30 ms will be killed almost immediately even though the value itself was accepted as valid.

This is the quiet failure that hides behind the loud one. A negative timeout produces an obvious rejection. A too-small positive timeout is perfectly valid, passes the check, spawns the process, and then kills it so fast that the run looks broken for reasons that have nothing to do with the command. If a bash call is dying instantly and the timeout you set is a small number, the unit is the first thing to check. Multiply by 1000 and try again. Getting the unit right the first time is the difference between a build that runs and a build that is terminated before it has read its config file.

## Why a string timeout fails validation in Atlas

A string fails validation in Atlas because the shell tool checks that timeout is a positive number, and a quoted value is not a number. Visually, a quoted 60000 and a bare 60000 are the same digits. The validator is not reading it visually, so strip the quotes and pass the raw number.

Type slips happen most often when the timeout is being assembled programmatically, passed through a config layer, or emitted by a model that quotes numeric fields out of habit. The value looks correct when you read it, because visually a quoted 60000 and a bare 60000 are the same digits. The validator is not reading it visually. Strip the quotes and pass the raw number. Every Atlas tool call is permission-gated against allow, ask, and deny rules before it runs, and the parameter validation sits alongside that gate, both of them checking the call before anything is executed. A malformed argument stopping at the door is the system working as intended.

## How to verify the Atlas timeout value fix worked

Verify the Atlas bash timeout fix by re-running the command. A valid positive numeric timeout, for example 60000, produces no "Invalid timeout value" message, the shell tool spawns the process, and real command output comes back. Output appearing means the argument was accepted and the command ran.

Two follow-on checks are worth making. First, confirm the command completed rather than being cut short, because a valid but tiny timeout passes validation and still kills the process. If the run ends instantly with nothing useful, revisit the unit. Second, if you removed the parameter entirely and the command now runs to completion, leave it removed: the configured default was sufficient, and reintroducing an explicit timeout only reintroduces the chance of getting it wrong. The simplest correct call is the one with no timeout argument at all.

## FAQ

### what does Invalid timeout value Timeout must be a positive number mean in Atlas

The Atlas shell tool validates the timeout parameter and throws on any negative value. The message means the value you passed was not a positive number, and no process was spawned.

### is the Atlas bash timeout in seconds or milliseconds

Milliseconds. Do not pass seconds where milliseconds are expected. Thirty seconds is 30000, not 30.

### can I omit the timeout in an Atlas bash call

Yes. Omit `timeout` to use the configured default. If you have no specific reason to override it, leaving it out removes a whole class of argument mistakes.

### why is my Atlas timeout rejected when the number looks right

Check that the value is a number, not a string. A quoted value looks identical when you read it but fails the shell tool's check that timeout is a positive number.

### why did my Atlas command die instantly with a valid timeout

The timeout was probably in seconds rather than milliseconds. A value like 30 is valid and positive, but it only gives the command 30 ms, so it is killed almost immediately.

### does an invalid timeout in Atlas still run my command

No. The shell tool validates the timeout parameter before a process is spawned, so a rejected argument means the command never started and nothing on your system was touched.

### how do I confirm the Atlas timeout value is fixed

Re-run the command. A valid positive numeric timeout produces no Invalid timeout value message, the process spawns, and real command output comes back.

---

Canonical HTML: https://runatlas.sh/resources/troubleshooting/bash-invalid-timeout
Source of truth: aeo_pages row `/resources/troubleshooting/bash-invalid-timeout` (segment: Troubleshooting) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
