#14378: fix(cli-runner,media,cron): recognize Anthropic cache tokens, allow TTS files, and fix isolated jobs
docs
agents
stale
size: M
Cluster:
Cron Job Enhancements
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
#15294: fix(cron): reset token counters when creating new isolated session
by Elarwei001 · 2026-02-13
67.2%
#23501: fix(cron): force new session ID for isolated cron jobs (#23470)
by stakeswky · 2026-02-22
67.0%
#21110: fix(tts): deliver audio via structured mediaUrl instead of MEDIA: t...
by hydro13 · 2026-02-19
66.5%
#19385: fix: pass authProfileId from cron session to runEmbeddedPiAgent
by gigi-trifle · 2026-02-17
66.1%
#6315: fix(cron): persist isolated sessions (fixes #6217) - attempt 2
by ChaitanyaSai-Meka · 2026-02-01
65.5%
#6801: docs: add token optimization guidance for isolated cron sessions
by ProofOfReach · 2026-02-02
65.1%
#14483: fix(cli-runner): map Anthropic cache_creation_input_tokens
by AlexAnys · 2026-02-12
65.1%
#18144: fix(cron): clear stuck runningAtMs after timeout and add maintenanc...
by taw0002 · 2026-02-16
65.0%
#16996: fix(cron): parse Telegram topic target format for announce delivery
by Glucksberg · 2026-02-15
64.5%
#23086: fix(cron): surface channel resolution error for isolated sessions w...
by hydro13 · 2026-02-22
64.4%