Skip to content

Create workspace base directories during installation #21

Description

@tcarn

Problem

install.sh writes COPILOT_WORKSPACE_BASE and CLAUDE_WORKSPACE_BASE to ~/.config/remote-agent-stack/config, but does not create those directories.

The first documented launch is ca alpha, yet bin/agent currently checks that the configured workspace base already exists and exits if it does not:

COPILOT workspace base not available: /Users/<user>/copilot-workspace

This means a fresh installation requires an undocumented manual mkdir -p step before the first launch.

Expected behavior

After a successful install, the configured workspace roots should exist so the documented first launch works immediately:

ca alpha

The wrapper can then create the per-agent directory (agent-alpha) as it does today.

Proposed change

After resolving COPILOT_WORKSPACE_BASE_RESOLVED and CLAUDE_WORKSPACE_BASE_RESOLVED, create both directories with appropriate user-private permissions, for example:

mkdir -p "$COPILOT_WORKSPACE_BASE_RESOLVED" \
         "$CLAUDE_WORKSPACE_BASE_RESOLVED"
chmod 700 "$COPILOT_WORKSPACE_BASE_RESOLVED" \
          "$CLAUDE_WORKSPACE_BASE_RESOLVED"

The implementation should preserve existing directories and work for custom paths, Dropbox paths, and reruns. If directory creation fails, the installer should fail clearly rather than writing a configuration that cannot be used.

Acceptance criteria

  • A fresh interactive install creates both configured workspace roots.
  • Custom --copilot-workspace-base and --claude-workspace-base paths are handled.
  • Existing directories and contents are preserved on rerun.
  • A fresh install can run ca alpha without a manual directory-creation step.
  • Installer tests cover successful creation and a creation failure.
  • README setup instructions no longer imply an extra manual mkdir is needed.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions