Skip to content

feat: make agent workspace path configurable via CLI flag #96

Closed

Description

@pavelanni

Background

PR #95 changed the default agent workspace from /tmp/agent-workspace to /workspace and introduced a defaultWorkspace constant in internal/cmd/serve.go. The workspace can already be set via agent-config.yaml:

```yaml
tools:
workspace: /my/custom/path
```

However, there is no CLI flag or env var to override the workspace at startup time without editing the ConfigMap. This was explicitly listed as a Non-Goal in PR #95 to keep that PR focused.

Proposed Change

Add a --workspace flag to the serve command (and a corresponding DOCSCLAW_WORKSPACE env var fallback) that sets the workspace path, with priority:

  1. agent-config.yaml tools.workspace (explicit config wins)
  2. --workspace flag / DOCSCLAW_WORKSPACE env var
  3. defaultWorkspace constant (/workspace)

This allows operators to override the workspace at the pod/container level without modifying the ConfigMap — useful for multi-tenant deployments or when the ConfigMap is managed by a different team.

Acceptance Criteria

  • docsclaw serve --workspace /data/agent sets the workspace when agent-config.yaml has no workspace field
  • DOCSCLAW_WORKSPACE=/data/agent env var has the same effect
  • agent-config.yaml tools.workspace still takes precedence over the flag
  • Deployment manifests updated with commented-out example

Tracked from PR #95 review (CodeRabbit suggestion, deferred as out of scope).

Activity

  1. added
    enhancement
    on Jul 1, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions