Skip to content

ag runner loses requested model and fails conversation discovery in restricted worktree #161

Description

@rbinar

Observed with cli-dispatch 4.27.0 on macOS from an existing isolated git worktree.

Command shape:

cli-dispatch-run --backend ag --model claude-sonnet-4-6 --cwd <worktree> --verify '<pytest command>' --prompt '<task>'

Actual result:

  • Runner printed in-place=1.
  • ag-stream warned about model gemini-3.6-flash-high even though claude-sonnet-4-6 was passed.
  • The worker never started and exited with: could not identify the agy conversation this run created (no NEW conversation matched this run's prompt).
  • Error handling then tried to write sessions/discover-fail-.../prompt.txt, but that directory did not exist, producing No such file or directory.
  • cli-dispatch-run exited 1 before verify.

The environment has a restricted filesystem and cannot write under ~/.cache/cli-dispatch or ~/.gemini, which may be the trigger. The runner should either honor/propagate the requested model and create its session directories, or fail early with one actionable permission error without the secondary missing-directory failure.

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