[Bug]: Autopilot retries session-limit failures every ~1.5s and each retry consumes a max_iterations slot
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
Línea de trabajo
Empieza siguiendo cómo Autopilot gestiona el mensaje de límite de sesión de Claude y la ruta de reintento descrita en el Activity feed. Inspecciona los registros sessions y autopilot_meta con las consultas sqlite3 proporcionadas y, después, verifica que los intentos fallidos no consuman iteraciones, que los reintentos esperen hasta la hora de restablecimiento y que el objetivo se reanude automáticamente después.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Platform
macOS
Operating system version
macOS Tahoe 26.5.2 (25F84)
System architecture
ARM64 (M1, M2, etc)
PolyScope Version
0.24.1
Bug description
When the Claude session limit is reached mid-goal, Autopilot enters a tight retry
loop instead of waiting for the reset time, and every failed attempt consumes one
of the goal's max_iterations slots. This leaves the goal permanently over its cap,
so from then on it re-pauses at every story boundary and needs a manual Resume for
each remaining story.
Measured on a single quota event, with two goals running in parallel (both hit at
the same moment). All timestamps below are UTC, as stored in the database.
- 22 new sessions were created in 30 seconds. The intervals between them are 1-2s
(mean 1.43s), i.e. ~42 retries/min, with no backoff of any kind. - Each of those sessions recorded the same assistant message:
"You've hit your session limit · resets 1pm (Europe/Madrid)" - autopilot_meta.iterations_completed ended at 28 against max_iterations 25 on both
goals. - Subtracting the failed attempts from the counter reconstructs the real work
exactly: goal A 28 - 23 = 5 (4 completed stories + 1 in progress), goal B
28 - 22 = 6 (6 completed stories). So each retry costs exactly one iteration.
The retry loop seems to stop only when the counter crosses max_iterations: in both
goals it stopped immediately after passing 25. If that is correct, raising
max_iterations does not mitigate the problem, it just makes the storm longer and
still leaves the goal at its cap. This part is inferred from two samples and I
could not confirm it directly.
Consequences:
- A single quota event costs the goal its entire remaining iteration budget,
multiplied by the number of goals running in parallel. - After the reset time passed, Autopilot did not resume on its own. The goal
stayed paused for about 1.5 hours until I clicked Resume manually. - Because the goal is now over its cap, each Resume runs exactly one story and
pauses again. A goal with 7 remaining stories needs 7 manual clicks.
Expected behaviour:
- An attempt that failed because of the provider's usage limit should not count
towards max_iterations. - Autopilot should back off instead of retrying every 1.5s, and ideally wait until
the reset timestamp that Claude already provides in the error message, then
continue on its own.
Steps to reproduce
- Start an Autopilot goal with several stories, using Claude as the agent and the
default max_iterations (25). - Let it run until the Claude session limit is reached mid-goal. This is easiest to
trigger with two or more goals running in parallel. - Look at the Activity feed: the same "You've hit your session limit" message
repeats many times within a few seconds. - Check the counter: iterations_completed is now higher than max_iterations.
- Wait until after the announced reset time. The goal stays paused.
- Click Resume. Exactly one story runs and the goal pauses again. Repeat for every
remaining story.
Relevant log output
# Retry storm: 22 sessions in 30 seconds, intervals 1-2s (UTC)
sqlite3 -readonly ~/.polyscope/polyscope.db \
"select created_at from sessions where worktree_id='<goal-a>' order by created_at;"
10:33:44 10:33:45 10:33:46 10:33:48 10:33:50 10:33:52 10:33:53 10:33:55
10:33:56 10:33:57 10:33:59 10:34:01 10:34:02 10:34:04 10:34:05 10:34:06
10:34:07 10:34:08 10:34:10 10:34:11 10:34:13 10:34:14
# Counter left above the cap on both goals
sqlite3 -readonly ~/.polyscope/polyscope.db \
"select status, iterations_completed, max_iterations from autopilot_meta;"
goal-a | running | 28 | 25
goal-b | paused | 28 | 25
# One iteration consumed per failed attempt
sqlite3 -readonly ~/.polyscope/polyscope.db \
"select am.worktree_id,
am.iterations_completed,
(select count(*) from messages m
join sessions s on s.id = m.session_id
where s.worktree_id = am.worktree_id
and m.role = 'assistant'
and m.content like '%session limit%') as failed_attempts
from autopilot_meta am;"
goal-a | 28 | 23 -> 28 - 23 = 5 real iterations (4 completed + 1 in progress)
goal-b | 28 | 22 -> 28 - 22 = 6 real iterations (6 completed)
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 20
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de beyondcode/polyscope-community
-
[Bug]: Remote branch selection uses an unresolved local branch name when creating a workspace Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
[Bug]: Large workspace causes permanent server reconnect loop when a remote client subscribes Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
beyondcode/polyscope-community#198 · 1 comentario · 1 reacción ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
beyondcode/polyscope-community#189 · 1 comentario · 2 reacciones ·
Todos los issues de beyondcode/polyscope-community
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
crossplane/crossplane#7859 ·
-
bot:ai-assisted component:compact-js status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
midnightntwrk/midnight-sdk#403 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nightscout/nocturne#1379 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
octobercms/october#6130 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ClickHouse/clickhouse-connect#1057 ·