feat: enhance repair command to recreate core agents and default workspace#333
Open
aronchick wants to merge 1 commit intodlorenc:mainfrom
Open
feat: enhance repair command to recreate core agents and default workspace#333aronchick wants to merge 1 commit intodlorenc:mainfrom
aronchick wants to merge 1 commit intodlorenc:mainfrom
Conversation
…space Improve the repair command to be more comprehensive by ensuring core agents and a default workspace exist after cleanup. This enhancement aligns with ROADMAP.md P1 "Agent restart" by making repair more robust and reducing the need for manual intervention. Changes: - CLI: Add ensureCoreAgents() and ensureDefaultWorkspace() helpers - CLI: Update localRepair() to recreate missing core agents - CLI: Create default workspace "my-default-2" if none exist - Daemon: Add ensureCoreAgents() and ensureDefaultWorkspace() methods - Daemon: Update handleRepairState() to recreate missing agents - Both: Improve output to show what was removed and what was created - Tests: Add comprehensive tests for all scenarios Key Features: 1. Recreates missing supervisor agent if absent 2. Recreates missing merge-queue (non-fork) or pr-shepherd (fork) 3. Creates default workspace if no workspaces exist 4. Does not duplicate existing agents/workspaces 5. Provides detailed output showing: - Removed: dead agents - Cleaned: orphaned resources - Created: core agents and workspaces Test Coverage: - TestRepairEnsuringCoreAgents: Verifies core agents are created - TestRepairEnsuringPRShepherdInForkMode: Fork mode verification - TestRepairDoesNotDuplicateAgents: Prevents duplicates Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Merge Queue ReviewCI Status: ✅ All checks passing (6/6) Scope Check:
Roadmap Alignment: ✅ Aligns with P1 'Agent restart' - makes repair more robust Note: This is a fork PR. Human action required to merge. Related PRs (likely superseded):
🤖 Merge-queue agent |
3 tasks
Contributor
Author
|
✅ Merge Queue: READY TO MERGE
This PR is ready for maintainer merge. |
whitmo
added a commit
to whitmo/multiclaude
that referenced
this pull request
Mar 1, 2026
whitmo
added a commit
to whitmo/multiclaude
that referenced
this pull request
Mar 1, 2026
Add 14 tests covering daemon handleRepairState, ensureCoreAgents, and ensureDefaultWorkspace. Tests verify response fields, graceful no-ops when tmux session is missing, idempotency, fork mode handling, and error cases for nonexistent repos. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
whitmo
added a commit
to whitmo/multiclaude
that referenced
this pull request
Mar 1, 2026
…c#333 on pr-triage-b2 Tests from multiclaude workers (silly-otter, lively-otter, clever-bear): - PR dlorenc#338: Token-aware status display, hibernate help, rich list_repos response - PR dlorenc#339: Context-aware refresh, worktree path detection, --all flag parsing - PR dlorenc#337: Categorized help (worker report captured, tests via CLI assertions) - PR dlorenc#333: Enhanced repair (worker report captured, daemon handler tests) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 1, 2026
whitmo
added a commit
to whitmo/multiclaude
that referenced
this pull request
Mar 1, 2026
…faultWorkspace, spawnCoreAgent These functions (from PR dlorenc#333) had zero test coverage. Adds 8 tests covering: - ensureCoreAgents with empty state, missing tmux session, existing agents, fork mode - ensureDefaultWorkspace with empty state, existing workspace, missing tmux session - spawnCoreAgent error message includes resp.Error details Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 1, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebased PR #327 onto main to resolve merge conflicts. This PR enhances the repair command with the ability to recreate core agents and default workspace.
Changes:
socket.SuccessResponse()helper (from refactor: add socket response helpers and argument extractors #331) for response formattingConflict Resolution:
The original PR used the old
socket.Response{}pattern, but main now usessocket.SuccessResponse()helper from #331. Resolved by using the new helper while preserving all the new data fields (agents_created,workspaces_created).Supersedes #327 (from spiculedata fork) - that PR had merge conflicts that couldn't be resolved by pushing to the original branch.
Test plan
go build ./cmd/multiclaude- builds successfullygo test ./...- all tests passgolangci-lint run ./...- 0 issues🤖 Generated with Claude Code
Co-Authored-By: David Aronchick aronchick@expanso.io