mods icon indicating copy to clipboard operation
mods copied to clipboard

Problem writing to the cache

Open Art-S-D opened this issue 5 months ago • 6 comments

Describe the bug

Since v1.8.0 conversations are not saved and I get an error message saying there was a problem writing to the cache.

Image

Setup

Please complete the following information along with version numbers, if applicable.

  • OS: macOs
  • Shell: zsh
  • Terminal Emulator: alacritty
  • Terminal Multiplexer: none
  • Model: gemini-2.0-flash

Art-S-D avatar Jul 08 '25 09:07 Art-S-D

The problem seems to be Gemini specific. If title is not specified explicitly it is constructed from the last prompt. This is done by retrieving the messages from the API provider (through the Messages generic function). However Gemini does not support that functionality as noted in google.go:Messages and returns nil instead. This causes title to be empty and to violate the database check constraint.

quidnu avatar Jul 09 '25 21:07 quidnu

The problem seems to be Gemini specific. If title is not specified explicitly it is constructed from the last prompt. This is done by retrieving the messages from the API provider (through the Messages generic function). However Gemini does not support that functionality as noted in google.go:Messages and returns nil instead. This causes title to be empty and to violate the database check constraint.

@quidnu My issue is worse, I can't even run any prompt at all. And looking at everyone else who submitted issues, they are getting the same problem:

mods "test"

ERROR Could not open database.

could not ping db: unable to open database file: out of memory (14): Unable to open the database file (SQLITE_CANTOPEN)

TPhakisi avatar Jul 10 '25 12:07 TPhakisi

@quidnu That looks like it, I tried re running my example with a title set manually and it worked

Image

Art-S-D avatar Jul 16 '25 09:07 Art-S-D

@Art-S-D Try using "mods -l" and scroll to that same conversation and use 'mods -c conversation code "prompt" ' and please let me know if it continues the conversation. Mine fails to recall the conversation

TPhakisi avatar Jul 16 '25 11:07 TPhakisi

@TPhakisi Nope, the conversation isn's saved so I can't even get the conversation id

Art-S-D avatar Jul 24 '25 08:07 Art-S-D

@caarlos0 hey Carlos, it seems this cache issue is still persistent

TPhakisi avatar Jul 24 '25 08:07 TPhakisi