Skip to content

bug: task fails at run time on a project-less conversation — approve, then fail #58

Closed

Description

@santoshkumarradha

Bug

A task proposed from a conversation with no project runs its countdown, gets
approved, starts — and then fails:

could not prepare a working copy: this task needs a project;
use /workspace <path> or name where it should work

Observed live three times in one session. The person approved work that was
already doomed; nothing said so until it failed.

Root cause

internal/session/task_run.go:4731 — when place.Owned (the session's
workspace is its own work/ dir, opened outside any project), worktree
preparation returns this error at run time, after admission. The
non-repository fallback (repositoryRoot miss → run in place,
mergeInPlace) sits directly below but owned sessions never reach it.

Why the current shape is wrong

The failure is late (after the countdown and the person's yes) and total (a
failed task, not a question). "Approve, then fail" is the one shape that must
not exist: the person spent attention on a decision that had already been
made, and the failure vocabulary ("failed") describes work that never ran.

Product requirement

The no-project condition must be resolved before or at the proposal, never
after. Two acceptable shapes — pick one:

  1. Refuse at proposal time. propose_task from an owned session answers
    with the sentence ("this task needs a project; use /workspace or
    name where it should work") as its tool result — the model reads it, tells
    the person, no card is raised, no countdown runs.
  2. Run in place. An owned session's task runs in its own work/
    directory the way non-repository workspaces already do (mergeInPlace),
    with the card saying so.

Shape 1 is the smaller change and the honest one — an owned session's work/
dir is scratch space, and a task's deliverable deserves a real place. But
either is acceptable; the current third shape is not.

Acceptance

  1. Proposing a task from a project-less conversation either runs in place or
    is refused at proposal time with one clear sentence — never admitted and
    then failed at worktree preparation.
  2. The refusal sentence names the door out (/workspace <path> or the
    where field).
  3. A regression test covers the owned-session propose path end to end.

Drafted with CodeAF · reviewed and owned by the author

Activity

  1. added
    bug
    area:session
    on Aug 27, 2026
  2. santoshkumarradha commented on Aug 27, 2026

    @santoshkumarradha
    MemberAuthor

    Being fixed in a parallel local session on the chat-v3 branch — root cause confirmed identical (task_run.go:4731, the owned-place guard refusing every task after admission). Closing here so the fix lands via that work; reopen if it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sessionbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions