Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue 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

Aperta Adatta ai principianti
#96 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash, shell

Direzione di ricerca

Inizia da agents/context/post-compact-resume.sh, in particolare dalla gestione di SOURCE_TAG, dal contesto emesso, dalla voce .budget-status e dal commento sul riavvio descritto nell’issue. Ricostruisci come l’hook riceve la sorgente e come il sentinel di auto-restart identifica una nuova sessione. Aggiorna la formulazione e la sorgente registrata per ciascun caso; il lavoro è completato quando l’auto-restart è descritto come una nuova sessione e compact e resume mantengono descrizioni accurate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:context bug severity:low status:accepted 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.
Lingua principale
Shell
Stelle
16
Fork
6
Merge medio
6h 24m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DimitriGeelen/agentic-engineering-framework

Tutte le issue di DimitriGeelen/agentic-engineering-framework

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.