Workspace removal deletes a sub-agent's spend when the usage roll-up fails
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
Start in the workspace removal path of src/node/services/workspaceService.ts, where rollUpUsageIntoParent and rollUpTimingIntoParent are called before the child's session folder under ~/.xum/sessions is deleted. Trace how getSessionUsage errors are caught and logged, then make a roll-up throw in a test to reproduce the lost session-usage.json. Done when a failed roll-up no longer deletes the only copy of the child's spend, either by retrying once or by keeping the usage file, and a test covers that path. Pick an option with a maintainer first, since the issue lists two.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When workspace removal cannot roll a sub-agent's usage into its parent, Xum still deletes the sub-agent's session folder. The parent then loses that sub-agent's spend for good.
Where
WorkspaceService removal path (src/node/services/workspaceService.ts, the rollUpUsageIntoParent call). A failure in getSessionUsage or rollUpUsageIntoParent (for example a one-time EIO) is caught and logged with log.error("Failed to roll up child session usage into parent"). Removal then continues and deletes ~/.xum/sessions/<child>/, which holds the only copy of session-usage.json.
The timing roll-up just above it (rollUpTimingIntoParent) has the same shape.
Expected
A failed roll-up does not destroy the only copy of the child's spend. Options:
- Retry the roll-up once before deleting the folder.
- Keep the child's usage file (or move it under the parent) when the roll-up fails, so a later read can fold it in.
Context
Found during #7862 follow-up work (a prep owner on #7868 reported it). It does not fail a user action, so it was out of scope there. The behavior exists on main today (96a0916ecc).
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.1k
- Forks
- 139
- Merge medio
- 4 h 38 min
- PR fusionados (30 d)
- 926
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
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 coder/xum
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
🤖 fix: xum api exits 0 when a procedure returns success: falsePosiblemente ocupada @twotnguyen la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
coder/xum#7733 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
duolicious/duolicious#1943 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
nightly-labs/openbot#6451 ·
Los mantenedores suelen responder en 1 día
-
complexity: easy good first issue impact: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ueberdosis/hocuspocus#1211 ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
redhat-developer/rhdh-plugin-export-overlays#4733 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
S-Needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días