Metadata
| Status | done |
|---|---|
| Assigned | agent-94 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-26T16:42:38.675130551+00:00 |
| Started | 2026-04-26T19:43:08.977959541+00:00 |
| Completed | 2026-04-26T20:39:20.707117118+00:00 |
| Tags | eval-scheduled |
| Eval score | 0.18 |
| └ blocking impact | 0.10 |
| └ completeness | 0.10 |
| └ coordination overhead | 0.20 |
| └ correctness | 0.12 |
| └ downstream usability | 0.05 |
| └ efficiency | 0.20 |
| └ intent fidelity | 0.39 |
| └ style adherence | 0.08 |
Description
Description
User decision: the compaction cycle is dead. Both .compact-N and .archive-N system task types should be eliminated, not retired-with-replacement. The chat-agent's own memory management (separate task, future) will cover what compaction was doing for context recovery; archive functionality, if needed, will move to a daemon-level (dispatcher-level) sweep — NOT a per-chat task.
What to remove
.compact-N (per project memory: 'compaction as visible cycle' pattern):
- Auto-creation of
.compact-Ntasks when a chat (.coordinator-N/.chat-N) is created - The cycle scaffolding that wires
.coordinator-N↔.compact-Nas a back-edge cycle - Compaction-trigger logic in the dispatcher that fires when
compactor_interval/compactor_ops_threshold/compaction_token_thresholdthresholds are met (search for these config keys) - Any code that assembles 'compacted context' from prior chat history (the 'wire-compacted-context' commit referenced in project memory)
- The
CompactorStatetype and related modules insrc/service/compactor/ - All config keys:
compactor_interval,compactor_ops_threshold,compaction_token_threshold,compaction_threshold_ratio— remove from default config and accept-with-deprecation-warning for one release
.archive-N:
- Auto-creation of
.archive-Ntasks when a chat is created - The archive-loop tag and associated cycle code
- The companion-task linkage in
handle_create_coordinator(src/commands/service/ipc.rs:1358-1382) that creates.archive-Nalongside the chat task - Don't lose archive FUNCTIONALITY — if archiving completed/abandoned tasks to
archive.jsonlis still desired, move it to dispatcher-level logic (a sweep that runs periodically, not a per-chat task). If nobody currently uses archive output, just delete it.
Migration for existing graphs
- On dispatcher boot, scan for legacy
.compact-Nand.archive-Ntasks. Mark them Abandoned in-place with a one-time log message. Do NOT crash if found. - Provide
wg migrate retire-compact-archivecommand that explicitly abandons all such legacy tasks in the current graph (opt-in cleanup). - Document the removal prominently — anyone with stale graphs should run the migration.
What is NOT in scope
- Building the chat memory subsystem (separate task — was previously informally proposed; spec it as its own thing if/when needed).
- Retiring
.coordinator-Nitself — that's the rename-dispatcher-daemon task, separate. - Touching agency pipeline tasks (
.assign-*,.evaluate-*,.flip-*) — those stay.
Files likely to touch
src/commands/service/ipc.rs—handle_create_coordinatorcompanion-task creationsrc/service/compactor/— entire module probably deletablesrc/commands/service/coordinator.rsorsrc/commands/service/mod.rs— compaction-trigger logic in main loopsrc/config.rs— drop compaction config keys (with deprecation aliases)src/commands/service/coordinator_agent.rs— any compaction integration in chat-agent loop- Tests in
tests/— any test referencing.compact-or.archive-cycles
Validation
-
Failing tests first:
- test_create_chat_does_not_create_compact_companion (creating a new chat agent does NOT auto-create a
.compact-Ntask) - test_create_chat_does_not_create_archive_companion (same for
.archive-N) - test_legacy_compact_archive_tasks_loaded_then_abandoned (boot finds legacy tasks, abandons them with a single warning)
- test_compactor_state_module_removed (compile-time check:
crate::service::compactordoes not exist OR returns an empty stub) - test_legacy_compaction_config_keys_warn_on_load
- test_create_chat_does_not_create_compact_companion (creating a new chat agent does NOT auto-create a
- Implementation makes all tests pass
- cargo build + cargo test pass with no regressions
-
Manual smoke:
- In a scratch dir:
wg init -x claude→wg service start→ use TUI to create a new chat → assertwg listshows ONLY the chat task, NO companion.compact-/.archive-tasks - In a scratch dir with a legacy graph (copy one in): start daemon → assert legacy
.compact-N/.archive-Ntasks are visible as Abandoned with a 'retired' log message; daemon does not crash
- In a scratch dir:
Depends on
Required by
- (none)
Log
- 2026-04-26T16:42:38.670462263+00:00 Task paused
- 2026-04-26T16:43:16.369230147+00:00 Task published
- 2026-04-26T16:43:38.327542372+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer fits the careful refactoring, TDD-first approach, and regression-free deletion work required for this feature removal.
- 2026-04-26T18:59:15.711176551+00:00 Spawned by coordinator --executor native --model opus
- 2026-04-26T18:59:15.741927836+00:00 Task marked as failed: Agent exited with code 1
- 2026-04-26T19:10:28.349187430+00:00 Task reset for retry from failed (attempt #2)
- 2026-04-26T19:10:31.086150908+00:00 Spawned by coordinator --executor native --model opus
- 2026-04-26T19:10:31.115170734+00:00 Task marked as failed: Agent exited with code 1
- 2026-04-26T19:43:06.372827025+00:00 Task reset for retry from failed (attempt #3)
- 2026-04-26T19:43:08.977964350+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-26T19:43:20.291743913+00:00 Starting fresh attempt: investigating compactor module + IPC handler before TDD
- 2026-04-26T19:47:08.982984759+00:00 Plan: (1) drop archive-N creation in IPC, (2) extend cleanup_legacy_daemon_tasks to abandon legacy compact-N, (3) add wg migrate retire-compact-archive subcommand, (4) delete service/compactor.rs and service/coordinator_cycle.rs, (5) remove wg compact CLI, (6) drop compactor refs from coordinator_agent + viz + status, (7) deprecate compactor_interval/compactor_ops_threshold/compaction_token_threshold/compaction_threshold_ratio with warn-on-load, (8) write 5 required tests
- 2026-04-26T20:06:21.021997597+00:00 All 1913 lib tests pass; 5/5 new integration tests pass; sole failure is pre-existing provenance_full_lifecycle_all_ops_recorded (verified failing on unmodified branch via git stash)
- 2026-04-26T20:14:25.148223142+00:00 Manual smoke tests pass: (1) wg init + service start + create-chat → graph contains ONLY .chat-N, no .compact-/.archive-; (2) legacy graph + wg migrate retire-compact-archive abandons both with stripped after-edges; (3) daemon boot with legacy graph logs 'Abandoned 2 legacy daemon task(s): .compact-0, .archive-0' and does not crash
- 2026-04-26T20:33:10.801284494+00:00 Committed: 5a204c285 — pushed to remote
- 2026-04-26T20:39:20.707123980+00:00 Task marked as done