3f9aa5d10b
Detect prompt cache misses per turn by comparing each assistant message's cache reads against the previous request's prompt tokens (core/cache-stats.ts). Significant misses emit a warning-colored transcript notice at the turn they occur, noting idle gaps past the cache TTL and model switches when relevant. /session gained cache statistics: a compact token/cache breakdown with hit rate, a $-prefixed cost section with per-model cost breakdown, and the cumulative cost re-billed due to cache misses.
Coding agent suite tests
Use test/suite/ for the new harness-based test suite around AgentSession and AgentSessionRuntime.
Rules:
- Use
test/suite/harness.ts - Use the faux provider from
packages/ai/src/providers/faux.ts - Do not use real provider APIs, real API keys, network calls, or paid tokens
- Keep these tests CI-safe and deterministic
- Do not use or extend the legacy
test/test-harness.tspath unless a missing capability forces it
Organization:
- Put broad lifecycle and characterization tests directly under
test/suite/ - Put issue-specific regression tests under
test/suite/regressions/ - Name regression tests as
<issue-number>-<short-slug>.test.ts - Example:
test/suite/regressions/2023-queued-slash-command-followup.test.ts