Skip to content

Feature: /opencode:consult for persistent multi-turn Q&A sessions #25

@JohnnyVicious

Description

@JohnnyVicious

Motivation

Users want a stable, multi-turn consult loop with OpenCode — the kind of "let me ask a follow-up" pattern that works naturally in an interactive chat but doesn't cleanly fit today's one-shot commands. /opencode:rescue --resume-last already supports continuing a task session, but it's framed as rescue work, not Q&A, and the prompt is task-oriented.

Proposed UX

/opencode:consult "walk me through how sendPrompt handles SSE"
/opencode:consult "follow-up: what happens on stream disconnect?"

Each invocation:

  1. Reuses the most recent consult-type job's OpenCode session unless --fresh.
  2. Runs under the plan (read-only) agent so the assistant can't accidentally modify files during exploratory Q&A.
  3. Persists the full conversation context across invocations via OpenCode's own session storage — which the HTTP client already supports; we just need to expose it as a distinct command.

Implementation sketch

  • New command plugins/opencode/commands/consult.md.
  • New job type consult in createJobRecord.
  • Handler reuses handleTask's resume logic, but with agent: "plan" forced and a prompt template that explicitly frames the session as "exploratory conversation, not a task".

Upstream reference

Derived from openai/codex-plugin-cc#7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions