[Bug]: After a fresh auto-restart the new session is told "Post-Compaction Context Recovery" — the agent then reports a compaction that never happened
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
- Ambito
- developer-experience
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
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
grep -n 'Post-Compaction Context Recovery\|"source": "post-compact-resume"' agents/context/post-compact-resume.shgrep -n 'SOURCE_TAG' agents/context/post-compact-resume.sh— the tag never reaches the title.- 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:
- Choose the title and the wording from
SOURCE_TAGand the sentinel. - For a fresh auto-restart, give the previous Claude session identifier and mention
claude --resume. - Write the real source in
.budget-status(auto-restart,compactorresume). - 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
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DimitriGeelen/agentic-engineering-framework
-
area:doctor bug severity:low status:accepted triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DimitriGeelen/agentic-engineering-framework#100 · 3 commenti ·
-
area:doctor bug severity:medium status:accepted triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DimitriGeelen/agentic-engineering-framework#97 · 3 commenti ·
-
area:cli bug severity:medium status:accepted triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DimitriGeelen/agentic-engineering-framework#95 · 3 commenti ·
-
area:watchtower bug severity:low status:released triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DimitriGeelen/agentic-engineering-framework#94 · 4 commenti ·
-
area:watchtower enhancement severity:low status:released triaged
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 75/100
DimitriGeelen/agentic-engineering-framework#91 · 5 commenti ·
Tutte le issue di DimitriGeelen/agentic-engineering-framework
Issue simili
-
uno-testing: the step-by-step procedure serializes tool use (1.7 vs 2.3 tools/call)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
unoplatform/studio#200 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
phusion/passenger-docker#480 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
quickemu-project/quickemu#1963 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
source:reader type:enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
stephrobert/blog-roadmap#95 ·