Skip to content

feat(cli): claim, release, complete and report progress on shared tasks - #196

Merged
harshsaver merged 4 commits into
october-dev:mainfrom
nikhilcrypto0:feat/cli-task-lifecycle
Nov 13, 2026
Merged

harshsaver merged 4 commits into
october-dev:mainfrom
nikhilcrypto0:feat/cli-task-lifecycle

Conversation

@nikhilcrypto0

Copy link
Copy Markdown
Contributor

Closes #179.

Problem

A connected session could add and list shared tasks from a shell, but could not claim, release, report progress or complete them. The Go client already had all of those operations.

There was also a gap inside agent run. It strips OCTOBER_BUS_SCOPE_TOKEN from its child, while task add and task list read only that variable. A shell started by agent run therefore could not even add a task, although the server accepts the session's own credential for both (taskAuthority in bus/runtime.go).

Change

New subcommands, each with --id <task-id>, --json and --address:

agentintercom task claim --id <task-id>
agentintercom task release --id <task-id>
agentintercom task complete --id <task-id> [--note <text> | --note-file <file|->]
agentintercom task progress add --id <task-id> [--kind progress|note|blocker] (--text <text> | --text-file <file|->)
agentintercom task progress list --id <task-id>
  • Authority: all five use only the existing executionClient (OCTOBER_BUS_AGENT_TOKEN). They never fall back to workspace or administrator authority, so the server's ownership rules apply unchanged.
  • task add and task list: they now use a small taskClient. OCTOBER_BUS_SCOPE_TOKEN keeps precedence exactly as before; only when it is absent and an agent token is set do they use the session credential. The other scopeClient callers (storage, prune, agent list) are untouched.
  • Text input: notes and progress text come from the flag or a file, with - for stdin to keep them out of shell history. Limits match the server: 16384 bytes for a note (optional) and 4000 for progress (required). The kind is checked before any request.
  • Untrusted text: progress list prints other agents' text with %q, as inbox and sessions do.
  • IDs: --id instead of a positional ID, because receiptFlagArgs only knows that --address takes a value, so a positional ID followed by --note <text> would be parsed wrongly.
  • Docs: a runnable "Shared tasks" section in docs/cli-messages.md, using the two agent run shells that page already sets up, plus usage lines.

No scheduler, ownership semantics or server behavior changes.

Evidence

Claim How it was checked Result
Add, claim, progress, complete; release and reclaim TestTaskCLIClaimProgressComplete, isolated daemon Passes; note recorded, dependent task claimable afterwards
Another session's claim, unmet dependency, release or complete by a non-owner Same test All CONFLICT
Only the execution credential acts; a replaced execution cannot TestTaskCLIUsesOnlyTheExecutionCredential No agent token: error names OCTOBER_BUS_AGENT_TOKEN; owner token refused; replaced execution cannot complete or add progress, task unchanged
task add/list work inside an agent session, and the workspace token keeps precedence TestTaskCLIAddAndListInsideAnAgentSession Task created by the session (createdBy: a); with both tokens set it is created by the owner; with neither the error names both
Each rule is tested (mutation check) Broke one at a time: owner credential for claim, raw progress output, any kind, no size limit, both inputs, empty progress, positional arguments, release calling claim, no session fallback, agent token winning over a workspace token All 10 fail a test. The last one survived at first, so I added the precedence assertion above
Real run with the built binary Private daemon, two agent run sessions holding only agent tokens First session added Build and Ship (Ship depends on Build), claimed Build, added progress from stdin and a blocker, completed with a stdin note. Second session was refused for Build ("is not open"), for Ship ("is blocked by ...") and for completing Build ("is not claimed by this agent"); then it read the progress history, saw Ship become ready, claimed and completed it. Final state: both done. The owner token appeared in no output
Repo checks gofmt, go vet ./..., go test -race -count=1 ./..., demo, SDK typecheck, build, test:errors, and test:integration against the built binary All pass

Not covered

  • Tested on macOS arm64 only.
  • Text read from a file or stdin keeps its trailing newline, as message send --body-file does.
  • Hosted connections were not exercised. executionClient already requires HTTPS for remote addresses, and that is unchanged.

@harshsaver harshsaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 Agentbox PR audit: changes requested

What needs to change

Please apply the fix plan above.

n/a

What this PR changes

  • What it does: Lets a terminal agent take a shared task, hand it back, post progress, notes or blockers, read progress history, and finish the task with an optional completion note.
  • What changes in the product: Five new terminal commands and a shared-task walkthrough. Adding and listing tasks also starts working inside a shell opened by the agent launcher. No web screens or server ownership rules change.
  • Why it exists: Issue #179 asks for terminal agents to finish the shared-task workflow without writing their own web requests.
  • Why merge (or why not yet): The commands reuse the existing task operations and preserve task ownership. Before merge, let owners read full progress history, consolidate the duplicated input helper, and explain that posting progress also requires holding the task.
  • What to expect after merging: Connected agents can perform the full workflow. Owners can create tasks and inspect their history; claiming and updating work still require an agent session. File and piped text retain trailing line breaks. Completion notes remain visible through machine-readable task output but are absent from the ordinary task listing, a pre-existing follow-up.
Full audit (Claude (fable, xhigh) × Codex (gpt-6-astra, xhigh), 2 turns, commit 6479697)

PR audit: #196 — feat(cli): claim, release, complete and report progress on shared tasks

Head: 6479697

Sign-off

  • Claude (fable, xhigh): ✅ satisfied — sound, well-tested PR; three small gaps we can fix ourselves on the branch before merge.
  • Codex (gpt-6-astra, xhigh): ✅ satisfied — independently verified all three findings and the fix plan; no additional blocking issue or material change.

Decision

fix — the task workflow works, but owner access to progress history, duplicated text-input handling, and an incomplete ownership explanation need small, mechanical fixes before merge.

What changes (plain language)

  • What it does: Lets a terminal agent take a shared task, hand it back, post progress, notes or blockers, read progress history, and finish the task with an optional completion note.
  • What changes in the product: Five new terminal commands and a shared-task walkthrough. Adding and listing tasks also starts working inside a shell opened by the agent launcher. No web screens or server ownership rules change.
  • Why it exists: Issue #179 asks for terminal agents to finish the shared-task workflow without writing their own web requests.
  • Why merge (or why not yet): The commands reuse the existing task operations and preserve task ownership. Before merge, let owners read full progress history, consolidate the duplicated input helper, and explain that posting progress also requires holding the task.
  • What to expect after merging: Connected agents can perform the full workflow. Owners can create tasks and inspect their history; claiming and updating work still require an agent session. File and piped text retain trailing line breaks. Completion notes remain visible through machine-readable task output but are absent from the ordinary task listing, a pre-existing follow-up.

Findings

Blocking

All three are small and we can fix them ourselves; none needs the author.

  1. cmd/agentintercom/task_lifecycle.go:166 — task progress list refuses the workspace owner.

    • It uses executionClient, so a shell holding only OCTOBER_BUS_SCOPE_TOKEN gets “this command needs a connected session: OCTOBER_BUS_AGENT_TOKEN is not set” (cmd/agentintercom/message.go:27).
    • The server explicitly accepts either credential for this read: bus/runtime.go:515 calls taskAuthority (bus/runtime.go:573), and spec/0.1/http.md:78 documents “Scope or agent.” Existing coverage and clients agree: bus/task_progress_test.go:37, conformance/runner.go:501, and sdk/typescript/src/client.ts:269.
    • The PR already adds taskClient for routes accepting either credential (cmd/agentintercom/task_lifecycle.go:195) and applies it to task creation and listing (cmd/agentintercom/main.go:693, :729).
    • User impact: the owner workflow in docs/operations.md:116 can inspect tasks and their latest 20 progress entries (bus/task_progress.go:13, :46), but cannot use the dedicated command to read older entries.
    • Issue #179 requires execution credentials for agent mutations. Allowing this read follows the existing contract and does not change ownership.
  2. cmd/agentintercom/task_lifecycle.go:209 — taskText duplicates messageBody (cmd/agentintercom/message.go:45).

    • Both implement inline input versus a file, - for stdin, a bounded read, and size/empty checks.
    • Under Harsh’s simplicity and reuse rules, one helper should serve messages, channel posts, and task text. The PR’s helper already has the parameters needed; no additional abstraction or dependency is necessary.
    • Replacing messageBody with that helper preserves accepted message/channel input and the 65536-byte limit. Only validation-error wording changes.
    • Repository searches found no test or documentation depending on the old combined error text at message.go:65.
  3. docs/cli-messages.md:73 — the ownership explanation omits progress updates.

    • It says only the claiming execution can release or complete a task. Adding progress has the same restriction (bus/task_progress.go:96, spec/0.1/http.md:77).
    • A reader trying to post a note or blocker before claiming the task receives a conflict that this explanation does not cover.
    • The credential sentence must also include task progress list when finding 1 is fixed.

Non-blocking

  • Authority and ownership are correct for mutations. Claim/release, complete, and progress add use executionClient (cmd/agentintercom/task_lifecycle.go:60, :100, :138). Server operations check the current execution and enforce claimant ownership (bus/store.go:1423, :1474, :1508; bus/task_progress.go:84).
  • Output is safely quoted. Task titles and progress text use %q (cmd/agentintercom/task_lifecycle.go:79, :113, :188). Agent/task identifiers are validated (bus/validation.go:10), progress kinds are restricted (bus/runtime.go:500), and timestamps are generated by the server (bus/store.go:158).
  • Input limits match the server. Completion notes allow 16384 bytes and progress allows 4000 (bus/runtime.go:482, :505). File/stdin reads stop at the limit plus one byte (cmd/agentintercom/task_lifecycle.go:224). The server remains responsible for its additional text validation.
  • The launcher fix is necessary and appropriately scoped. agent run removes the owner token and supplies the agent token (cmd/agentintercom/main.go:1001). taskClient enables creation and listing in that environment; task creation records the agent as creator (bus/runtime.go:436). The paginated listing route also accepts either credential (bus/task_page.go:57).
  • Architecture and dependencies: the PR uses existing Go client operations and standard-library input/flag handling. It adds no dependencies, migrations, compatibility wrappers, scheduler, or server behavior. Its parent and the checkout’s origin/main both point to 056e320.
  • Completion notes are missing from ordinary task listings. cmd/agentintercom/main.go:760 prints descriptions, dependencies, claimants, and recent progress, but not Task.Note. This predates the PR. A completion note is separate from progress history, so task progress list does not reveal it either; task JSON does.
  • Trailing newlines are preserved. The guide’s echo example stores a trailing newline. Both input helpers preserve file contents, and the author disclosed this behavior. Trimming would be a separate product change.
  • JSON formatting differs, not its validity. Unpaginated task add/list use indented JSON (cmd/agentintercom/main.go:704, :750); the new commands use compact JSON, like message send. This does not require a fix.
  • Test output and coverage: cmd/agentintercom/task_lifecycle_test.go:134, :138, and :142 do not capture stdout. The agent-session listing check verifies success but does not inspect its output. Existing owner-list coverage does inspect JSON (cmd/agentintercom/main_test.go:586).
  • Ordering assumption in a test: cmd/agentintercom/task_lifecycle_test.go:145 assumes the second task is at index 1. The query orders only by millisecond created_at (bus/store.go:1558, :156). A synchronous commit is not proof of distinct timestamps; matching by title or ID would be sturdier. No failure was observed.
  • Comment and naming nits: cmd/agentintercom/task_lifecycle.go:17 points to the wrong file for validateText; the function is in bus/validation.go:22, while callers supply the limits in runtime.go. The fix plan corrects the comment. The CLI’s 4000-byte maxTaskProgressBytes also shares a name with the server’s unrelated 1 MiB history cap (bus/task_progress.go:12), but the constants are in different packages.
  • Expiry coverage needs precise wording. The new CLI tests exercise replaced credentials, not elapsed lease expiry (cmd/agentintercom/task_lifecycle_test.go:112). Existing server tests separately cover expired and replaced executions for all relevant mutations (bus/hardening_test.go:14). The minimum real lease is 30 seconds (bus/validation.go:117).
  • File layout: task add/list remain in main.go; the new commands are in task_lifecycle.go. Consolidating task commands later would match the organization of message and channel commands.
  • Owner transport behavior is pre-existing. scopeClient lacks the HTTPS and redirect restrictions used by executionClient (cmd/agentintercom/main.go:663; cmd/agentintercom/message.go:33). That applies to existing owner commands and is not introduced by this PR.
  • Formatting verified statically. Both new Go files pass gofmt -l. CI runs tests, vet, and builds but does not enforce gofmt (.github/workflows/ci.yml:26).

