Skip to content

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Jan 31, 2026

Summary

  • Adds support for multiple executor sessions per task, allowing Claude, Codex, Gemini, and OpenClaw to work on the same task simultaneously
  • Each session is tracked independently with its own daemon session, pane IDs, and status
  • The UI shows tabs to switch between sessions when multiple exist

Key Changes

  • Database: New task_executor_sessions table tracks each executor session
  • Model: ExecutorSession struct with full CRUD operations
  • Executor: Creates session records when starting task execution
  • UI: Session tabs in detail view with < and > keyboard shortcuts

Implementation Details

  1. Schema Changes (internal/db/sqlite.go):

    • Added task_executor_sessions table with session metadata
    • Added active_session_id column to tasks table
    • Added session_id column to task_logs for log association
  2. Model Changes (internal/db/tasks.go):

    • ExecutorSession struct with status tracking
    • CRUD methods: CreateExecutorSession, GetExecutorSession, etc.
    • GetActiveExecutorSession for finding the current running session
    • AppendTaskLogForSession for session-specific logging
  3. Executor Changes (internal/executor/executor.go):

    • Creates ExecutorSession when starting new task execution
    • Updates session status on completion/failure
  4. UI Changes (internal/ui/detail.go):

    • renderSessionTabs() shows tabs when multiple sessions exist
    • SelectNextSession()/SelectPrevSession() for navigation
    • Handles < and > keys for tab switching

Test plan

  • Build passes
  • All existing tests pass
  • New executor_session_test.go tests pass
  • Manual testing of session switching in UI
  • Test creating multiple executor sessions for same task

🤖 Generated with Claude Code

@bborn bborn force-pushed the task/779-could-a-single-task-allow-multiple-execu branch from 97b0047 to 8fdd867 Compare January 31, 2026 15:02
This adds support for running multiple executor sessions on the same task
simultaneously. Each executor session (Claude, Codex, Gemini, OpenClaw) is
tracked independently in the database with its own session data.

Changes:
- Add task_executor_sessions table to track each executor session
- Add ExecutorSession struct with CRUD operations
- Add active_session_id to tasks table to track current session
- Add session_id to task_logs table to associate logs with sessions
- Update task detail view with session tabs when multiple sessions exist
- Add < and > keyboard shortcuts to switch between sessions
- Create executor session when starting task execution
- Track session status (pending/active/completed/failed)

The UI shows tabs only when there are multiple sessions, and uses
< > keys to switch between them. Each session tracks its own
daemon session, pane IDs, and status independently.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bborn bborn force-pushed the task/779-could-a-single-task-allow-multiple-execu branch from 8fdd867 to 3f2bb0c Compare January 31, 2026 15:42
@bborn
Copy link
Owner Author

bborn commented Jan 31, 2026

No. bloat.

@bborn bborn closed this Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants