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

Open
opened 2026-02-16 17:41:04 -05:00 by yindo · 2 comments
Owner

Originally created by @fyzanshaik on GitHub (Dec 19, 2025).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

Currently, every interaction with OpenCode—regardless of the agent selected—automatically injects a significant amount of context into the system prompt. This includes:

  • A file tree of the current directory (up to 200 files).
  • Environment details (OS, date, CWD).
  • Detailed system instructions for the specific agent.

For users on rate-limited APIs (e.g., Groq's free tier with ~10k token limits) or those paying per token (e.g., GPT-4), this overhead makes simple chat interactions prohibitively expensive or impossible. A simple "hey" can consume over 2,000 tokens immediately.


Proposed Solution

Introduce a built-in chat agent designed specifically for raw, low-overhead interaction.

This agent would:

  • Have a configuration flag (e.g., context: "none") to disable the automatic injection of the file tree and environment details.
  • Skip the standard, lengthy system instructions, using a minimal or empty system prompt instead.
  • Have tools disabled by default to further save tokens and focus on pure conversation.

Use Case

A user wants to ask a general coding question or brainstorm an idea without needing the AI to know about every file in their project. They can switch to the chat agent and have a lightweight conversation.


Considerations / Edge Cases

  • Switching Agents: If a user starts in plan mode (accumulating a large history) and switches to chat, the history remains. The chat agent will reduce the per-request overhead by removing the system prompt, but the existing session history will still consume tokens.
  • Warning: We might want to consider a warning if a user switches to chat mode in a session that already has a large history, though this is a secondary concern to the primary goal of reducing the baseline cost.

Below is a screenshot of "chat" implementation and how users could use it:

Image
Originally created by @fyzanshaik on GitHub (Dec 19, 2025). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ## Problem Currently, every interaction with OpenCode—regardless of the agent selected—automatically injects a significant amount of context into the system prompt. This includes: * A file tree of the current directory (up to 200 files). * Environment details (OS, date, CWD). * Detailed system instructions for the specific agent. For users on rate-limited APIs (e.g., Groq's free tier with ~10k token limits) or those paying per token (e.g., GPT-4), this overhead makes simple chat interactions prohibitively expensive or impossible. A simple "hey" can consume over 2,000 tokens immediately. --- ## Proposed Solution Introduce a built-in `chat` agent designed specifically for raw, low-overhead interaction. This agent would: * Have a configuration flag (e.g., `context: "none"`) to disable the automatic injection of the file tree and environment details. * Skip the standard, lengthy system instructions, using a minimal or empty system prompt instead. * Have tools disabled by default to further save tokens and focus on pure conversation. --- ## Use Case A user wants to ask a general coding question or brainstorm an idea without needing the AI to know about every file in their project. They can switch to the `chat` agent and have a lightweight conversation. --- ## Considerations / Edge Cases * **Switching Agents:** If a user starts in `plan` mode (accumulating a large history) and switches to `chat`, the history remains. The `chat` agent will reduce the *per-request* overhead by removing the system prompt, but the existing session history will still consume tokens. * **Warning:** We might want to consider a warning if a user switches to `chat` mode in a session that already has a large history, though this is a secondary concern to the primary goal of reducing the baseline cost. Below is a screenshot of "chat" implementation and how users could use it: <img width="1905" height="1023" alt="Image" src="https://github.com/user-attachments/assets/40ebb2a2-9979-4b9a-9bc9-03e7c3543f5e" />
yindo added the discussion label 2026-02-16 17:41:04 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 19, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #4096: Feature Request: Context Control for Subagents - requests ability to disable full repository context and file tree injection to reduce token usage
  • #1990: Add User Controls for Context Management - proposes /drop, /list, /tokens commands to manage context and keep sessions lightweight for pair programming
  • #1573: Save tokens by adding an ASK MODE - suggests an "ASK MODE" where tools, agents, and MCPs are ignored to avoid token overhead for simple conversations
  • #2637: Configuration to Limit Input Tokens per Request - requests ability to limit input tokens per request to control costs on long sessions

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 19, 2025): This issue might be a duplicate of existing issues. Please check: - #4096: Feature Request: Context Control for Subagents - requests ability to disable full repository context and file tree injection to reduce token usage - #1990: Add User Controls for Context Management - proposes `/drop`, `/list`, `/tokens` commands to manage context and keep sessions lightweight for pair programming - #1573: Save tokens by adding an ASK MODE - suggests an "ASK MODE" where tools, agents, and MCPs are ignored to avoid token overhead for simple conversations - #2637: Configuration to Limit Input Tokens per Request - requests ability to limit input tokens per request to control costs on long sessions Feel free to ignore if none of these address your specific case.
Author
Owner

@fyzanshaik commented on GitHub (Dec 19, 2025):

Issue #1573 kind of considers this but I am keeping this open for discussion if not will close it!

@fyzanshaik commented on GitHub (Dec 19, 2025): Issue #1573 kind of considers this but I am keeping this open for discussion if not will close it!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3675