Fix plan

Small mechanical patch; much of the helper change moves or deletes existing code. The implementation plan is unchanged from turn 1.

cmd/agentintercom/message.go

  • Replace messageBody (lines 45–68) with the current taskText implementation, renamed inputText:
    // inputText reads text from exactly one of an inline flag or its file flag
    // ("-" is stdin), so private text can stay out of shell history. name is the
    // inline flag, for example "--body"; limit is the server's byte limit.
    func inputText(inline, file string, input io.Reader, name string, limit int, required bool) (string, error) { /* body of taskText */ }
  • Line 99:
    text, err := inputText(*body, *file, in, "--body", 65536, true)

cmd/agentintercom/channel.go

  • Line 52:
    text, err = inputText(*body, *file, in, "--body", 65536, true)

cmd/agentintercom/task_lifecycle.go

  • Delete taskText (lines 209–237) and the now-unused "strings" import.
  • Lines 96 and 134: call inputText with the same arguments.
  • Line 166:
    client, err := taskClient(*address)
  • Replace the line 17 comment with:
    // Server limits for task text (CompleteTask and AddTaskProgress in bus/runtime.go).
  • Update the lines 23–27 comment: claim, release, complete, and progress add use only the execution credential; progress list accepts either credential.
  • Update the lines 195–198 comment to include task progress list among the routes served by taskClient. Preserve the explanation of owner-token precedence and the launcher environment.

cmd/agentintercom/message_test.go

  • Line 62:
    _, err := inputText("", "-", strings.NewReader(strings.Repeat("x", 65537)), "--body", 65536, true)

cmd/agentintercom/task_lifecycle_test.go

  • Rename the six taskText calls at lines 157, 160, 166, 170, 173, and 175 to inputText.
  • In TestTaskCLIClaimProgressComplete, after line 35 add:
    t.Setenv("OCTOBER_BUS_SCOPE_TOKEN", "")
    This is necessary because startWorkspaceTest sets "untrusted-owner" (cmd/agentintercom/workspace_test.go:25), which taskClient would otherwise prefer.
  • After line 75 add:
    // The workspace owner can read the same history without an agent session.
    t.Setenv("OCTOBER_BUS_SCOPE_TOKEN", owner.Token)
    out, err = runTask(t, "", "", "progress", "list", "--id", build.ID, "--json")
    requireNoError(t, err)
    requireNoError(t, json.Unmarshal([]byte(out), &entries))
    require(t, len(entries) == 2, "owner could not read progress: %#v", entries)
    t.Setenv("OCTOBER_BUS_SCOPE_TOKEN", "")

docs/cli-messages.md

  • Replace lines 73–78 with:

    claim, release, complete and progress add always act as the connected session, using OCTOBER_BUS_AGENT_TOKEN. Only the claiming execution can add progress to, release or complete a task. Another session's claim, an unfinished dependency, or a replaced session returns an error instead of taking the task over. task add, task list and task progress list use OCTOBER_BUS_SCOPE_TOKEN when it is set; inside agent run, which removes that token, they use the session's credential.

Then run in the trusted fix/CI environment

  • gofmt -l cmd/agentintercom — must print nothing.
  • go vet ./...
  • go build ./cmd/agentintercom
  • go test -race -count=1 ./cmd/agentintercom ./bus
  • Exercise the documented workflow in two agent run shells, then read its progress history from an owner shell.

Message to the developer

Please apply the fix plan above.

n/a

Questions for Harsh

n/a

Verification

  • Static audit only: no contributor code, tests, builds, installs, or repository scripts were executed. No checkout files or GitHub state were changed.
  • Complete diff reviewed: git diff 056e3200556b2cfb5dfabf5180755b81b0dcfea9...HEAD; four files, +480/−2.
  • Independent code verification: both new files in full; affected command dispatch, task creation/listing, address resolution, launcher environment, message/channel input helpers and tests; workspace fixtures and credential-isolation tests; task clients, HTTP handlers, runtime authorization, storage operations, pagination, validation, progress tests, MCP task handlers, conformance checks, TypeScript scope client, and the relevant guides.
  • Fix plan checked against callers and fixtures: all helper references are accounted for; accepted message/channel input remains the same; removing the task file’s strings import is correct; the owner-read test clears and restores the fixture credential appropriately.
  • Read-only checks passed: git diff --check 056e3200556b2cfb5dfabf5180755b81b0dcfea9...HEAD and gofmt -l cmd/agentintercom/task_lifecycle.go cmd/agentintercom/task_lifecycle_test.go produced no output. git status --short remained empty.
  • PR description and discussion read: the plain gh pr view ... --comments command failed on GitHub’s deprecated Projects field. Retrying with explicit JSON fields succeeded. There are no PR comments or submitted reviews. The author’s manual-run and mutation-testing claims were read but not independently executed.
  • Issue reviewed: gh issue view could not connect, so the public issue and contributor discussion were read through the browser. The requested commands, credential handling, private-text inputs, isolated-daemon coverage, and launcher walkthrough are present. The new negative tests use execution replacement; they do not simulate elapsed lease expiry.
  • CI verified for the stated head: all 11 reported checks succeeded. Runtime jobs cover Ubuntu, macOS, and Windows; Ubuntu additionally runs the race detector. GitHub reports MERGEABLE, BLOCKED, and REVIEW_REQUIRED. These results apply to the current head; the planned fixes still need validation.
  • Ruleset assessment: the feature exposes existing capabilities in a small CLI layer and reuses existing dependencies. The duplicated input helper is the remaining simplicity/reuse concern. No architectural, compatibility, migration, or product-direction decision is needed.

Audit log

  • Turn 1 (Claude (fable, xhigh)): Audited from scratch against issue #179 and the ruleset. Confirmed the authority model, output quoting, limits and tests against server code. Raised three small fix items (owner cannot read progress history, duplicate text helper, incomplete doc sentence) and wrote an exact fix plan; decision: fix. Codex should challenge whether finding 2 belongs in Blocking or only Non-blocking, and whether owner access to progress list is wanted.
  • Turn 2 (Codex (gpt-6-astra, xhigh)): Independently verified the full diff, all blocking findings, and the proposed fixes against the server contract, existing clients, tests, issue, and PR discussion. Retained the decision and fix plan. Clarified owner permissions, test-coverage limits, and the unsupported estimate of ordering-flake likelihood; confirmed formatting with a read-only check. No material changes.

Automated review by Harsh's agentbox: two AI reviewers audited this PR against the project ruleset and agreed on it.

Per maintainer review: task progress list uses taskClient so the workspace
owner can read history without an agent session; taskText and messageBody
merge into one inputText helper used by messages, channels and tasks; docs
state that progress updates also require holding the task.
Main added its own textInput consolidation (question answer flow); the task
commands now reuse it instead of a second helper, with the optional
completion note read only when note flags are present.
@harshsaver

Copy link
Copy Markdown
Member

Applied the review fixes on this branch: task progress list now uses taskClient so the workspace owner can read history without an agent session (covered by a new owner-read test block), the duplicated taskText/messageBody helpers are consolidated onto main's textInput (the completion note stays optional by only reading input when note flags are present), and the docs now state that progress updates also require holding the task. Merged current main, verified with gofmt, go vet, and go test -race on cmd/agentintercom and bus (both pass). Ready for re-review.

@harshsaver harshsaver added the agentbox: ready to merge Audited by Claude and Codex; Harsh can merge label Nov 13, 2026
@harshsaver
harshsaver dismissed their stale review November 13, 2026 04:29

Resolved: the audit of c897506 found the requested changes in place.

@harshsaver

Copy link
Copy Markdown
Member

🤖 Agentbox PR audit: ready to merge

What this PR changes

  • What it does: Lets a terminal agent take a shared task, hand it back, post progress updates, notes or blockers, read progress history, and mark it done with an optional note.
  • What changes in the product: Five new terminal commands and a shared-task walkthrough. Adding and listing tasks now works inside a shell started by the agent launcher. Workspace owners can read full progress history. No web screens or server ownership rules change.
  • Why it exists: Issue #179 asks for terminal agents to complete the task workflow without writing their own web requests.
  • Why merge (or why not yet): The earlier access, duplication, and documentation problems are fixed. Existing server rules still control who may claim, update, release, or finish work. CI passes on Linux, macOS, and Windows.
  • What to expect after merging: Launcher shells can perform the full workflow. An explicitly supplied empty note file is rejected before completion; omitting the note remains supported. Piped text keeps trailing line breaks. Completion notes still require machine-readable task output to inspect. Native Codex session launches do not supply these terminal commands’ credential, an existing launcher limitation described below. Correct the stale authority sentence if the PR description becomes the squash-commit message.
Full audit (Claude (fable, xhigh) × Codex (gpt-6-astra, xhigh), 2 turns, commit c897506)

PR audit: #196 — feat(cli): claim, release, complete and report progress on shared tasks

Head: c897506

Sign-off

  • Claude (fable, xhigh): ✅ satisfied — all three earlier blocking findings are fixed in the current code, CI is green on this commit, and nothing new blocks.
  • Codex (gpt-6-astra, xhigh): ✅ satisfied — independently verified the fixes, shared-helper integration, and current CI; empty-note behavior is acceptable and formatting passes.

Decision

merge — all three earlier blockers are resolved, the branch contains the supplied main commit, and all 11 checks pass on this head. No further changes are required before merge.

What changes (plain language)

  • What it does: Lets a terminal agent take a shared task, hand it back, post progress updates, notes or blockers, read progress history, and mark it done with an optional note.
  • What changes in the product: Five new terminal commands and a shared-task walkthrough. Adding and listing tasks now works inside a shell started by the agent launcher. Workspace owners can read full progress history. No web screens or server ownership rules change.
  • Why it exists: Issue #179 asks for terminal agents to complete the task workflow without writing their own web requests.
  • Why merge (or why not yet): The earlier access, duplication, and documentation problems are fixed. Existing server rules still control who may claim, update, release, or finish work. CI passes on Linux, macOS, and Windows.
  • What to expect after merging: Launcher shells can perform the full workflow. An explicitly supplied empty note file is rejected before completion; omitting the note remains supported. Piped text keeps trailing line breaks. Completion notes still require machine-readable task output to inspect. Native Codex session launches do not supply these terminal commands’ credential, an existing launcher limitation described below. Correct the stale authority sentence if the PR description becomes the squash-commit message.

Findings

Blocking

None.

The three blocking findings from commit 6479697 are resolved:

  1. Owners can read progress history.

    • task progress list now uses taskClient (cmd/agentintercom/task_lifecycle.go:171), matching the server’s acceptance of either credential (bus/runtime.go:515, :573; spec/0.1/http.md:78).
    • The new owner-read block explicitly clears the agent token through runTask and reads the history using the owner token (cmd/agentintercom/task_lifecycle_test.go:78).
    • The test first clears the fixture’s placeholder owner token (task_lifecycle_test.go:36; workspace_test.go:25), preserving coverage of agent-authenticated reads.
  2. Text input uses one shared helper.

    • textInput from main now serves message send, channel post, question answer, task completion, and task progress (cmd/agentintercom/message.go:52, :106; channel.go:52; question.go:109; task_lifecycle.go:100, :139).
    • The obsolete taskText, inputText, and messageBody names have no remaining references in the CLI.
    • Completion bypasses the helper when neither nonempty note text nor a file path is supplied (task_lifecycle.go:96). The note therefore remains optional without adding another helper or compatibility path.
    • The shared helper is already present on main through feat(cli): list and answer pending agent questions from a terminal #195; this PR now reuses it.
  3. The ownership documentation is corrected.

    • docs/cli-messages.md:73 states that adding progress, releasing, and completing require the claiming execution.
    • It also lists progress history among the commands accepting the owner token.

