Repository navigation
fix(agent): keep system prompt cache-friendly #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
itsskofficial
merged 12 commits into
existence-master:main
from
riddhigupta1110:fix/93-cache-friendly-system-prompt
Oct 11, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
16467fa
Make system prompt cache-friendly
riddhigupta1110 38da953
Merge branch 'main' into fix/93-cache-friendly-system-prompt
riddhigupta1110 42f93da
Merge branch 'main' into fix/93-cache-friendly-system-prompt
riddhigupta1110 c70ea85
Merge branch 'main' into fix/93-cache-friendly-system-prompt
riddhigupta1110 9b17b95
Merge branch 'main' into fix/93-cache-friendly-system-prompt
riddhigupta1110 b521297
Merge remote-tracking branch 'origin/main' into pr125-merge
itsskofficial bf19d7e
address maintainer review feedback
riddhigupta1110 08cd677
Merge branch 'existence-master:main' into fix/93-cache-friendly-syste…
riddhigupta1110 efbd74f
Merge branch 'main' into fix/93-cache-friendly-system-prompt
riddhigupta1110 7807870
fix: move clock context to latest user message
riddhigupta1110 7305edf
Merge branch 'existence-master:main' into fix/93-cache-friendly-syste…
riddhigupta1110 2419f7d
Merge branch 'fix/93-cache-friendly-system-prompt' of https://github.…
riddhigupta1110 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Handle an unresolved timezone before formatting the time note.
If
config.assistant.timezonenames an unknown zone,resolve_tzreturnsNone.datetime.now(None)then uses local time, and the model receives a note labeled(None). Use an explicit fallback timezone or report the configuration error before adding the note. As per coding guidelines, “Models are roles the user controls” and “Each turn the system prompt carries … the clock”; the model-facing clock must identify its timezone.🤖 Prompt for AI Agents
Source: Coding guidelines
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
rg -n -i "clock|current time|system prompt|decision|ADR" AGENTS.md sentient docs/ARCHITECTURE.md docs/adr git diff --name-status 6419445f00368d9652c622d8c26aff35fc22c23f b521297b41c0dc61962c435a22732c0576f0d4cc -- docs/ARCHITECTURE.md docs/adr AGENTS.md sentient/agent/prompt.py sentient/agent/loop.pyRepository: existence-master/Sentient
Length of output: 39041
Record the prompt-architecture change in an ADR.
docs/ARCHITECTURE.mdrequires each system prompt to carry the clock. This change moves the clock to the user message, which reverses that documented architecture decision.AGENTS.mdand ADR 0001 require a new ADR when a documented architecture decision changes.Suggested fix
+docs/adr/00NN-clock-placement-in-user-message.md🤖 Prompt for AI Agents