Skip to content

feat(plan)!: remove the session_plan toolset - #4199

Open
trungutt wants to merge 1 commit into
docker:mainfrom
trungutt:remove-session-plan-toolset
Open

feat(plan)!: remove the session_plan toolset#4199
trungutt wants to merge 1 commit into
docker:mainfrom
trungutt:remove-session-plan-toolset

Conversation

@trungutt

@trungutt trungutt commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Why

The session_plan toolset existed to support a per-session "draft, review, execute" plan-mode workflow driven by a host application. Downstream consumers have retired that workflow and migrated off the toolset, leaving it with no remaining users — but with a wide footprint: runtime-owned tool handlers, a dedicated stream event, a session scope threaded through the host-facing plans service, read-only session rows in the TUI /plans browser, and --session/--scope addressing on the plans CLI.

This PR removes the toolset and all of that surface in one pass, so the plans stack is shared-plans-only:

before                                    after

session_plan toolset ──┐
  write_session_plan   │
  read_session_plan    ├─► removed
  exit_plan_mode       │
session_plan_updated ──┘

plan toolset (shared) ──► unchanged
  /plans TUI browser  ──► shared plans only (all rows now mutable)
  docker agent plans  ──► addressed by name only (no --session/--scope)
  pkg/plans Service   ──► single scope; UpdateSession/UnsupportedError gone

Compatibility notes

  • Agent configs: session_plan is removed from the schema's toolset-type enum. Configs still using it fail validation — that is the breaking change, flagged in the commit.
  • Event stream: session_plan_updated is no longer emitted. Clients ignore unknown event types, and no event with this type will ever arrive again, so older clients are unaffected.
  • Plans CLI JSON: the v1 wire contract is preserved — scope remains in every document (always "shared"); the unsupported error code disappears along with the only operation that produced it.

The shared plan toolset, its optimistic-locking semantics, and the /plans browser behaviour for shared plans are untouched.

Remove the per-session plan toolset (write_session_plan,
read_session_plan, exit_plan_mode) and every session-plan tendril:

- pkg/tools/builtin/sessionplan and its runtime-owned handlers
- the session_plan_updated runtime event and its client decoder
- the session scope in pkg/plans (Service.List no longer takes
  options, UpdateSession and UnsupportedError are gone)
- session-plan rows in the TUI /plans browser and detail dialog
- the --session/--scope flags on the plans CLI
- the session_plan schema enum value, example, and docs

The shared plan toolset, /plans browser, and plans CLI are unchanged
for shared plans. Downstream consumers have migrated off the
per-session workflow.

BREAKING CHANGE: the session_plan toolset type is no longer accepted
in agent configs.
@aheritier aheritier added area/docs Documentation changes area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/tui For features/issues/fixes related to the TUI labels Sep 8, 2026
@trungutt
trungutt marked this pull request as ready for review September 8, 2026 09:03
@trungutt
trungutt requested a review from a team as a code owner September 8, 2026 09:03

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 No issues found — LGTM! View logs.

@aheritier aheritier added the kind/feat PR adds a new feature (maps to feat:). Use on PRs only. label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation changes area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants