Uh oh!
There was an error while loading. Please reload this page.
feat: allow overriding system prompt date via OPENCODE_DATE env var - #28546
feat: allow overriding system prompt date via OPENCODE_DATE env var#28546nilo85 wants to merge 1 commit into
Conversation
Enables deterministic LLM request replay in CI integration tests by fixing the date string in the system prompt.
nilo85
commented
May 20, 2026
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |

Enables deterministic LLM request replay in CI integration tests by fixing the date string in the system prompt.
Issue for this PR
Type of change
What does this PR do?
The system prompt in session/system.ts includes a dynamic Today's date: ${new Date().toDateString()} line. This makes it impossible to match recorded LLM requests when replaying them in CI integration tests, since the date changes every day.
This PR adds an OPENCODE_DATE environment variable that overrides the date string when set, falling back to the real date otherwise. It follows the established RuntimeFlags pattern used for other runtime overrides in the project.
How did you verify your code works?
I built it locally, and ran:
Then I verified the system promt in the capture of llama-swap (see comment)
Screenshots / recordings
N/A — no UI changes.
Checklist