← Back to PRs

#14378: fix(cli-runner,media,cron): recognize Anthropic cache tokens, allow TTS files, and fix isolated jobs

by divol89 open 2026-02-12 01:28 View on GitHub →
docs agents stale size: M
This PR fixes three related issues: 1. **Anthropic cache token recognition** - Fixes the issue where toUsage() doesn't recognize Anthropic's cache_creation_input_tokens field, causing cache write tokens to be missing from usage tracking and cost calculations. 2. **TTS MEDIA path leakage** - Fixes the issue where TTS MEDIA: paths were being rejected due to absolute path restrictions, causing the path text to be visible in Telegram alongside the audio attachment. 3. **Cron isolated jobs not executing** - Fixes the issue where cron jobs with sessionTarget: "isolated" were not executing automatically, even though manual execution worked fine. The fixes: - Updates toUsage() to recognize all three cache token variants in order of preference - Modifies isValidMedia to allow temporary files from /tmp/ and /var/folders/ while maintaining security - Improves cron timer mechanism to ensure isolated jobs execute reliably - Adds comprehensive tests for all fixes Fixes #14366, #14365, and #14356

Most Similar PRs