hal_plan: Locate the current session's plan.md

View source: R/plan.R

hal_planR Documentation

Locate the current session's plan.md

Description

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

## Not run: 
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

## End(Not run)


hal documentation built on Oct. 6, 2026, 5:07 p.m.