Skip to content

feat(workspace): plumb ToolContext.directory through AstGrepCli for correct cwd #198

Closed

Description

@terisuke

Currently AstGrepCli uses process.cwd() as spawn cwd. The plugin protocol provides ToolContext.directory which is the session's project directory. Tools using cwd-relative paths/globs should respect that.

Files affected:

  • packages/plugin/src/tools/workspace/astgrep/search.ts (ignores ctx)
  • packages/plugin/src/tools/workspace/astgrep/replace.ts (ignores ctx)
  • packages/plugin/src/tools/workspace/astgrep/cli.ts (defaultSpawnCwd)

Surfaced by Codex CLI review of PR-B (round 3). Tracked as follow-up to keep the LSP+AST-Grep PR scope manageable.

Activity

  1. github-actions commented on May 4, 2026

    @github-actions

    This issue has been automatically closed.

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions