Runner troubleshooting
Use the project Slices view first. Filter by failed status or search the error text, then open a slice to inspect the runner error, import error, duration, exit code, report count, and artifact metadata.
409 prompt_hash mismatch
Symptom: The agent prints rejected (prompt_hash mismatch).
Cause: The prompt_hash echoed with the result does not match the exact rendered prompt bytes served for that lease. A proxy, custom host, or runner changed the prompt after claim.
Fix:
- Discard the modified prompt and lease payload.
- Claim the slice again.
- Pass the temporary
{prompt_path}to the model without rewriting it. - If you implement an external host, hash the served UTF-8 prompt bytes before execution and compare them with
prompt_hash.
Do not retry the rejected result with a fabricated hash.
413 output too large
Symptom: The agent prints rejected (output too large).
Cause: stdout or stderr exceeded the server's per-artifact limit. The default MAX_ARTIFACT_BYTES is 10 MiB.
Fix:
- Configure the model to emit concise findings rather than transcripts.
- Keep progress output out of stdout when the runner supports a separate diagnostic channel.
- Run the first-party agent with
--redact. It masks secret-shaped strings and caps stdout at 1 MiB with an explicit truncation marker. - Claim and run the slice again. A rejected oversized payload is not imported.
The server does not support presigned result uploads.
A lease expires while the model is running
Symptom: A running slice returns to claimable state, or two workers run the same slice.
Cause: The lease reached its expiry time. The first-party agent requests a lease based on the largest configured timeout and sends best-effort heartbeats every 15–60 seconds while the process runs. Network loss can prevent heartbeats.
Fix:
- Set
timeout_secondshigh enough for the model binding. - Keep the agent online when possible so heartbeat requests can extend the lease.
- Let the original worker submit its result. A late result is accepted if no other lease completed the slice.
- If another lease already won, the server returns
202and stores the late output as a superseded provenance artifact without importing it twice.
Lease expiry requeues work; it does not automatically invalidate the original worker.
The daemon cannot clone or fetch
Symptom: thespider-agent daemon logs a Git clone, fetch, or checkout failure before it claims slices.
Cause: The daemon shells out to the local git command. It does not manage forge credentials.
Fix:
- Run
git ls-remote REPOSITORY_URLas the daemon's operating-system user. - For SSH URLs, load the correct key into that user's
ssh-agentand trust the forge host key. - For HTTPS URLs, configure a credential helper or a token-bearing URL appropriate for your environment.
- Confirm the campaign has both
target_remote_urlandtarget_commit. - Restart the daemon after Git authentication succeeds.
The managed checkout lives below ~/.thespider/checkouts unless --workdir overrides it.
A process exits successfully but imports no reports
Symptom: The slice is completed, stdout exists, and imported_reports is zero.
Cause: The parser did not find a complete marker-delimited JSON array, the array was invalid JSON, or every item failed report validation.
Fix:
- Open the slice and note its output artifact key for operator correlation.
- Run the command manually with the same prompt.
- Confirm both opening and closing marker tags exist.
- Confirm the first non-whitespace character after the opening marker is
[. - Validate the array as JSON.
- Compare each object with the runner contract.
The OpenCode runner returns early or keeps a session
Symptom: The runner produces empty output, times out, or reports that it kept an OpenCode session.
Cause: The capture did not observe a complete result block before OPENCODE_CAPTURE_TIMEOUT, or the OpenCode stream failed.
Fix:
- Use the recovery command printed to stderr. It reads assistant messages from the retained session.
- Increase
OPENCODE_CAPTURE_TIMEOUTwhile keeping it below the model binding timeout. - Confirm
occtlcan reach the configured OpenCode host and port. - Confirm the assistant output includes a complete marker block, not only prose that mentions the marker.
Network, rate-limit, and server failures
The first-party agent retries network failures, 429, and 5xx responses with exponential backoff and jitter. It does not treat 409 or 413 as transient. If retries continue, check /healthz, token validity, project scope, and the server logs.