5 ms·
I don't think that is true. It would be extremely noticeable (zero caching) and I am not noticing it.
by FeepingCreature 24d ago
I don't think that is true. It would be extremely noticeable (zero caching) and I am not noticing it.
- LoganDark 24d agoThe first messages in the transcript are a dynamically generated system prompt that are recalculated every request and not persisted. This is just how OpenCode works. If the inputs to the calculation do not change, then it won't invalidate the cache, but whenever the inputs do, it does invalidate the cache. From the latest commit on the dev branch, here is the code that generates the system messages from scratch: https://github.com/anomalyco/opencode/blob/03521003fafdc6d340de6a36a189e3c121b07d40/packages/opencode/src/session/system.ts https://github.com/anomalyco/opencode/blob/03521003fafdc6d34... and here is the code that dynamically re-generates the system messages on every completion: https://github.com/anomalyco/opencode/blob/03521003fafdc6d340de6a36a189e3c121b07d40/packages/opencode/src/session/llm/request.ts#L58-L112 https://github.com/anomalyco/opencode/blob/03521003fafdc6d34... Regardless of how many invalidations occur in practice, this is not okay. You cannot just regenerate the start of the transcript dynamically throughout a session from things that change as frequently as current working directory. That's the worst etiquette I've ever seen in a harness.
- FeepingCreature 24d agoOh, to build the skills prompt. Right, now it makes sense. Should be noted that in normal circumstances this should change very rarely. I think it makes sense because the models aren't trained to pick up tool changes in mid-operation.
- LoganDark 24d agoI don't really care that it changes when the user manually makes updates to skills or MCP servers. I do however care that it changes with the current date and the current working directory. Note that it includes both the project directory and the current working directory. Any time a command is run that changes the working directory and doesn't change it back, the whole transcript has to be reprocessed. Other stuff like CLAUDE/AGENTS.md being re-read from scratch each turn I'm still not a huge fan of, but it's not as big of a problem. IMO, the system messages should not change retroactively during the normal course of the session, only with the agent configuration. That does include skills and tools and etc., but should not include anything like the current working directory, which can change constantly during a session!
- FeepingCreature 24d agoHuh. I agree that's very bad. I guess Qwen 3.8 just doesn't do that very often... I can see the logic for skills, but working dir and current date should definitely be fixed, maybe with an injection on change.