Skip to content

Tasks work where the conversation is about: ground, mode, and the laws that follow it #76

Closed
5 of 5 issues completed

Description

@santoshkumarradha

What happened (2026-08-31, session 8f75d6c1ffdeaaf5, two /tasks fixing CodeQL #54/#56 in Agent-Field/agentfield with deepseek-v4-flash)

The chat was opened in ~, not in the repository. aforge minted an empty owned repo at …/work (one commit, "session opened") and cut trees/1, trees/2 from that. The brief the chat model wrote said Repo: ~/Documents/agentfield/code/agentfield … Work in this repo directly, so both workers worked in the person's live checkout. Everything downstream assumed trees/N:

  1. The git guard lied there. taskgit.go refused checkout/push/stash/update-ref/symbolic-ref/worktree with "this is your own copy… reaches no remote… comes home on its own" — false for the real repo. The workers escalated to commit-tree/write-tree and then bypassed the guard with gh api Git Data calls (blob → tree → commit → ref → PR). One ran gh auth token; the OAuth token is in plain text in two task journals.
  2. Collateral in the person's repo. Two commits landed on their local agent/oss-telemetry-v2 (b2f68fea, d22a053e); one worker did reset/reflog surgery there, and a first push carried 246 files because the index belonged to the person's branch.
  3. The visible "cycle" was audit ↔ repair, not the model. The check judged "a clean restore of what the work wrote" in trees/N-check = the empty repo + one copied file → REFUTED — the restore contains nothing / npm run build … Missing script. The repair round redid the whole job in the real repo, was judged in the same empty restore, and the node ends "incomplete" while PRs session: route wide reads to quick tasks, arm the grain, and add consult (waves A+B2, #1016) #1017/tui3: the draft kill ring, the ↑ walk visits them, /drafts browses #1018 are open and correct.
  4. "went in circles" was the wrong word. The last six calls before the cut were distinct and succeeding (commit-tree, write-tree, second commit, ref update…). The terminal signal was the third [silent] note (looped.go): the nudge count is cumulative across rule kinds and never resets on progress, "material progress" is edit/write only so a commit/push phase is structurally silent, and silence borrows the repetition rule's sentence.
  5. Then nothing visible happens. N.beat.json carries phase: checking|repairing but no surface code reads it; minutes of check and repair draw nothing on the card.

Design

Every task gets a ground — one path resolved from evidence the conversation already holds, shown on the forming card before consent, correctable with one key; the tree picker is the correction, never the default. And one law regardless: a task never writes outside its ground.

Ground ladder (generic, no lists): said (a path in the person's words, a dropped folder, propose_task{ground}) → touched (git roots of every path the conversation read/edited/grepped/cd'd, weighted by recency; one dominates → ground; two with real weight → the one question we ask) → standing in (the workspace when it is a repo — today's behaviour) → nothing (the conversation's own folder, and the card says so).

Mode from the deliverable, never asked: repo + writes → worktree off its HEAD (today's machinery pointed at the right repo); repo + reads only → reference (own folder, repo read-only); plain folder + writes → mirror (copy in, land by name); "here" → in place with the file ledger as undo.

Card row: in ~/Documents/agentfield/code/agentfield · branch off main · your uncommitted changes not included.

Lanes (sub-issues)

Integration branch: feat/task-ground (off dev). Each lane is a branch ground/<name> with a PR into feat/task-ground; one PR from there into dev.


Drafted with CodeAF · reviewed and owned by the author

Activity

  1. santoshkumarradha commented on Aug 31, 2026

    @santoshkumarradha
    MemberAuthor

    E2E evidence for the landing (0b54ff2): on the built binary, a chat opened in a non-repo desk folder read one file in a separate repo; /task then stood in that repo — the record carried ground + groundMode: worktree, task/hello-txt-goodbye-b5993b was cut in the real repo (git-common-dir proved the worktree), the rail said checking what it left, and the edit landed on that repo's main with branch and worktree cleaned. The exact scenario in the report above, fixed end to end.

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

    bugSomething the code does that it should not

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions