> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cosmon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unattended batch

> Run one analysis across many files, no handlers, with a timeout.

No handlers (so the agent runs unattended — questions aren't offered, dangerous
confirmations are declined), a `timeout`, and decisions baked into the prompt:
leave it running over a list of files.

```python theme={null}
from cosmon_agent_sdk import Client, CosmonError

files = ["beam1.sldprt", "beam2.sldprt", "beam3.sldprt"]

with Client(timeout=600) as client:            # no handlers → unattended
    for path in files:
        try:
            answer = client.run(
                f"Run a static structural study on {path} and report peak von Mises.",
                agent="solidworks",
            ).text()
            print(f"{path}: {answer}")
        except CosmonError as err:
            print(f"{path}: failed — {err}")
```

Catching `CosmonError` keeps one bad file from killing the batch. To retry a run
the CAD instance was busy for, branch on `CosmonRunError.code == "busy"`.

<Card title="Guide: unattended batches" icon="book-open" href="/sdk/guide#unattended-batches">
  Timeouts, triggering runs from your own code, and error handling.
</Card>
