Skip to content

feat: migrate prompt caching logic to Amp SDK native caching #241

@rubenmarcus

Description

@rubenmarcus

Summary

Replace ralph-starter's current prompt caching implementation with Amp SDK's built-in caching for cost optimization.

Linear: ENG-1468

Current State

Ralph-starter has custom prompt caching logic. Amp SDK provides native caching that could be more efficient and maintained by the Amp team.

Implementation

  1. Identify current caching touchpoints in the codebase
  2. Map them to Amp SDK's native caching API
  3. Implement adapter/wrapper for non-Amp agents (keep existing caching for Claude Code, etc.)
  4. For Amp agent: delegate caching entirely to Amp SDK

Files

  • src/loop/executor.ts (caching integration points)
  • Potentially new: src/loop/cache.ts (cache abstraction)

Depends On

  • Issue K (Research — understand Amp's caching API)
  • Issue L (Agent abstraction)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions