[PR #5818] feat: add raw chat agent #11603

Open
opened 2026-02-16 18:16:29 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5818

State: open
Merged: No


Fixes https://github.com/sst/opencode/issues/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?
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5818 **State:** open **Merged:** No --- Fixes [https://github.com/sst/opencode/issues/5813](https://github.com/sst/opencode/issues/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?
yindo added the pull-request label 2026-02-16 18:16:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11603