Plan mode for chat agent #939

Closed
opened 2026-06-18 10:56:09 +02:00 by sleepy · 0 comments
Owner

Overview

The chat agent generates a step-by-step plan before executing tool calls. The user can review and modify the plan before the agent proceeds. Dramatically improves complex multi-step task reliability.

Upstream References

  • PR #638: Add plan mode to the chat agent
  • Upstream commit: 8ce945d feat: Add plan mode to the chat agent (#638)
  • Local paths: ../odysseus_upstream/src/agent_loop.py, ../odysseus_upstream/src/tool_policy.py, ../odysseus_upstream/routes/chat_routes.py
  • Tests: ../odysseus_upstream/tests/test_plan_mode.py

How It Works

  1. Agent receives a complex request
  2. Instead of executing immediately, it generates a structured plan
  3. Plan is rendered in the UI with numbered steps
  4. User can edit, reorder, or approve
  5. Agent executes step-by-step after approval

Implementation

  1. Port plan mode logic from src/agent_loop.py
  2. Port tool policy changes from src/tool_policy.py
  3. Port chat route changes from routes/chat_routes.py
  4. Add plan mode UI rendering in the frontend
  5. Port tests/test_plan_mode.py

Priority

High — significant improvement for multi-step workflows.

## Overview The chat agent generates a step-by-step plan before executing tool calls. The user can review and modify the plan before the agent proceeds. Dramatically improves complex multi-step task reliability. ## Upstream References - **PR #638**: Add plan mode to the chat agent - **Upstream commit**: `8ce945d feat: Add plan mode to the chat agent (#638)` - **Local paths**: `../odysseus_upstream/src/agent_loop.py`, `../odysseus_upstream/src/tool_policy.py`, `../odysseus_upstream/routes/chat_routes.py` - **Tests**: `../odysseus_upstream/tests/test_plan_mode.py` ## How It Works 1. Agent receives a complex request 2. Instead of executing immediately, it generates a structured plan 3. Plan is rendered in the UI with numbered steps 4. User can edit, reorder, or approve 5. Agent executes step-by-step after approval ## Implementation 1. Port plan mode logic from `src/agent_loop.py` 2. Port tool policy changes from `src/tool_policy.py` 3. Port chat route changes from `routes/chat_routes.py` 4. Add plan mode UI rendering in the frontend 5. Port `tests/test_plan_mode.py` ## Priority High — significant improvement for multi-step workflows.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/odysseus#939
No description provided.