Key Info

OpenCode gives the agent access to its own API, so it can query the history of the current session and run targeted searches that avoid bloating the context window. In the example shown, the agent looks up how it previously handled Uber Eats, recovering information that had been lost during compaction.

Highlights

  • The agent can query its own session history through OpenCode's API.
  • Combined with codemode, searches are targeted rather than dumping history into context.
  • This recovers details dropped when the context was compacted.
  • Demonstrated use case: recalling a past Uber Eats interaction.