plan_mode

command
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Demonstrates WithInitialMode(ModePlan). opencode's plan mode ships with a permission ruleset that DENIES every edit — it does not route edit requests through session/request_permission. Asking plan to modify a file reliably produces an inline refusal from the model, which is useful when you want a read-only conversation where the agent can reason about changes without applying them.

WithInitialMode is an ACP-terminology alias for WithAgent; pick whichever reads better in context. ModeBuild and ModePlan are the built-in mode ids that ship with opencode 1.14.20.

If you want the interactive ask-path (session/request_permission) instead, use the default `build` agent and set `"permission": {"edit": "ask"}` in ~/.config/opencode/config.json — see examples/permission_callback.

go run ./examples/plan_mode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL