Skip to content

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

Merged
kiankyars merged 2 commits into
JackHopkins:mainfrom
rasdani:fix/get-path-max-attempts
Jun 11, 2026
Merged

fix(get_path): bump default max_attempts + env-var override#369
kiankyars merged 2 commits into
JackHopkins:mainfrom
rasdani:fix/get-path-max-attempts

Conversation

@rasdani

@rasdani rasdani commented May 10, 2026

Copy link
Copy Markdown
Contributor

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.

rasdani and others added 2 commits April 19, 2026 21:34
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.
@kiankyars
kiankyars merged commit f748ec4 into JackHopkins:main Jun 11, 2026
1 of 3 checks passed
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.

2 participants