Skip to content

runShell and runClaude fail with "Case path not found" when case directory does not exist #64

@vika2603

Description

@vika2603

When ~/codeman-cases/ does not exist (fresh install or first use), clicking "Run Shell" or "Run Claude Code" with the default testcase case fails with:

Error: Case path not found

Root cause (two bugs in session-ui.js)

  1. runClaude() (~line 291): When auto-creating a missing case, the response is accessed as createCaseData.case, but POST /api/cases returns { success, data: { case: { name, path } } }. Should be createCaseData.data.case.

  2. runShell() (~line 430): No auto-create logic at all. If the case does not exist, it immediately throws. Should mirror runClaude() auto-create behavior.

Steps to reproduce

  1. Remove or ensure ~/codeman-cases/ does not exist
  2. Start Codeman (npm run dev)
  3. Click "Run Shell" with default "testcase" case

Expected: Case directory is auto-created and session starts.
Actual: Error: Case path not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions