Skip to content

Conversation

sestinj
Copy link
Contributor

@sestinj sestinj commented Sep 30, 2025

Description

fix: show error when cn -p doesnt have tool access


Summary by cubic

Shows a clear error and exits when cn -p runs in headless mode and a tool needs permission, with guidance for --auto, --allow, and --exclude. Prevents hanging and makes tool permission behavior explicit.

  • Bug Fixes
    • Display error via safeStderr with tool name and usage tips (--auto, --allow, --exclude).
    • Use gracefulExit(1) to exit cleanly and flush telemetry in headless mode.
    • Update checkToolPermissionApproval to await the new async handler; runs succeed with --auto or --allow.
    • Add unit and E2E tests covering error display and success cases.

@sestinj sestinj requested a review from a team as a code owner September 30, 2025 21:47
@sestinj sestinj requested review from tingwai and removed request for a team September 30, 2025 21:47
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 30, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 30, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 30, 2025
@sestinj sestinj merged commit 04d4087 into main Oct 1, 2025
53 of 55 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Oct 1, 2025
@sestinj sestinj deleted the nate/dont-hang-on-permissions-headles branch October 1, 2025 15:45
@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2025
@sestinj
Copy link
Contributor Author

sestinj commented Oct 1, 2025

🎉 This PR is included in version 1.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor Author

sestinj commented Oct 1, 2025

🎉 This PR is included in version 1.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer released size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants