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:
- Reuses the most recent
consult-type job's OpenCode session unless --fresh.
- Runs under the
plan (read-only) agent so the assistant can't accidentally modify files during exploratory Q&A.
- 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.
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-lastalready supports continuing a task session, but it's framed as rescue work, not Q&A, and the prompt is task-oriented.Proposed UX
Each invocation:
consult-type job's OpenCode session unless--fresh.plan(read-only) agent so the assistant can't accidentally modify files during exploratory Q&A.Implementation sketch
plugins/opencode/commands/consult.md.consultincreateJobRecord.handleTask's resume logic, but withagent: "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.