Skip to content

fix: clear empty husks for pending prompts; if no graph, debug recall log, not error - #379

Merged
siillee merged 2 commits into
mainfrom
feature/sdk-469-pending-dir-accumulates-empty-husk-files-graph-scope-404
Aug 31, 2026
Merged

fix: clear empty husks for pending prompts; if no graph, debug recall log, not error#379
siillee merged 2 commits into
mainfrom
feature/sdk-469-pending-dir-accumulates-empty-husk-files-graph-scope-404

Conversation

@siillee

@siillee siillee commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

claude-code + codex, identical changes.

  • pending/ husks: pop_pending_prompt() now unlinks the buffer file when the
    last entry is consumed instead of writing {} back (one 2-byte husk per session,
    forever). A pop against nothing no longer creates a file. The SessionStart sweep
    also removes existing {} husks immediately (pending_husks in state_sweep).
  • graph-scope 404: a 404 from /api/v1/recall on the ["graph"] scope — a fresh
    dataset with no graph yet — is logged as recall_graph_not_built and kept out of
    recall_error and the health accounting. Every other scope and status code is
    reported as before.

@siillee siillee self-assigned this Aug 28, 2026
@siillee siillee added the core-team Core-team authored/owned PR label Aug 28, 2026
@github-actions

Copy link
Copy Markdown

Two file-cleanup fixes that somehow avoided deleting production — a modern miracle given the unlink count. 🗑️

🟢 No blocking issues found.

Minor observations:

  • The graph 404 special-case assumes all 404s mean "dataset not built yet" rather than checking the error body for DatasetNotFoundError — could theoretically hide endpoint routing issues, though the error still logs to recall_graph_not_built so it's observable.

See inline comments for details.

No fixes needed — ship it.

Comment thread integrations/claude-code/scripts/session-context-lookup.py
@siillee
siillee merged commit 6478b6c into main Aug 31, 2026
14 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-team Core-team authored/owned PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant