entireio / entireio/cli

Proposal: remove the subagent-checkpoint machinery (pre-task/post-task/post-todo) — likely unneeded

Open
#1,807 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.1k
Forks
475
Avg merge
1d 11h
Merged PRs (30d)
178

Description

Proposal

Evaluate removing the subagent / task-checkpoint subsystem — the pre-task, post-task, and post-todo hooks and everything they feed. Investigation suggests it produces data that nothing consumes.

Raised as the deferred follow-up from #1806 (which repaired the Claude Code matchers so these hooks fire again). This issue is the "do we even want this granularity?" decision.

What this subsystem is

  • pre-task — snapshots untracked files before a subagent runs (baseline helper)
  • post-task — on subagent finish, writes a task checkpoint to the shadow branch bundling the subagent's file diff + its own transcript (agent-<id>.jsonl) + attribution (subagent_type, task_description, agent_id, tool_use_id)
  • post-todo — cuts incremental checkpoints during a long subagent run

Backed by shared machinery: handleLifecycleSubagentStart/End (cmd/entire/cli/lifecycle.go), SaveTaskStep / TaskStepContext (cmd/entire/cli/strategy/), task-checkpoint write paths (cmd/entire/cli/checkpoint/ephemeral.go, persistent.go), and pre-task state (cmd/entire/cli/state.go).

Why it looks unneeded

The product consumes session-level data only (checked in entire.io):

  • Ingestion reads full.jsonl / transcript.jsonl for session index 0 (api/src/lib/checkpoint-payload-hydrator.ts). Subagent transcripts (agent-*.jsonl) are never read.
  • is_task / tool_use_id are parsed into SessionInfo once (api/src/lib/github.ts:660-661) then never queried or displayed.
  • subagent_type, task_description, is_incremental, incremental_sequence, agent_id, is_task_checkpoint0 matches anywhere in the product. No UI renders subagents.

Local consumers are dead or cosmetic:

  • rewind (the one feature using subagent-boundary checkpoints) is deprecated and slated for removal.
  • Remaining use is [Task] labels in checkpoint list / explain — navigational garnish.

Cross-agent: the machinery is shared by Claude Code, Cursor, Factory AI Droid, and Copilot CLI. On Claude Code it was dead (the #1806 matcher bug); on the other three it fires today but produces the same inert task checkpoints.

What we'd lose: nothing consumed

  • Code the subagent writes is still captured by the Stop / turn checkpoint (whole-worktree). No code loss in the common single-worktree flow.
  • Subagent transcript, per-subagent rewind points, attribution, per-subagent tokens — none are read by the product or any live command.

One honest caveat: subagents in an isolated worktree aren't covered by Stop, and post-task was the only thing that would capture them. But that protection doesn't effectively exist today (hooks were broken/unconsumed), so removal doesn't regress vs current reality. If isolated-worktree subagent capture ever becomes a real requirement, it's a fresh, correctly-scoped feature.

Removal scope (if approved)

  • Hook install + lifecycle parse across the 4 agents (subagent-start/stop, pre-tool-use/post-tool-use, Claude matchers)
  • Shared dispatch cases (SubagentStart/SubagentEnd in lifecycle.go; subagent classification in hook_registry.go)
  • Strategy: SaveTaskStep, TaskStepContext, task-checkpoint write paths in checkpoint/ephemeral.go + persistent.go
  • pre-task state (state.go), post-todo handler
  • The deprecated rewind task-checkpoint branch (already going away)
  • Tests + docs across all four agents

Decision needed

Keep (bet on a future subagent-level product feature — the dead isTask parse suggests it was once intended) or remove (delete unconsumed cross-agent complexity).

If we're not going to surface subagent-level data in the product in the foreseeable future, the recommendation is remove.

/cc — deferred from #1806

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the lifecycle and strategy paths in cmd/entire/cli/lifecycle.go and cmd/entire/cli/strategy/, then inspect checkpoint/ephemeral.go, persistent.go, state.go, and api/src/lib/checkpoint-payload-hydrator.ts. Confirm the product and live commands do not consume task-level data before deciding whether the cross-agent hooks and related tests and docs can be removed. Done means the decision is implemented consistently across the four agents without losing ordinary Stop checkpoint capture.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, typescript
Domain
cli, devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.