Skip to content

Fix/kiro workspace agents#6

Open
robertpyke wants to merge 10 commits intoformulahendry:mainfrom
robertpyke:fix/kiro-workspace-agents
Open

Fix/kiro workspace agents#6
robertpyke wants to merge 10 commits intoformulahendry:mainfrom
robertpyke:fix/kiro-workspace-agents

Conversation

@robertpyke
Copy link

This builds on the other PR. I noticed that the workspace specific kiro configs I was using didn't appear to be picked up. Looking into it, it appeared the cwd wasn't being set correctly (including it looks like the defaultWorkingDirectory was being ignored). This fixed the issue for me, such that the working directory is now used

The most relevant bit of the code change:

    // Resolve working directory: explicit setting > workspace folder > process cwd
    const configCwd = vscode.workspace.getConfiguration('acp').get<string>('defaultWorkingDirectory', '');
    const cwd = configCwd || vscode.workspace.workspaceFolders?.[0]?.uri.fsPath || process.cwd();

robertpyke and others added 10 commits February 24, 2026 14:52
…ions

When multiple permission requests arrived simultaneously, each showQuickPick
call would dismiss the previous one, silently returning 'cancelled'. This
caused allow_always selections to appear broken — the agent would keep
re-asking for permissions that the user had already approved.

Added a serial promise queue to PermissionHandler so concurrent requests
are shown one at a time.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ions

When multiple permission requests arrived simultaneously, each showQuickPick
call would dismiss the previous one, silently returning 'cancelled'. This
caused allow_always selections to appear broken — the agent would keep
re-asking for permissions that the user had already approved.

Added a serial promise queue to PermissionHandler so concurrent requests
are shown one at a time.
… are discovered

The agent child process was spawned without a cwd, inheriting the
VS Code extension host's working directory. This meant agents like
kiro-cli could not find workspace-scoped config files (e.g.
.kiro/agents/*.json) because they were not running from the
workspace root.

Now the cwd is resolved once (acp.defaultWorkingDirectory setting >
first workspace folder > process.cwd()) and passed to both the
spawn call and the ACP newSession request, keeping them consistent.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the VS Code ACP Client extension to improve reliability and configurability when interacting with agents (permission prompting + working directory), while also expanding the default agent list and updating release metadata.

Changes:

  • Queue concurrent permission prompts to prevent overlapping QuickPick dialogs.
  • Run spawned agent processes in a configurable working directory (acp.defaultWorkingDirectory, falling back to workspace).
  • Add OpenClaw as a pre-configured agent and bump extension version/docs accordingly.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/handlers/PermissionHandler.ts Serializes permission requests via an internal promise queue and adds error fallback behavior.
src/extension.ts Removes the old showLogs command registration and adds telemetry for log/traffic commands.
src/core/SessionManager.ts Resolves working directory (setting > workspace > process cwd) and threads it into agent spawn + ACP session creation.
src/core/AgentManager.ts Extends spawnAgent to accept cwd and passes it to the child process spawn options.
README.md Updates agent count/docs, adds OpenClaw, and updates repository URLs.
package.json Bumps version, updates description, and adds OpenClaw to default acp.agents.
package-lock.json Updates lockfile metadata consistent with the version bump/tooling changes.
CHANGELOG.md Adds entries for 0.1.3–0.1.5 documenting the changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +28
const config = vscode.workspace.getConfiguration('acp');
const autoApprove = config.get<string>('autoApprovePermissions', 'none');

Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autoApprovePermissions is defined in the extension configuration as enum ask | allowAll with default ask, but the runtime fallback here uses 'none' (a value outside the enum). To keep behavior/logging consistent and avoid confusing values if the setting ever comes back undefined, use 'ask' as the fallback (and consider typing it as the union).

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +22
## [0.1.3] - 2026-03-01

### Added
- **OpenClaw**: Added OpenClaw as a pre-configured agent (`npx openclaw acp`)

Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog says OpenClaw was added in 0.1.3, but this PR also introduces OpenClaw in README/package.json while bumping the extension to 0.1.5. Please double-check the intended version history and ensure the OpenClaw entry appears under the version that will actually ship it (to avoid misleading release notes).

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +8
## [0.1.5]

Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changelog heading is missing a release date, while other entries below include one (e.g. ## [0.1.3] - 2026-03-01). Consider adding a date for consistency (e.g. ## [0.1.5] - YYYY-MM-DD).

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +14
## [0.1.4]

Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changelog heading is missing a release date, while other entries below include one. Consider adding a date for consistency (e.g. ## [0.1.4] - YYYY-MM-DD).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants