From f192c40b2a3643a9ab97303310db8dbc7547ee35 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 14:59:31 +0100 Subject: Robustness: retry with backoff, explained errors, --list, --session creates - four attempts on 408/425/429/500/502/503/504 and transport errors, honouring Retry-After - backoff is interruptible so Ctrl-C is not held for up to 8s - context overflow, auth failure and rate limit messages say what to do - --list shows id/model/messages/age without needing a key - --session creates the session when the id does not exist - probes recorded: session header is mandatory, consecutive user messages allowed --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 562058a..4ec5d64 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ export OPENCODE_API_KEY=... # or write it to ~/.config/agent686/key ./agent686 "make a calculator in C" # one turn, then exit ./agent686 # interactive, one prompt per line ./agent686 -c # continue the most recent session -./agent686 --session # resume a specific one +./agent686 --session # resume it, or create it if the id is new +./agent686 --list # id, model, message count, age ./agent686 --yolo "..." # approve every tool call ``` @@ -35,6 +36,9 @@ Provider is OpenCode Go, `chat/completions`, model `deepseek-v4.1-flash` by default. Every request carries a stable `x-opencode-session` header, which the service uses for routing and prompt caching. +Rate limits and transient failures retry with backoff (four attempts, `Retry-After` +honoured); a 429 that survives them explains itself instead of dumping JSON. + ## Tools `read` (numbered lines), `write` (never creates directories), `edit` (exact @@ -48,7 +52,7 @@ that is where `rm -rf` lives. ## Tests ```sh -cargo test # 19 tests, no network +cargo test # 24 tests, no network python3 scripts/mock-provider.py & # canned SSE provider docker run --rm --platform linux/386 debian:12 /b/agent686 # target-shaped gate ``` -- cgit v1.2.3