Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug]: After a fresh auto-restart the new session is told "Post-Compaction Context Recovery" — the agent then reports a compaction that never happened

Abierto Apto para principiantes
#96 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, shell

Línea de trabajo

Empieza por agents/context/post-compact-resume.sh, especialmente por el manejo de SOURCE_TAG, el contexto emitido, la entrada .budget-status y el comentario de reinicio descrito en el issue. Rastrea cómo recibe el hook el origen y cómo el sentinel de auto-restart identifica una sesión nueva. Actualiza la redacción y el origen registrado para cada caso; el trabajo estará terminado cuando auto-restart se describa como una sesión nueva y compact y resume mantengan descripciones precisas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area:context bug severity:low status:fixed-on-bleeding-edge triaged
Bug Description

agents/context/post-compact-resume.sh serves three SessionStart sources (compact, resume, and startup when claude-fw left the .auto-restart-pending sentinel). It reads the source into SOURCE_TAG and uses it to decide whether to run and whether to advance the loop counter, but the text it emits is the same for all three:

  • line 143: CONTEXT="# Post-Compaction Context Recovery (automatic)
  • line 121: "source": "post-compact-resume" written to .context/working/.budget-status
  • line 409: "This context was auto-injected by the session resume hook"
  • the block also carries a "Post-Compact Budget Note" that speaks of "this resumed session".

With the fresh restart that is the default since T-3166, the conversation is entirely gone from context: new session, new transcript. That one case is described with the words of the cases where the conversation is summarised (compaction) or restored (resume). The comment at lines 45 to 47 still describes the restart as "claude-fw → claude -c".

Steps to Reproduce
  1. grep -n 'Post-Compaction Context Recovery\|"source": "post-compact-resume"' agents/context/post-compact-resume.sh
  2. grep -n 'SOURCE_TAG' agents/context/post-compact-resume.sh — the tag never reaches the title.
  3. Live: start a session with claude-fw, default restart mode, and let it reach the budget cap. Read the first context block of the new session, then ask the agent what happened.

Steps 1 and 2 were run on 1.8.6 and again on 1.8.11 (e42aa41bf): same lines, same numbers. Step 3 was observed once on 1.8.6.

Expected Behavior

The injected block says what happened: a new session after a budget auto-restart, the previous conversation not in this context, everything below coming from the handover. It gives the identifier of the previous Claude session and the way to reopen it. .budget-status records the real source.

Actual Behavior

The operator asked: "what happened? is the conversation empty?" The agent, reading "Post-Compaction Context Recovery" and a budget status whose claude_session_id was its own, answered that a compaction had taken place in the same session. Both statements were wrong. It found the truth only by reading bin/claude-fw and the process list, and had to retract its first answer.

fw doctor output

AI Agent

Claude Code

Operating System

Linux

Additional Context

Version: 1.8.11 (e42aa41bf), vendored consumer. First observed on 1.8.6; the quoted lines of agents/context/post-compact-resume.sh are unchanged in 1.8.11.

Related: the documents still describe the restart as claude -c (reported separately).

Suggestions:

  1. Choose the title and the wording from SOURCE_TAG and the sentinel.
  2. For a fresh auto-restart, give the previous Claude session identifier and mention claude --resume.
  3. Write the real source in .budget-status (auto-restart, compact or resume).
  4. Update the comment at lines 45 to 47.
Lenguaje dominante
Shell
Estrellas
16
Forks
6
Merge medio
6 h 24 min
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DimitriGeelen/agentic-engineering-framework

Todos los issues de DimitriGeelen/agentic-engineering-framework

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.