Skip to content

task finish --worked-from: record the role tasks followed (#2514) - #2633

Open
shadowbrush wants to merge 8 commits into
mainfrom
joran/2514-worked-from
Open

shadowbrush wants to merge 8 commits into
mainfrom
joran/2514-worked-from

Conversation

@shadowbrush

@shadowbrush shadowbrush commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

hadron team task finish --worked-from REF (repeatable, at most 10) records the role tasks the assignee followed, and the stored {nodeId, urn, revision} refs show in the finish receipt, task get and --json (result.workedFromRoleTaskRefs). Companion C1 of #4360, over hadron-server#4414.

Closes #2514. Refs #4360 (the project) and hadron-memory/hadron-server#4414; both stay open, as the issue says.

What changed

  • Flag: --worked-from, a StringArray. An eleventh ref or a blank one exits 2 before any request. Everything else (unreadable, missing, not runnable, repeated) is the server's call. Combines with --findings-file (the findings finish document carries the same variable).
  • Wire: omitted, never null, when the flag is absent (omitempty on AgentTaskResultInput.workedFromRoleTaskRefs and on the findings document's $workedFrom), so the no-flag request is byte-identical to today.
  • Display: worked from: lines (URN and revision) in the receipt and task get; result.workedFromRoleTaskRefs in --json, omitted when none, so a task finished without refs renders exactly as before.
  • Refusal: TASK_ROLE_TASK_REFS_INVALID prints a fixed message that names no reference, exit 2 (codeForExtension and the TestMapError table).
  • Docs: help (Long, Example, flag usage) and agentic-usage.md.

Schema snapshot

Refreshed at hadron-server 46865d36a (merge of #4449, the first revision with the field), in a detached worktree under my scratchpad: make schema HADRON_SERVER_DIR=… SDL_EXPORT=… printed schema: … @ 46865d36a, and make schema-check and make tools-manifest-check pass against it. The refresh also carries the other server changes merged by then. The only one that needed CLI action is the App-secret read-client surface (issueSecretReadClient, revealSecret, mySecretReadClients, from hadron-server#3998 S3): the coverage matrix lists them as gap #2631 (filed here, no behaviour change).

Disclosures for the seats

  • Every task command now needs a server with #4414. The selection is in the shared AgentTaskFields fragment, as the gate's plan says, so an older server rejects each task query as a schema-skew refusal (exit 2). The repo already accepts that for handles; agentic-usage.md now says so. Deploy order: server first.
  • The two ClaimUntrackedTaskItems* documents embed that fragment, so their byte-for-byte hashes in find_untracked_no_team_1622_test.go are re-pinned (same precedent as cli#2206); the list document hash did not move.
  • docs/help-inventory.md: the team task finish row resets to unread because its help changed.
  • The cap of 10, the code and the stored revision are Proposed in cor:agt:050:30 until confirmed; if they change, this follows.

Tests (red first)

internal/cmd/team_task_worked_from_2514_test.go, committed red on main before the implementation: refs sent in order; receipt and --json show both with revision; eleven refs and a blank ref refuse with no request; ten are sent; no flag omits the field and leaves text and --json unchanged; the refusal echoes no ref (the fake server's message contains one) and exits 2; the findings path carries the refs and omits them when absent; task get with and without refs. Mutants: cap removed (fails), fixed message removed (fails), omitempty removed in the generated input (fails).

Local: make test, make lint, make schema-check, make help-inventory-check, make coverage-matrix-check, make tools-manifest-check all pass at this head after merging main (the only overlapping file was docs/help-inventory.md).

— Joran, cli-engineer · claude-sonnet-5-5

Worker: Joran (cli-engineer) https://hadronmemory.com/app/u/hrn:worker:hadronmemory.com:hadron-dev-team:joran

🤖 Generated with Claude Code

shadowbrush and others added 7 commits November 19, 2026 11:53
…FromRoleTaskRefs) (#2514)

Worker: Joran (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:joran>

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Worker: Joran (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:joran>

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Worker: Joran (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:joran>

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…TaskFields fragment (#2514)

Worker: Joran (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:joran>

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…h the help inventory (#2514)

Worker: Joran (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:joran>

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Worker: Joran (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:joran>

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Match phrases C1 (#4414): task finish --worked-from

1 participant