Repository navigation
Explain commands in plain words on the approval card - #920
sambitcreate wants to merge 11 commits into
Conversation
run_command now requires a plain-language description. The "Run on your Mac?" card opens on that description with a flip button to the exact command, and shows Aiden's own tags read from the command text (soft red for risky steps such as deleting files, the internet, downloaded scripts, admin rights, files outside the project, stopping programs). Desktop chats, Bot chats and aiden serve build the reading where the workspace folder is known. Phones get the words and tags on the typed approval card under the new approval:plain-words opt-in (contract revision 69). aiden serve no longer shows phones raw JSON when a run_command carries a description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
Both phones ask for approval:plain-words alone after approval:cards, decode the card's explanation and tags as strictly as the Mac's parser, and open a shell card on the plain words with a flip button to the exact command. Aiden's tags sit under the card: soft red for risky steps, grey for calm ones. The shared revision-69 fixture is read by the host, iOS and Android tests. On iPhone the flip still works while answering is paused, since only the answer buttons dim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
There was a problem hiding this comment.
Important
Four accepted command shapes bypass parts of the new plain-words safety contract, so these should be fixed before merge.
Reviewed changes I reviewed the complete six-commit diff, including command validation and parsing, desktop and native flip cards, Remote capability gating and projections, CLI parity, fixtures, tests, and documentation.
- Required descriptions —
run_commandnow declares a required model-written explanation and rejects an omitted field before execution. - Independent command reading — a new bounded shell reader generates risky and calm tags without another model call.
- Approval-card presentation — desktop, Bot, iOS, and Android cards open on plain words and flip to the exact command.
- Remote and CLI propagation — provisional revision 69 gates
explanationandtagsbehindapproval:cardsplusapproval:plain-wordsacross stream, run, and Bot approvals. - Contracts and coverage — strict cross-platform fixtures, focused behavioral tests, product docs, design guidance, and mobile changelogs were updated.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
- Refuse a blank run_command description before approval, not only a missing one. - Read the command substitutions an unquoted here-document expands; a quoted one stays text. - Flag a relative path that climbs out of the project anywhere in it (src/../../x). - Flag a script that an earlier step downloaded to a file and a later step runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
There was a problem hiding this comment.
Important
Combined wget short options still bypass the downloaded-script warning, so the approval card can present a fetched script as a calm local action.
Reviewed changes I reviewed the two follow-up commits since the prior Pullfrog review, plus the complete current diff for context.
- Required descriptions — Rejected empty and whitespace-only
run_commanddescriptions before execution and added behavioral coverage. - Command safety parsing — Added expanding here-document inspection, lexical relative-path escape detection, and downloaded-file provenance across command separators.
- CI coverage — Assigned both new plain-words test files to CI lanes.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes I reviewed the wget parser follow-up since the prior Pullfrog review, plus the complete current diff for context.
- Combined short options — Parsed
wget -Oinside valid short-option clusters with attached or separate output names, preserving downloaded-script provenance for-qO fileand-qOfile. - Behavioral coverage — Added positive and negative cases that distinguish the explicit output name from the URL-derived filename.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
iPhone 17 Pro simulator (iOS 27.0), AidenBotUXUITests chat-approval-card and chat-approval-command, light and dark. Android medium_phone emulator (API 36), AidenTypedApprovalCardContent with the riskyCommand card from approval-plain-words-revision-69.json, words and flipped to the command, light and dark. Captured from PR #920 head 59f7889.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes I reviewed the receipt-test fixture update since the prior Pullfrog review, plus the complete current diff for context.
- Required command descriptions — Added plain-language descriptions to the three
run_commandcalls in the process-receipt tests so they continue exercising real success, failure, and receipt-write-fencing behavior under the new required schema. - Focused verification — Confirmed both affected receipt tests execute and pass on the current head.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
|
The non-blocking iOS build and simulator tests (Xcode 27) job failed on 726e505 in two tests this PR doesn't touch:
Both look like failures of the Xcode 27 simulator itself. Earlier PRs saw this lane go red on Generated by Claude Code |
…-3i2krx # Conflicts: # ios/CHANGELOG.md

Requested by sbt · project thread
Problem
The "Run on your Mac?" card shows only the raw shell command, for example
mkdir -p bf-out && sed -i '' 's#/tmp/bf/#bf-out/#g' fetch.py && …. Someone who doesn't read shell can't tell what they're approving.Change
sbt's choices: 1a, 2a, 3a, 4a, 5b. That means a flip button in the corner, a required description, Aiden's own tags, the card always opening on plain words, and one PR that covers everything.
run_command'sdescriptionis now required, with guidance to write one plain sentence that names the files, folders and sites the command touches. A call without it, or with a blank one, is refused before anything runs, and the model is tolddescription: missing. No extra model call is made.renderer/shared/command-reading.tsreads the command text with a small quote-aware shell reader. It uses no model, so a misleading description can't hide them.eval "$(…)",$CMD) gets the can't-read tag.aiden serve. It builds the same reading.daemonApprovalSummaryno longer falls back to raw JSON when arun_commandcarries itsdescription, which used to show phonesrun_command: {…}.approval:plain-wordsaddsexplanationandtagsto a typed shellcard.approval:cards, on stream, run and Bot approvals.readingnever reaches a device.docs/aiden-remote-api-v1.mdgets the capability row and a revision 69 section. Also updated:docs/design-guide.md,PRODUCT.md,packages/cli/README.md,ios/PROJECT_SPEC.md, both phone changelogs and.memory/tool-approval-card.md.Revision 69 is provisional.
mainis at 65 and open PRs claim 66 to 68, so re-claim the next free number at merge. When you do, moveAIDEN_REMOTE_APPROVAL_PLAIN_WORDS_CONTRACT_REVISION,contract.json, the new fixture and the iOS and Android revision asserts together.Not covered yet (follow-ups):
computer_shellbackground_jobThese still show the command alone.
Screenshots
Desktop, light and dark, using sbt's original command (calm) and a risky one.
iPhone and Android, taken on the owner's Mac. The iPhone shots come from
AidenBotUXUITests(chat-approval-cardandchat-approval-command) on the demo chat. Its command,npm run test:upload, only runs tests, so it gets no tags. The Android shots draw the fixture's risky command with a throwaway instrumented test, because no Android demo screen shows this card yet.Scope
Requested in the project thread; no issue.
Verification
npm run type-check: clean. ESLint on the touched files: clean.tsx --test: 782 passed, 0 failed, across:command-reading,approval-card-model,chat-approval-cardaiden-remote-approval-plain-words,aiden-remote-bot-ux,-streams,-host-runs,-bot-session,-protocol,-routercoding-tools,bot-extension,bot-approvals,remote-approval,generation-stream,tool-approval,host-run-registryrun_commandwith no description refused before it runspackages/cli:npm run build && npm test: 368 passed, 0 failed. Includes newdaemonApprovalSummarycases.testDebugUnitTest):wget -qO). Its latest review found no new issues:src/../../xpathsFlaky tests seen
tests/e2e/browser.spec.ts:21("browser user and automation share a sandboxed page…"), Electron E2E (3/5) on 726e505. It failed once and passed on retry. In the failing attempt the viewport didn't switch to the requested 390×844 phone size (innerWidth/innerHeightread 560×427). This PR doesn't touch the browser. Run: https://github.com/sambitcreate/aiden-agent/actions/runs/45458555225/job/138840352183. The failed jobs were rerun once.AidenShellUITests: the app launch timed out and an automation-type mismatch broke the "Add Computer" tap. This lane is also red onmain.AI disclosure
Written by Claude Code, an AI coding agent, at the owner's request.
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_018VA6RJMteUn47RqiwzmhFx