Summary
I would like cli-jaw to support a pre-prompt / runtime context hook that runs before normal user messages are sent to the model.
The goal is to inject short-lived user intent or temporary context, such as "for the next hour, keep responses concise" or "for this project, use this terminology", without permanently editing the main system prompt or long-term memory.
Motivation
Currently, recurring heartbeat jobs can be defined in heartbeat.json, and their prompts/results are handled by the heartbeat system. However, for normal user conversations, there does not seem to be a clear user-configurable hook that runs before prompt assembly.
Without such a hook, an agent has to remember to manually read a file like sticky_notes.md or ribbon.md after the model is already invoked. This works sometimes, but it is unreliable because the agent can forget to read it.
Desired behavior
Before each normal user message is sent to the model, cli-jaw should optionally run a user-configurable context provider, for example:
- read short-lived context from a file
- filter expired entries
- inject only relevant entries into the prompt
- place the injected block near the end of the prompt, below identity/core rules
- clearly mark it as low-priority temporary context
Example injected block:
## Temporary User Context
These are short-lived user intent notes.
They do not override system safety, core identity, or the current user request.
- Until 23:00, keep replies short and calm.
Possible API / config shape
{
"runtimeContext": [
{
"id": "sticky_notes",
"enabled": true,
"when": "before_user_message | before_heartbeat_job",
"command": "python3 /home/test/.cli-jaw/scripts/sticky_loader.py --mode conversation",
"position": "after_memory_runtime",
"maxChars": 2000,
"failMode": "ignore"
}
]
}
Important constraints
- The injected block should not override system/developer/core identity rules.
- Expired notes should not be injected.
- The hook should support empty output without affecting the conversation.
- The hook should be available for normal user conversations, not only heartbeat jobs.
- The feature should avoid requiring the agent itself to remember to read a file.
- Ideally, the hook should support both normal user conversations and heartbeat jobs, with different scopes such as
conversation, briefing, brainloop, or approval.
Use case
This would allow temporary prompt overlays such as:
- "For the next hour, do not proactively suggest new work."
- "Until tonight, keep responses short."
- "For this project, use this terminology."
- "During this session, prioritize debugging over emotional tone."
This avoids bloating the permanent system prompt and avoids storing temporary instructions in long-term memory.
Environment
- OS: ubuntu lxc
- cli-jaw version: 2.0.1
- model backend: gemini-cli
- transport: web, telegram
Summary
I would like cli-jaw to support a pre-prompt / runtime context hook that runs before normal user messages are sent to the model.
The goal is to inject short-lived user intent or temporary context, such as "for the next hour, keep responses concise" or "for this project, use this terminology", without permanently editing the main system prompt or long-term memory.
Motivation
Currently, recurring heartbeat jobs can be defined in
heartbeat.json, and their prompts/results are handled by the heartbeat system. However, for normal user conversations, there does not seem to be a clear user-configurable hook that runs before prompt assembly.Without such a hook, an agent has to remember to manually read a file like
sticky_notes.mdorribbon.mdafter the model is already invoked. This works sometimes, but it is unreliable because the agent can forget to read it.Desired behavior
Before each normal user message is sent to the model, cli-jaw should optionally run a user-configurable context provider, for example:
Example injected block:
Possible API / config shape
{ "runtimeContext": [ { "id": "sticky_notes", "enabled": true, "when": "before_user_message | before_heartbeat_job", "command": "python3 /home/test/.cli-jaw/scripts/sticky_loader.py --mode conversation", "position": "after_memory_runtime", "maxChars": 2000, "failMode": "ignore" } ] }Important constraints
conversation,briefing,brainloop, orapproval.Use case
This would allow temporary prompt overlays such as:
This avoids bloating the permanent system prompt and avoids storing temporary instructions in long-term memory.
Environment