Non-blocking

  • Mutation authority remains correct. Claim/release, complete, and progress add use only executionClient (cmd/agentintercom/task_lifecycle.go:60, :105, :143). The server checks current execution authority and claimant ownership (bus/store.go:1423, :1474, :1508; bus/task_progress.go:84).

  • Limits and output remain correct. Task text limits match the server: 16384 bytes for completion notes and 4000 for progress (cmd/agentintercom/task_lifecycle.go:17; bus/runtime.go:482, :505). File/stdin reads are bounded to the limit plus one byte (cmd/agentintercom/message.go:65). Human output quotes task titles and progress text (task_lifecycle.go:79, :118, :193); identifiers and progress kinds are server-validated (bus/validation.go:10; bus/runtime.go:500).

  • Empty note files are rejected before any request. task complete --note-file <empty file> and empty stdin with --note-file - fail with “note must contain 1 to 16384 bytes…” (cmd/agentintercom/task_lifecycle.go:98; message.go:71). Omitting the note or using --note "" sends an empty note, which the server accepts (bus/runtime.go:482; bus/validation.go:26). Rejecting an explicitly requested but empty note source is a reasonable behavior; it prevents silently completing without the intended note. It does not need to block this PR.

  • Empty-note coverage could be clearer. No test directly pins empty-file rejection. An optional row in the existing validation table could assert:

    "complete --id t --note-file -": "note must contain 1 to",

    Successful no-note completion is not directly exercised through the CLI. However, the non-owner completion test receives a server conflict, proving omission reaches the server (cmd/agentintercom/task_lifecycle_test.go:56), and existing server coverage successfully completes with an empty note (bus/production_regression_test.go:125).

  • The PR description’s authority sentence is stale. It still says all five new commands use only executionClient. Progress history now accepts either credential. Correct that sentence if reusing the description for the squash commit. The current description does not name the removed text helper.

  • Owner documentation could expose the new read command. The owner task-board section in docs/operations.md:116 does not mention task progress list, although the terminal walkthrough documents its owner-token support.

  • Owner credential conventions differ across commands. Task owner commands use OCTOBER_BUS_SCOPE_TOKEN (cmd/agentintercom/main.go:665), while question commands use --workspace and local credential discovery (question.go:46). This convention already existed for task add/list; changing it is separate work.

  • Launcher support needs precise wording. agent run supplies the agent token to its child (cmd/agentintercom/main.go:1003). Native Claude launches also supply it (session_native.go:325). Native Codex launches remove that environment variable and configure a connection file instead (session_native.go:280, :283); these terminal commands do not read that file. This is an existing limitation of the native Codex launcher, also affecting terminal messaging—not a blanket prohibition on using the commands from any Codex-associated shell.

  • Completion notes remain absent from ordinary task listings. printTasksHuman prints descriptions, dependencies, claimants, and recent progress, but not Task.Note (cmd/agentintercom/main.go:762). Completion notes are separate from progress history and can be inspected through task JSON. This predates the PR.

  • Trailing newlines remain intact. File and stdin content is preserved (cmd/agentintercom/message.go:65). This matches message input and the author’s disclosed behavior.

  • JSON formatting differs, not its validity. Unpaginated task add/list print indented JSON (cmd/agentintercom/main.go:706, :752); the new commands print compact JSON (task_lifecycle.go:76, :116, :154, :185).

  • Test nits remain. Calls at cmd/agentintercom/task_lifecycle_test.go:143, :147, and :151 print JSON into test output. The listing call checks success without inspecting output. The assertion at line 154 assumes the second task occupies index 1, although the server orders only by millisecond created_at (bus/store.go:1558); matching by title or ID would be sturdier.

  • Expiry coverage is split across layers. New CLI tests exercise replaced credentials (cmd/agentintercom/task_lifecycle_test.go:121). Existing server tests cover both replacement and expiry for task mutations (bus/hardening_test.go:14). The new CLI suite does not wait for a lease to expire.

  • Owner transport behavior is unchanged. scopeClient has no HTTPS or redirect restriction (cmd/agentintercom/main.go:665), unlike executionClient (message.go:33). Progress history now uses the existing owner-client behavior when an owner token is set.

  • Scope and structure remain simple. The PR against main changes four files, +463/−2, with no dependency, schema, or server changes. Task add/list remain in main.go; the other task commands live in task_lifecycle.go. Consolidation would be a later organizational tidy.

Fix plan

n/a

Message to the developer

n/a

Questions for Harsh

n/a

