Skip to content

Dismissing a running search discards the result but doesn't abort the crawl — the spend continues #46

Description

@mpstaton

The queue's per-card × (and search.dismiss generally) deletes the registry entry: honest for triage, but a RUNNING crawl keeps executing in prompt-runner — the Anthropic turn isn't aborted, so the billing continues and the result lands in the void. Observed live 2026-07-24 during the NYT streams crawls.

Fix shape: crawls get the prompt.run.cancel treatment — an AbortController per in-flight crawl in prompt-runner keyed by (org_slug, target) or a crawl_id, a organization.crawl.cancel NATS subject, and searches.ts's dismissSearch firing it when the dismissed entry is queued/running. The card × then means what the operator thinks it means.

Related: search-results queue spec (#42, PR #43); the web-search cap (CRAWL_MAX_WEB_SEARCHES) bounds the worst case meanwhile.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions