Skip to content

agent start: decide the base-tree grant rule for a workspace that is not a worktree #671

Open

Description

@tps-flint

Follow-up from #648 (merged d981d48).

agentLaunchOptions refuses any launch grant that overlaps the base working tree for a registered worktree and for an unregistered worktree with a regular .git file. A workspace that is not a git worktree at all (binding kind: "none", e.g. a plain directory or an absent workspace) skips that check, so its launch can keep a cwd grant that is the base repository directory (packages/cli/src/utils/nono.ts ~366; current test at packages/cli/test/agent-launch-options.test.ts ~362).

Decide and test: either a plain or absent workspace must also never receive a grant overlapping a known base repository (and the check applies to it), or document why a non-worktree launch may run in the base directory. Either way, add the test that pins the chosen behaviour.

Refs #648

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions