Skip to content

"Accept edits" still prompts for file edits, and the prompt reads "The agent wants to run The agent is asking for permission?" #294

Description

@pacifio

Two bugs, same screen

Testing the permission modes end to end. Plan mode works correctly. Accept-edits does not, and the permission dialog it wrongly shows is also malformed.

0.3.3 @ 69c56bfd, Atlas Agent cersei, Claude Sonnet 4.6.


1. "Accept edits" prompts for a file edit

The mode describes itself as:

Accept edits — Auto-approve file edits; prompt for shell

Repro (reproduced twice, fresh thread each time):

  1. Set mode to Accept edits — the composer pill confirms ● Accept edits.
  2. Prompt: "Create a file called ACCEPTEDITS2.md containing the single word ok."
  3. The agent calls apply_patch — a pure file edit, no shell.
  4. A permission dialog appears anyway, for the edit:
{
  "paths": [ "C:\Users\…\sample-project\ACCEPTEDITS2.md" ],
  "patch": "ok\n"
}

Expected: auto-approved, no prompt. Shell commands should still prompt.

For contrast, Plan mode is correct: asked to create a file, the agent called no tools and nothing was written to disk.

2. The dialog title is two sentences glued together

The header renders as:

The agent wants to run The agent is asking for permission?

Both halves are identified:

src/features/chat/components/permission-modal.tsx:338

The agent wants to run <span …>{title}</span>?

src/features/chat/components/permission-modal.tsx:194

const title = current.toolCall.title ?? current.toolCall.kind ?? "Tool call";

crates/atlas-native-agent/src/engine/approvals.rs:129

let title = title
    .filter(|t| !t.trim().is_empty())
    .or_else(|| reason.clone().filter(|r| !r.trim().is_empty()))
    .unwrap_or_else(|| "The agent is asking for permission".to_string());

The Rust fallback is a sentence, written to guarantee the dialog is never empty — a good intention, and the comment above it says so. But the frontend already supplies the sentence frame and expects title to be a tool name. When apply_patch permission requests arrive with neither title nor reason, the fallback fires and the two sentences collide.

Suggested fix: make the fallback a noun phrase (e.g. the tool kind, or "a tool call"), so it reads "The agent wants to run a tool call?" — or have the approvals path pass the tool name through as the title, which would be strictly better since the user would see apply_patch.

Note — one thing I could not pin down

After clicking Allow, the turn showed "Editing files" and never completed; the file was never written. I saw this twice, but the first occurrence coincided with atlas_comms: could not reach the token endpoint warnings in the log, and on the retry I lost the thread selection before it resolved. Network was verified up afterwards (gateway reachable, TCP 443 open). Flagging it as unconfirmed rather than filing it — worth a look while fixing the above, since it would be on the same code path.

Environment

0.3.3 @ 69c56bfd, Windows 11, dev build, claude-sonnet-4-6, auth_mode=ApiKey.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions