Working-memory bookmark records a slash-command caveat as the session goal
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js
- Ambito
- backend
Direzione di ricerca
Inizia da integrations/claude-code-plugin/lib/working-memory.mjs, in corrispondenza di firstUserPrompt, poi confronta il suo filtraggio delle righe con lib/session-brief.mjs:157 e lib/test-gate.mjs:1090. Esegui il comando di riproduzione nell’issue e controlla entrambe le copie del plugin, compreso lib/working-memory.mjs del plugin Codex. Il lavoro è completo quando le righe di caveat e le ripetizioni locali dei comandi vengono ignorate, un comando con argomenti può ancora essere usato come obiettivo e le sessioni senza una richiesta digitata mantengono il fallback del journal.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Company
ClickHouse
Component
Agent plugin (Claude Code, Codex, Cursor)
Describe what's wrong
The Stop hook's working-memory bookmark (block session:<project>) records the text Claude Code injects for a local slash command as the session's goal:, not the person's first request. A session that starts with /clear is saved as:
goal: <local-command-caveat>The command below was run directly in Claude Code, not sent to you as a request…
The next session's primer shows that line as the goal of the work it resumes.
firstUserPrompt (integrations/claude-code-plugin/lib/working-memory.mjs:40) skips sidechain rows and tool results. It does not skip rows the client wrote itself: the isMeta: true caveat row, and the <command-name>/clear</command-name> row that echoes the command. lib/session-brief.mjs:157 and lib/test-gate.mjs:1090 already skip isMeta rows. The Codex plugin's lib/working-memory.mjs is the same file.
Does it reproduce on the latest release or main?
Yes
How to reproduce
From the repository root on main:
node --input-type=module -e '
import { firstUserPrompt } from "./integrations/claude-code-plugin/lib/working-memory.mjs";
const rows = [
{ type: "user", isMeta: true, message: { role: "user", content: "<local-command-caveat>Caveat: ...</local-command-caveat>" } },
{ type: "user", message: { role: "user", content: "<command-name>/clear</command-name>\n<command-message>clear</command-message>\n<command-args></command-args>" } },
{ type: "user", message: { role: "user", content: "fix the failing search test" } },
];
console.log(JSON.stringify(firstUserPrompt(rows)));
console.log(JSON.stringify(firstUserPrompt(rows.slice(1))));
'
The first line prints the caveat. The second, with the caveat row removed, prints the /clear echo. Both should print "fix the failing search test".
In a live session: start Claude Code with the plugin, run /clear, send a request, end the session, then read the session:<project> working-memory block.
Expected behavior
goal: holds the first request the person typed. firstUserPrompt skips isMeta rows and the echoes of local commands (<command-name> with empty <command-args>, <local-command-stdout>). A command with arguments, such as /<skill> <args>, is a request and can stand as the goal in that form. A session with no typed request falls back to the turn journal, as it does today.
Environment
mainatb97367188600bb12a5c3acdd4ac25903019b0b44- Claude Code and Codex plugins 1.2.158
- Node 25.8.0
How this was found
An AI tool found it, and I have not reproduced it myself
Additional context
It happens in every session whose first input is a local slash command such as /clear or /model: the transcript starts with the caveat row, then the command echo, then the request.
Redaction
- I removed tokens, keys, passwords and personal or customer data from everything above.
- Lingua principale
- Python
- Stelle
- 263
- Fork
- 47
- Merge medio
- 14h 13m
- PR unite (30g)
- 868
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un 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 ClickHouse/loom
-
Options of loom reconcile, reembed, settings history and code lint-instructions print no help textApertabug good first issue help wanted up-for-grabs
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/loom#2072 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
ClickHouse/loom#2014 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Options of loom period-digest, reextract, reconcile-status and demote-activity-narration print no help textForse già presa @VanshajPoonia l’ha presa 1 giorno fa. Apertabug good first issue help wanted up-for-grabs
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/loom#1988 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted up-for-grabs
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
ClickHouse/loom#2079 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted up-for-grabs
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
ClickHouse/loom#2078 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ClickHouse/loom
Issue simili
-
roadmap/v1.3.0 scope/entitlement type/improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
databrickslabs/ontos#1778 ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itselfForse già presa @fedonman l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 69/100
StevenBlack/hosts#3314 ·
-
task
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
SparseLinearAlgebra/spla#316 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
kajisho5/ffmpeg-skill#861 ·
I maintainer di solito rispondono entro 1 giorno