Skip to content

fix(run): answer permission requests from child sessions in headless runs - #651

Merged
agenteinstinct1-max merged 13 commits into
dev-vibecodedfrom
m-f4
Oct 27, 2026
Merged

agenteinstinct1-max merged 13 commits into
dev-vibecodedfrom
m-f4

Conversation

@agenteinstinct1-max

Copy link
Copy Markdown
Collaborator

Issue for this PR

Fixes #650

Type of change

  • Bug fix

What does this PR do?

The headless run permission handler now answers asks from child sessions of the run's root session, with the same reply the root gets (--yolo once, otherwise reject). Ownership is checked via background.owns, else by walking parentID up to the root (depth 16). Nothing else about admission or policy changes.

How did you verify your code works?

New test test/cli/run/child-permission.test.ts: passes with the change, fails (no exit within 20s) with run.ts reverted. Local Linux, mock provider. Not verified: tsgo locally (timed out at my cap, CI typecheck decides), the wider test/cli/run suite locally, Windows, real models.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@kilo-code-bot

kilo-code-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/opencode/src/cli/cmd/run.ts
  • packages/opencode/test/cli/run/child-permission.test.ts
Previous Review Summaries (4 snapshots, latest commit 2e6f585)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 2e6f585)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • packages/opencode/test/cli/run/child-permission.test.ts

Previous review (commit 372dd39)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • packages/opencode/test/cli/run/child-permission.test.ts

Previous review (commit d235d66)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/opencode/src/cli/cmd/run.ts
  • packages/opencode/test/cli/run/child-permission.test.ts

Previous review (commit c511f8e)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/opencode/src/cli/cmd/run.ts
  • packages/opencode/test/cli/run/child-permission.test.ts

Fix these issues in Kilo Cloud


Reviewed by free · Input: 65.9K · Output: 1.5K · Cached: 280.4K

@agenteinstinct1-max
agenteinstinct1-max merged commit 1d41fa7 into dev-vibecoded Oct 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant