# shouldAutosubmit

**Kind:** Function

**Source:** [`atloria-monorepo/libs/agent-core/src/benchmark/agent-hardening.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/benchmark/agent-hardening.ts#L91)

Determine if we should extract and submit a partial patch.

Pattern from SWE-agent: On ANY non-success exit (timeout, max turns,
cost limit, API error), submit whatever git diff exists. A partial
fix is better than no submission.

Returns false if: task passed cleanly, or no changes exist.

## Signature

```ts
function shouldAutosubmit(result: {
  passed?: boolean;
  timedOut?: boolean;
  hasChanges?: boolean;
  error?: string;
}): boolean
```

## Parameters

| Name | Type |
|---|---|
| `result` | `{
  passed?: boolean;
  timedOut?: boolean;
  hasChanges?: boolean;
  error?: string;
}` |

**Returns:** `boolean`
