Sənədlər ingilis dilindədir.
Approvals of high-risk actions
Agents work inside a disposable git worktree and an OS sandbox, and every tool call they make passes the policy engine first. The engine parses shell commands with tree-sitter and classifies each call:
| Risk | Examples | Decision |
|---|---|---|
| LOW | reading files, git status, ls, linters | allowed |
| MEDIUM | builds, tests, package installs, local git commits, file edits in the worktree | allowed |
| HIGH | git push, changing git remotes or credentials config, gh/glab writes, publishing packages, docker push/login, ssh/scp, uploads or authenticated requests with curl, reads outside the readable paths, writes outside the worktree | denied, or an approval request |
| CRITICAL | sudo, broad rm -rf, terraform apply, kubectl/helm changes, force pushes, curl … | sh, reading credential files | always denied |
Whether a HIGH call is denied or turned into an approval request is a setting of the agent's policy profile
(approvals.high: deny | ask). The bundled profiles:
| Profile | Agents | HIGH |
|---|---|---|
dev-standard | backend-developer, frontend-developer, qa | deny |
readonly, research | architect, code-reviewer, analyst, triage, researcher | deny |
devops-plan-only | devops | ask |
Pushing is never something to approve in issue work: meiksense pushes meik/* branches itself, outside the
sandbox, after the gates passed. Approvals are for the rare action an agent cannot do without, typically with the
devops agent or a custom profile.
What happens
- A HIGH call under
approvals.high: askis not run. meiksense files an approval requestA-<n>(tool, exact request, risk, reasons) and tells the agent: "This HIGH-risk action needs human approval … An approval request has been filed. Do not retry it now; continue with the rest of the work." - The agent finishes what it can. When its run ends with pending requests, meiksense saves its work (a checkpoint commit "wip before approval" and its handoff) and the task waits in AWAITING_APPROVAL. Nothing prompts you in the middle of a run.
- An issue whose task waits stays in its current state (DEVELOPING, or FIXING_PIPELINE / ADDRESSING_REVIEW for a
fix) until the decision. There is no Slack event for pending approvals in this release: watch the approvals
page or
meik approvals. - When no request of the task is pending any more, the paused stage resumes the same agent session with the note "Resuming after human approval". An approved request is allowed exactly as it was written; a denied one comes back to the agent as "human denied …", and it has to find another way.
Every denied call counts toward the profile's approvals.max_denials (default 8) per run; above it, or after two
CRITICAL attempts, the run is stopped and the task is BLOCKED.
In plain words
Every request comes with one plain sentence above the command, in the reader's language (English or Azerbaijani), for example:
The assistant wants to read “release notes” from api.example.com, signed in with an access key (not on the list of approved sites) — allow?
The assistant's reason: “Check the library's latest version before upgrading it”
- The sentence is built from the request itself: what kind of action (a call to a site, downloading and running a
script, installing or publishing a package, uploading code with
git push, connecting to a server, changing, deleting or opening a file, a web search, another program or tool), the site, method, file or package, whether credentials are sent, and whether the site is outside the sandbox's allowed network domains (sandbox.network_domainsplus the repositories'network_domains). Further commands of the same request are counted ("and 2 more steps"). - The assistant's reason is the description the agent gave its tool call (Claude Code's and Codex's Bash
description, WebFetch'sprompt). It is the agent's own text: control characters removed, secrets redacted, capped at 300 characters, and shown as plain text. Requests filed before this release, and calls without a description, show no reason. - The sentence is presentation only. It never changes the decision: the policy engine classifies the exact request on its own, and an approval allows exactly the request shown under the sentence. Read the command when it matters.
- In the simple view (product owners, or anyone who switched it on) the card shows the sentence, the reason and the buttons; the command, risk, tool, task and the policy's reasons are folded under Technical details. The developer view shows the sentence above the unchanged technical card.
- The API returns the facts behind the sentence as
plain(action,host,method,subject,signedIn,outsideAllowlist,path,package,manager,registry,program,remote,query,purpose,more) and the stored reason aspurpose, onGET /api/v1/approvalsand on each approval ofGET /api/v1/tasks/{task}. - A link
/approvals?id=7(or?id=A-7) scrolls to that request and highlights it for two seconds; the dashboard's approval rows link there.
Deciding
| Where | List | Approve | Deny |
|---|---|---|---|
| CLI | meik approvals [-a] | meik approve A-7 [--remember] [--note "…"] | meik deny A-7 [--note "…"] |
| Web UI | the approvals and task pages (UI tour) | approve, optionally remembered | deny |
| API | GET /api/v1/approvals?status=pending|approved|denied|all&task=T-12 | POST /api/v1/approvals/A-7/approve { "remember": true, "note": "…" } | POST /api/v1/approvals/A-7/deny { "note": "…" } |
-
Remember (
--remember,"remember": true) also allows this exact request for the whole project from now on (remembered_rules). It never lowers CRITICAL calls, and a request that differs in any character is asked again. -
Approval ids accept
A-7,a7or7. Only pending requests can be decided (409otherwise). -
Who may decide: in service mode the roles maintainer (of the task's project) and admin (
approval.decide); every role can read them. Every decision is audited (approval.approve,approval.deny). -
Product owners (role
po) holdapproval.decidein their projects, but HIGH-risk tool approvals (every approval today) go to maintainers and admins unless the global settingui.po_tool_approvalsistrue:ui: po_tool_approvals: true # default falseOff (the default), a user whose roles are all
podoes not see these requests on the approvals page or inGET /api/v1/approvals, and deciding one answers403. On, she sees the requests of her projects and may decide them like a maintainer. Each list item carriescanDecidefor the signed-in user. -
In service mode
meik approvals,meik approveandmeik denygo through the API once you ranmeik login(or setMEIK_API_URLandMEIK_API_TOKEN), with your RBAC and an audit entry; the list shows each task's project (--jsonfor scripts).
Trying the policy
meik policy check "git push origin HEAD" # → HIGH, with the reasons and the message the agent sees
meik policy check "terraform apply" --agent devops
curl -X POST "$MEIK_URL/api/v1/policy/check" -H "Authorization: Bearer $MEIK_TOKEN" \
-H 'content-type: application/json' -d '{ "command": "git push origin HEAD", "agent": "devops" }'
Policy profiles are YAML (defaults/policies/*.yaml; overrides in ~/.meiksense/policies/ or, in service mode, as
definitions through the API / web UI). The security guide describes the classifier, the floor
rules profiles cannot lower, and the sandbox.