Skip to content

fix(get_path): bump default max_attempts + env-var override#369

Open
rasdani wants to merge 1 commit into
JackHopkins:mainfrom
rasdani:fix/get-path-max-attempts
Open

fix(get_path): bump default max_attempts + env-var override#369
rasdani wants to merge 1 commit into
JackHopkins:mainfrom
rasdani:fix/get-path-max-attempts

Conversation

@rasdani
Copy link
Copy Markdown

@rasdani rasdani commented May 10, 2026

GetPath.call polls the async path-handle with exponential backoff (50ms → 1s cap). The old 10-attempt default gave ~6.5s wall-clock budget, which is not enough on a fresh world: the first distant move_to has to wait for Factorio's chunk-generation before A* can even start, and chunk-gen routinely exceeds 6.5s.

Empirically:

  • 24-task gpt-5.4 throughput eval at the 10-attempt default: 12/129 tool messages (~9.3%) raised "Path request timed out after 10 attempts", always on the first distant move_to of each rollout.
  • 6-task Sonnet-4.5 eval at a 30-attempt client-side patch: 2/229 (~0.9%).
  • 1-task gpt-4o eval at 60-attempt: 1/40 (~2.5%).

Bumping the default to 120 (~115s wall-clock budget). Override with FLE_GETPATH_MAX_ATTEMPTS=N when running on slower hardware, or lower it explicitly if failing fast on unreachable targets matters more than tolerating cold chunks.

GetPath.__call__ polls the async path-handle with exponential backoff
(50ms → 1s cap). The old 10-attempt default gave ~6.5s wall-clock budget,
which is not enough on a fresh world: the first distant `move_to` has to
wait for Factorio's chunk-generation before A* can even start, and
chunk-gen routinely exceeds 6.5s.

Empirically:
- 24-task gpt-5.4 throughput eval at the 10-attempt default: 12/129
  tool messages (~9.3%) raised "Path request timed out after 10 attempts",
  always on the first distant move_to of each rollout.
- 6-task Sonnet-4.5 eval at a 30-attempt client-side patch: 2/229 (~0.9%).
- 1-task gpt-4o eval at 60-attempt: 1/40 (~2.5%).

Bumping the default to 120 (~115s wall-clock budget). Override with
`FLE_GETPATH_MAX_ATTEMPTS=N` when running on slower hardware, or lower
it explicitly if failing fast on unreachable targets matters more than
tolerating cold chunks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant