Use case
When I run a 3-pane session, my editor pane opens to a blank buffer. If I
just used wt session add foo --prompt "..." to spin up a session with a
task, I want my editor pane to open that task — so I can read what the agent
is being told to do, refine it while the agent is starting up, and keep
notes as the work progresses. The task lives somewhere on disk; my editor
should already be looking at it.
Depends on #14 (per-session task prompt).
Outcome
When a session is created with a task prompt and a 3-pane/3-window layout is
in use, the editor pane opens with the task file already loaded. No extra step
needed. When no task prompt was supplied, the editor opens to its current
default (no behavior change).
The shape this takes is up to the implementer — common candidates:
- Pass the task file path as an argument to the editor command.
- Make
editor_cmd consume an env var (the same one the agent uses) via shell
substitution, so users who don't want this opt out by configuration.
- Convention-based: the editor always opens whatever file lives at a known
path inside the worktree (e.g. .wt/prompt), if it exists.
Whichever shape is chosen, it should also be sensible if the user later
extends the concept to a "plan file" or "task notes" file — the editor surface
for in-flight work.
Why now
A 3-pane session implies the user wants an editor alongside the agent. Today
that editor is a blank slate; the task they care about exists as a file but
the editor has no idea. Closing this loop turns "create session" into "create
session with the task ready to read and refine."
Acceptance criteria
Out of scope
- A separate "plan file" concept distinct from the task prompt — can be
layered later. v1 opens whatever wt already has on disk for the session.
- Live syncing / file-watching between the editor and the agent.
Use case
Depends on #14 (per-session task prompt).
Outcome
When a session is created with a task prompt and a 3-pane/3-window layout is
in use, the editor pane opens with the task file already loaded. No extra step
needed. When no task prompt was supplied, the editor opens to its current
default (no behavior change).
The shape this takes is up to the implementer — common candidates:
editor_cmdconsume an env var (the same one the agent uses) via shellsubstitution, so users who don't want this opt out by configuration.
path inside the worktree (e.g.
.wt/prompt), if it exists.Whichever shape is chosen, it should also be sensible if the user later
extends the concept to a "plan file" or "task notes" file — the editor surface
for in-flight work.
Why now
A 3-pane session implies the user wants an editor alongside the agent. Today
that editor is a blank slate; the task they care about exists as a file but
the editor has no idea. Closing this loop turns "create session" into "create
session with the task ready to read and refine."
Acceptance criteria
wt session add foo --prompt "..." --panes 3, the editor paneshows the task content (loaded from the file wt wrote) without any extra
user action.
no surprise files, no error.
configuration, if they prefer their editor to start blank.
Out of scope
layered later. v1 opens whatever wt already has on disk for the session.