Skip to content

[Bug]: astra default mode does not have write permission #758

Closed

Description

@fengttt

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Version and environment (optional)

astra, build from main dd69973

Actual behavior

Trying to implement a small feature, got these,


█ All three write tools are blocked with the same error: "this run does not allow interactive approval." The workspace
█ is read-write but the run won't accept mutations through any of the visible write tools. Let me try delegating to a
█ child agent, which runs in its own execution context.

Why not give astra write permission? At least to all files under current directory (I have said trust the folder when start).

Expected behavior

Write, ie code editing, should work by default

Steps to reproduce

Run astra and try to vibe some code.

Additional information

No response

Activity

  1. added
    kind/bug
    on Sep 12, 2026
  2. fengttt commented on Sep 12, 2026

    @fengttt
    CollaboratorAuthor

    I definitely started astra from a terminal, that is, interactive. So this is probably another bug, why astra think the session in non interactive.

  3. Shen-KD commented on Sep 15, 2026

    @Shen-KD

    same. Image

  4. Bai-009 commented on Sep 15, 2026

    @Bai-009

    补充复现:Astra v0.2.4 在交互终端中也出现相同问题,显式切换 /allow prompt 后仍未解决。

    步骤:

    1. 在新项目目录启动 Astra,要求创建一个简单网页应用。
    2. 模型报告文件写入被拒绝:The tool was not executed because this run does not allow interactive approval.
    3. 执行 /allow prompt,再次要求继续开发。
    4. 仍报告同一错误,未获得可操作的审批流程。检查项目目录,没有生成应用代码。

    预期:交互模式下需要审批的写入应向用户询问;若当前运行方式不支持,应明确提示如何使用可用的审批入口。请重点核查切换 prompt 模式后,实际执行路径是否收到正确的交互能力设置。

    以上为界面现象与文件结果,尚未确认内部根因。

  5. Bai-009 commented on Sep 15, 2026

    @Bai-009

    补充根因定位(v0.2.4 对应源码 4bffcb9,静态核查,尚未验证修复):

    • TUI 启动时设置 RenderPolicy::Silent,同时已创建审批和提问通道(tui/event_loop.rs:5023–5037)。
    • derive_turn_interaction_mode 的 Prompt 分支只要看到 render_is_silent,就返回 NonInteractive,没有继续检查已存在的交互通道(cli/chat_stream/sse_loop/server_admission_host.rs:334)。因此 /allow prompt 仍会被降为非交互。
    • 此模式传入服务端后,需要审批的操作被直接拒绝,产生本 issue 的报错(crates/runtime/src/server/server_loop_host.rs:8799–8864)。

    核心问题:把“由 TUI 接管显示、不直接打印”与“不能询问用户”混为一谈。建议分开判断渲染方式与交互能力,并回归验证真实 TUI 中 prompt 模式下的写文件审批。无需绕过权限检查。

  6. XuPeng-SH commented on Oct 20, 2026

    @XuPeng-SH
    Collaborator

    Merged PR #1069 fixes Prompt-mode approvals when the TUI uses silent rendering: the approval channel remains active independently of text rendering. Its regressions cover approval and interruption through the stdio path. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions