Skip to content

Conversation

@fyzanshaik
Copy link

Fixes #5813

Adds a chat agent that bypasses project context and tool injection, significantly reducing token usage for general queries.

Changes

  • agent.ts: Added context: "none" | "full" to agent schema and registered a native chat agent with tools disabled.
  • llm.ts: Modified header/provider prompt logic to skip system instructions when context is "none".
  • prompt.ts: Bypassed injection of environment details and the file tree for "none" context agents.

Notes

  • Edge Case: Session history remains when switching agents; only new requests are minimized.
  • Discussion: Should switching to chat mode offer to reset the session for a truly fresh start?

@rekram1-node
Copy link
Collaborator

rekram1-node commented Dec 21, 2025

Idk if we want to add this mode rn so maybe better as plugin?, I do think you are able to customize all the system message stuff via experimental plugins rn but we should prolly look into a way to override it or set it in agents better

@fyzanshaik
Copy link
Author

fyzanshaik commented Dec 21, 2025

@rekram1-node A plugin sounds better, I'll look into building a plugin. But a chat mode with minimal prompt injection could be a potential mode people would love to use, I use opencode quite a lot-switching to a web app for simple query requests is not a good experience. Many times I would simply want to learn-understand a specific file or invoke a function call (eg: reading the directory structure of an open source project) and get on with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add "Raw Chat" Agent for Context-Free Interaction

2 participants