Repository navigation
Description
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:
- Refuse at proposal time.
propose_taskfrom 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. - 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
- 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. - The refusal sentence names the door out (
/workspace <path>or the
wherefield). - A regression test covers the owned-session propose path end to end.
Drafted with CodeAF · reviewed and owned by the author
Activity
santoshkumarradha commentedon Aug 27, 2026
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.