Skip to contents

Plan mode (and occasionally Agent mode) asks the model to commit to a structured plan, written to ~/.copilot/session-state/{sessionId}/plan.md. hal_plan() returns the path so you can view or edit it directly.

Usage

hal_plan()

Value

Character path to plan.md, or NULL invisibly if no plan is available.

Examples

if (FALSE) { # \dontrun{
hal_reset(mode = "plan")
hal("Investigate the Q4 revenue drop in `sales`")
hal_plan()                       # path to plan.md
file.edit(hal_plan())            # open in editor
readLines(hal_plan())            # read programmatically
} # }