Skip to content

Fix Wiki Writer timeouts misreported as transient API errors#279

Merged
mrjf merged 2 commits intomainfrom
copilot/fix-wiki-writer-transient-errors
Mar 17, 2026
Merged

Fix Wiki Writer timeouts misreported as transient API errors#279
mrjf merged 2 commits intomainfrom
copilot/fix-wiki-writer-transient-errors

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

The agent was loading 3000+ lines of source into context then generating all wiki pages in a single push-wiki call, exceeding output token/timeout limits. The API returned a timeout; the CLI logged it as "transient" and retried into the same wall repeatedly.

Changes

Mandatory batching constraints (3d)

New hard-constraint block the agent must read before generating anything:

  • Max 4 pages per push-wiki call; process sequentially
  • No sub-agents — generation must happen in the main conversation loop
  • Per-page limit: 3 KB; per-call payload limit: 30 KB
  • On API error: retry up to 2× halving batch size each time (min 1 page/call); single-page failures are unrecoverable

Large-file context limits (3d)

For source files >500 lines, forbids reading the full file. Instead:

grep -n "FunctionName\|ClassName" src/foo.ts | head -20  # locate relevant lines
head -n 150 src/foo.ts | tail -50                        # extract that region

Batched push-wiki (3f)

Replaces the previous "one giant JSON object" instruction with explicit sequential batching — sidebar included only in the final batch, payload size estimated before each call, and consistent retry semantics aligned with the 3d constraints.

Error clarity

Retry guidance explicitly names timeouts as the most likely cause of API errors during generation, so the agent (and operators reading logs) know what's actually happening rather than chasing phantom network issues.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…rors

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Wiki Writer runs failing due to timeouts Fix Wiki Writer timeouts misreported as transient API errors Mar 17, 2026
Copilot AI requested a review from mrjf March 17, 2026 16:44
Copilot finished work on behalf of mrjf March 17, 2026 16:44
@mrjf mrjf marked this pull request as ready for review March 17, 2026 17:42
@mrjf mrjf merged commit fe3b21f into main Mar 17, 2026
1 check passed
@mrjf mrjf deleted the copilot/fix-wiki-writer-transient-errors branch March 17, 2026 18:05
Copilot AI added a commit that referenced this pull request Mar 17, 2026
…pipe

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
dsyme added a commit that referenced this pull request Mar 19, 2026
)

* Initial plan

* Fix agentic-wiki-writer: single push-wiki call and bare pipe in wiki links

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>

* Keep batched push-wiki from PR #279, add max:5 config, fix backslash pipe

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>

* Increase push-wiki max from 5 to 10

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>

* Fix CI: remove invalid max property from custom push-wiki job

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Co-authored-by: Russell Horton <mrjf@github.com>
Co-authored-by: Don Syme <dsyme@users.noreply.github.com>
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.

Wiki Writer runs failing with transient error that are not transient, but timeoouts

2 participants