# Limits and Defaults Reference (https://www.shipfox.io/docs/reference/limits)

Description: Look up Shipfox gate attempt caps, job timeouts, log budgets and retention, output grouping caps, environment-map limits, and agent session caps.

This page is the canonical home for shared operational limits. Other pages
describe the behavior and link here for the numbers. Self-hosted deployments
can change the values marked configurable.

## Workflow execution [#workflow-execution]

| Limit                         | Default                           | Configurable        | Details                                                                                                                                                                                                                                                                                               |
| ----------------------------- | --------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Gate attempts per gating step | 5 (including the first execution) | No                  | New runs use five when no authored limit is set. Active and rerun executions with no persisted limit retain the legacy limit of three. When the cap is exhausted and the gate still fails, the step is marked failed and the job stops. See [Feedback loops](https://www.shipfox.io/docs/understand/feedback-loops#loop-bounds). |
| Job `execution_timeout`       | 6 hours                           | Per job, in YAML    | Wall-clock bound on one job execution, including gate retries. Authored values range from 1 second through 24 hours. See [Job fields](https://www.shipfox.io/docs/reference/workflow-schema#job-fields).                                                                                                                         |
| Run timeout                   | 30 days                           | No (not authorable) | Outer bound on a whole run, including its listening jobs. A listening job's `timeout` is capped by it.                                                                                                                                                                                                |
| Manual triggers per workflow  | 1                                 | No                  | See [Trigger fields](https://www.shipfox.io/docs/reference/workflow-schema#trigger-fields).                                                                                                                                                                                                                                      |

## Step outputs [#step-outputs]

| Limit                     | Default                         | Configurable | Details                                                                                                                                                               |
| ------------------------- | ------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Output bytes per step     | 256 KiB total, 64 KiB per value | No           | The runner enforces both caps; Workflows also rejects persisted step output above the 256 KiB total cap. See [Step outputs](https://www.shipfox.io/docs/reference/workflow-schema#step-outputs). |
| Declared outputs per step | 128 entries                     | No           | The `outputs:` map on one step.                                                                                                                                       |
| Agent output re-prompts   | 2                               | No           | An agent step missing a declared output is re-prompted this many times before the step fails.                                                                         |

Persisted step outputs use JSON-safe values. Tool mappings convert safe CEL
integers to JSON numbers. They reject unsafe integers, non-finite numbers,
unsupported objects, cyclic values, and values nested beyond 64 levels.

## Job outputs [#job-outputs]

| Limit                     | Default                         | Configurable | Details                                                                                                        |
| ------------------------- | ------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------- |
| Output bytes per job      | 256 KiB total, 64 KiB per value | No           | A job fails when materialized outputs exceed the cap. See [Job fields](https://www.shipfox.io/docs/reference/workflow-schema#job-fields). |
| Declared outputs per job  | 128 entries                     | No           | The `outputs:` map on one job. See [Job fields](https://www.shipfox.io/docs/reference/workflow-schema#job-fields).                        |
| Structured output nesting | 64 levels                       | No           | Structured values deeper than this fail as non-JSON-safe outputs.                                              |

Persisted typed job outputs use JSON-safe values. CEL integers become JSON
numbers when they are safe integers and decimal strings otherwise. Timestamps
become ISO 8601 strings. Unsupported or cyclic values fail the execution. The
total is measured as UTF-8 bytes of the complete
serialized outputs object, including output keys and JSON syntax.

## Workflow document [#workflow-document]

| Limit                 | Default | Configurable | Details                                                                                                                                   |
| --------------------- | ------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `env` entries per map | 128     | No           | Applies to each of the workflow, job, and step `env` maps. See [Environment variables](https://www.shipfox.io/docs/reference/workflow-schema#environment-variables). |
| `env` serialized size | 32 KiB  | No           | The JSON-serialized size of one `env` map.                                                                                                |

## Logs [#logs]

| Limit                | Default                   | Configurable                                                           | Details                                                                                                                                                                |
| -------------------- | ------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Per-job log budget   | 32 MiB + 1 MiB per minute | Self-host: `LOG_BUDGET_BASE_BYTES`, `LOG_BUDGET_RATE_BYTES_PER_MINUTE` | Past the budget, the job is capped and further output is dropped. A `capped` record marks the boundary. See [Inspect logs](https://www.shipfox.io/docs/how-to/run-and-troubleshoot/inspect-logs). |
| Log retention        | 90 days                   | Self-host: `LOG_RETENTION_DAYS`                                        | Persisted logs are deleted from the database and object storage after this window.                                                                                     |
| Output group nesting | 32 levels                 | No                                                                     | Past the cap a group is flattened into plain output. Wrap output in `::group::<name>` / `::endgroup::` marker lines to create collapsible sections.                    |
| Output group name    | 1 KiB                     | No                                                                     | The runner byte-truncates longer marker names before upload. Direct log records over the cap are rejected at the record level.                                         |

## Agent sessions [#agent-sessions]

| Limit                      | Default           | Configurable                                     | Details                                                                                                                                                                                                           |
| -------------------------- | ----------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Session transcript segment | 64 MiB compressed | Self-host: `AGENT_SESSION_BLOB_CAP_BYTES`        | One committed segment per reported attempt; a larger compressed blob fails the commit and the attempt. Transcripts are encrypted at rest with the workspace envelope-crypto scheme and are never client-readable. |
| Session retention          | 90 days           | Self-host: `AGENT_SESSION_RETENTION_DAYS`        | Session rows and their transcript objects are deleted after the run terminates and this window elapses.                                                                                                           |
| Superseded segment grace   | 10 minutes        | Self-host: `AGENT_SESSION_SEGMENT_GRACE_SECONDS` | Pruning of superseded segments is deferred by this window so concurrent fork snapshot reads keep their object.                                                                                                    |

A resumed transcript is byte-exact, so the model provider can reuse its prompt
cache. That reuse happens only inside the provider's cache window. Rapid
successive segments, such as batched listening events or short hops between
dependent jobs, get it. Outside the window the provider processes the full
conversation again; the resumed conversation itself is unchanged. See [Agent
session fields](https://www.shipfox.io/docs/reference/workflow-schema#agent-session-fields) for the field
contract.

## Related pages [#related-pages]

### [Workflow schema](https://www.shipfox.io/docs/reference/workflow-schema)

The fields these limits apply to.

### [Workflows and runs](https://www.shipfox.io/docs/understand/workflows-and-runs)

How runs stream, persist, and bound their output.