Repository navigation
Description
This is an issue to track the request/discussion of adding two features from Claude Code: Memories and Shell Commands (bash).
In Claude Code, you can add memories to CLAUDE.md simply by prefixing your prompt with #. This is a convenient way to prompt your prompts; build your persistent context window (CLAUDE.md or AGENTS.md file) using the model to do so. Perhaps this feature could be replaced with a custom command like /memory though I cannot seem to find documentation on defining custom slash-commands, nor would /memory be as clean as using #. Perhaps a opening up the input parsing to be able to customize how to handle inputs with some kind of plugin system could be an alternative. Though, memories are really nice to maintaining the long-term training of your model per project/globaly.
Shell commands with ! is very useful if you know you want to bring some command's output into context before prompting. Being able to control whether your shell command should go into the next prompt would be a feature above and beyond what Claude Code does. If you know what command for the LLM to run, you can save tokens by running it for them, then prompting with the output. This sort of shell+LLM shuffling is a very nice UX and perhaps there could be more ways to go about this. Warp does this shell+agent integration very well by automatically detecting whether input is a bash command or if its a shell command.
These two features in Claude Code work really well and I'd love to see equivalent solutions to the two problems the features solve:
- I need a way to prompt my prompts and save that for the future so it gets smarter (memories)
- I need a way to just run a bash script/command so I can manage the context and save time/tokens (shell commands)
Activity
samholmes commentedon Jul 22, 2025
A Tangent
What if, as a plugin architecture, you can configure a preprocessor prompt which will preprocess your input before sending it to your session context? In your config, you can define which model will preprocess your input and a markdown file to use for the context of preprocessing. For example:
{ "plugins": { ".*": { "model": "local/llama...", "prompt": "PREPROCESSOR.md" } } }In this example we define a match-all plugin using a regex
.*to match against the input. The model we chose is some local model we have defined in our config. The prompt we defined in aPREPROCESSOR.md. The input to the model is the markdown file and the input being preprocessed. The output is then used in the main session context after completing the preprocessing using this plugin.In addition to this trivial example, other config options could enable tools and other things for the plugin. I imagine some special tools for plugin for managing the opencode could be provided to the plugin context so that plugins can edit configuration files, session context, etc. These sorts of things can be added to the plugin infrastructure over time.
You can imagine how the Memories feature could be matching using this regex
^#and the tools to read/write the AGENTS.md file.In order to do shell commands, you'll actually want to skip the model entirely, so perhaps the plugin can be configured to simply run a bash script with
$0as the input (so^!as the regex and"script": "zsh -c $0").This would be a very powerful, meta vibe-coding feature.
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!