Verification

  • Static review only. No contributor code, tests, builds, installs, or repository scripts were executed. No checkout files or GitHub state were changed.
  • Full PR diff reviewed: git diff 2604d00936917ab030766d2894b61bbccbf6e4df...HEAD, four files, +463/−2.
  • Changes since the earlier audit reviewed: inspected 6479697..HEAD, including the task fixes, shared-helper changes, affected callers/tests, documentation, and the inherited client error-handling change. Distinguished merged-main changes from this PR’s remaining diff.
  • Commit ancestry verified: 8bebd5c applies the review fixes; c897506 merges main. Both are authored by Harsh. The merge base with the checkout’s origin/main is the supplied base 2604d00936917ab030766d2894b61bbccbf6e4df.
  • Current code reverified: task commands and tests in full; shared text input and its callers; affected main dispatch, task listing, owner-client, and launcher code; native session credential setup; workspace fixture; task client methods, runtime authorization, storage ownership checks, validation, progress history, relevant server tests, HTTP contract, and guides.
  • Behavior traced: owner-only history reads, agent-only reads, owner-token precedence, mutation credential isolation, note omission, empty-file rejection, input size bounds, and validation-error expectations. Empty-note rejection occurs before client construction and sends no completion request.
  • Read-only checks passed: gofmt -l cmd/agentintercom/task_lifecycle.go cmd/agentintercom/task_lifecycle_test.go cmd/agentintercom/main.go and git diff --check 2604d00...HEAD produced no output. The checkout remained clean.
  • PR discussion read: plain gh pr view ... --comments failed on the deprecated Projects field; explicit JSON fields succeeded. Harsh’s new comment reports applying the fixes and passing formatting, vet, and race tests. Those local execution claims were not independently rerun.
  • Issue rechecked: gh issue view could not connect; the public issue was read through the browser. Its requested commands, execution credentials for mutations, file/stdin input, isolated-daemon coverage, and launcher walkthrough are implemented.
  • CI verified for this head: all 11 reported checks succeeded. The workflow runs tests, vet, builds, and the demo on Ubuntu, macOS, and Windows; Ubuntu additionally runs the race detector. SDK, interoperability, hosted, UI, and vulnerability checks also succeeded. CI does not enforce gofmt, which was checked separately here.
  • GitHub state: MERGEABLE, BLOCKED, and CHANGES_REQUESTED. The outstanding changes-requested review is the earlier automated audit on 6479697; no newer review is present. This audit recommends merge and does not change GitHub review state.
  • Ruleset assessment: the implementation adds a small CLI layer over existing operations, reuses the shared helper and dependencies, removes duplicate paths, and introduces no speculative abstraction, compatibility layer, or architectural stopgap.

Audit log

  • Earlier round, commit 6479697, Turn 1 (Claude (fable, xhigh)): Audited from scratch; raised three small fix items (owner cannot read progress history, duplicate text helper, incomplete doc sentence) with an exact fix plan; decision: fix.
  • Earlier round, commit 6479697, Turn 2 (Codex (gpt-6-astra, xhigh)): Independently verified the findings and fix plan; no material changes; decision stayed fix.
  • Turn 1 (Claude (fable, xhigh)): Re-audited at c897506 after Harsh's fix commit and the merge of main. Confirmed all three earlier findings are resolved in code, re-checked authority, limits, quoting and tests against the current server code, and confirmed CI is green on this commit. Found no new blocking issues; decision: merge. Added non-blocking notes on the empty note-file refusal, the stale PR description and the owner credential style. Codex should challenge whether the empty note-file behaviour deserves a test before merge, and run gofmt -l.
  • Turn 2 (Codex (gpt-6-astra, xhigh)): Independently verified the current diff, changes since 6479697, review fixes, shared-helper integration, owner-read test, server contracts, discussion, and CI. Accepted empty-note-file rejection without requiring another test before merge. Confirmed gofmt and whitespace checks pass; narrowed the native Codex limitation and corrected minor description/coverage wording. Decision remains merge; no material changes.

Final checks

Not run here: this PR is from an outside contributor, so its code is never executed on this machine. Rely on CI before merging.

Automated review by Harsh's agentbox: two AI reviewers audited this PR against the project ruleset and agreed on it.

@harshsaver harshsaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved after the Claude×Codex audit agreed it is ready (audited head c897506).

@harshsaver harshsaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved after the Claude×Codex audit agreed it is ready (audited head c897506; this head only adds a merge of main).

@harshsaver
harshsaver merged commit a663b65 into october-dev:main Nov 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentbox: ready to merge Audited by Claude and Codex; Harsh can merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: claim, release and complete shared tasks from a terminal

2 participants