Template deprecation in Coolhand is permanent. Once a template is marked as deprecated, there is no API endpoint, dashboard action, or agent tool to un-deprecate or reactivate it.
If a template was deprecated by mistake, you can recover by creating a new active template with the same settings.
What happens when a template is deprecated
When a template is deprecated:
- Matching stops immediately: Coolhand completely excludes deprecated templates from prompt matching. New incoming logs will never route to a deprecated template, even if their prompt text matches its patterns.
- Traffic routes to Unmatched: If no other active template matches the incoming requests, those logs route to your client's Unmatched bucket.
- Evaluations stop: Automated evaluations are not scheduled for deprecated templates.
- Historical logs and metrics remain: Past logs, token counts, feedback, and metrics associated with the deprecated template are preserved and remain accessible.
- API visibility: Deprecated templates are omitted by default from
GET /api/v2/llm_request_templates, but you can include them by passinginclude_deprecated=true. Fetching a template directly by ID viaGET /api/v2/llm_request_templates/{id}always returns the template, even when deprecated.
How to restore prompt routing
To restore log routing after an accidental deprecation, create a new replacement template.
Restoring pattern-matched templates
For templates that route logs using prompt regular expressions:
- Retrieve the original patterns and configuration: Fetch the deprecated template by its ID using
GET /api/v2/llm_request_templates/{id}or through template search with deprecated templates included. Copy theuser_prompt_pattern,system_prompt_pattern, prompt group, and workload ID. - Create and publish a new template: Create a new template with the desired prompt patterns assigned to your workload, and publish it.
- Automatic rematching: As soon as the new template is published, Coolhand automatically runs a rematch across your Unmatched logs. Any logs that accumulated in the Unmatched bucket while the template was deprecated will be evaluated against the new template and associated accordingly.
Restoring declared templates
If the deprecated template was a declared template managed programmatically:
- Choose a new external key: Deprecated templates permanently hold their
external_key. Attempting to recreate or update a template using a key held by a deprecated template will return an HTTP422 Unprocessable Entityerror. Select a new key (for example, appending a version suffix such asmy-template:v2). - Create the template via the API: Send a
PUTrequest to/api/v2/llm_request_templates/by_key/{external_key}with the new key and the targetworkload_idorworkload_key. For detailed instructions, see How do I create or update a template using an external key?. - Update your log collection calls: Update your application or SDK configuration to send the new external key in the
declaredblock of incoming log requests so future logs match the new template.