Modes & permissions
Choose how much autonomy the AI has over your document and computer, and approve sensitive actions as they arise.
Switch modes from the menu at the bottom-right of the message box or press Shift+Tab. Whenever an action reaches outside document editing, the AI presents a permission card and waits for your approval.
Compare the three modes
| Mode | Summary | Document behavior | Best for |
|---|---|---|---|
| Chat | Read-only | Reads the document without modifying it. You can keep editing manually while chatting. | Questions, summaries, feedback, research, and planning |
| Agent (default) | Review before applying | Stages edits as a live preview on the page and waits for you to Accept or Reject. | Drafting, revising, proofreading, table edits, and most everyday tasks |
| Full access | Apply directly | Applies edits immediately on every tool call without a review step, and allows local file and command access. | Predictable batch edits and automation |
Shift+Tab toggles only between the two safe modes (Chat and Agent). To avoid turning on Full access by accident, select it explicitly from the menu (or press 1–3 while the menu is open). Change the default mode for new chats in Settings → AI → Models & connections → Default mode.
Reviewing changes in Agent mode
When the AI edits your document in Agent mode, you can inspect the changes in three places:
- On-page preview: Newly written sentences and revised words appear live in the document. Hover or place your cursor on a change to see the removed original text.
- Review bar above the message box: Shows
Editing · +N −Nwhile working, then turns intoReview changeswhen done. Click it to jump straight to the review card. - Changes panel (⌘D / Ctrl+D): Lists before-and-after diffs (
−/+) for paragraphs, formatting, tables, pictures, and equations in the current turn; click any item to jump to that paragraph.
- Accept (Ctrl+Enter): Applies all pending edits to the document as a single Undo step, so one ⌘Z reverts the entire turn if you change your mind.
- Reject: Discards all pending edits and restores the exact state from before the turn.
- If a run stops mid-way or hits an error, the edits already produced aren’t lost — they remain staged for you to inspect and accept or reject.
Exception: When the AI creates a brand-new document from chat (create_document), it writes directly without staging a review preview, even in Agent mode.
Restore to before a prompt
Even after accepting changes — or after several turns in Full access mode — you can jump back to the exact state before any recent prompt.
- Before every editing turn, HamaEditor snapshots the document in memory (up to the 5 most recent prompts per document).
- Hover over one of your sent messages in the chat and click Restore before this turn to revert the document to that snapshot.
- On your next message, the AI is automatically notified that the document was restored so it re-reads before continuing.
Concurrent edit locks
You can keep multiple chats open for the same document, protected by two locks so edits never collide:
- One editing chat per document: While one chat is actively editing or holding unreviewed changes for a document, other chats on that document run in read-only Chat mode.
- Post-edit lock duration: Briefly locks typing while the agent writes so your keystrokes don’t clash with incoming edits. Defaults to 3 seconds; adjust from
Never lockup to1 minuteorEntire turnin Settings → AI → Models & connections → Lock editor after agent edits.
Permission cards
When a task requires sensitive access outside the open document, the AI shows a permission card in the sidebar stating the exact target (site, path, or command) and why it needs access.
- Choose Allow once (this chat), Always allow, or Deny.
- Approvals are required for editing other open documents or project resources, reading/submitting forms or downloading on signed-in sites in the built-in browser, using saved logins or secrets, and running local commands.
- Change any always-allowed site back to
Ask every timeorBlockanytime in Settings → Browser → Permissions.