This seems a nice confirmation prompt... much more...
# proj-agent-canvas
c
This seems a nice confirmation prompt... much more intelligible than asking the user to read a bash command. Not all are this readable šŸ˜…
šŸ’Æ 1
(codex app)
@nutritious-balloon-65098 open an issue and resolve it please. Look around, we already have tool summaries in the agent-sdk, maybe it helps - but note that this kind of question would be displayed only when confirmation mode is enabled.
n
I'm on it! can track my progress here.
Done! Here's a summary of what I did: Issue opened #4210 — Confirmation prompts in examples show raw action dumps instead of the LLM-provided action summary The insight: the SDK already injects a
summary
parameter into every tool schema (
_create_action_type_with_summary
in
tool/tool.py
) and extracts it into
ActionEvent.summary
— a concise, LLM-authored, natural-language description of each action. But the two reference examples that implement confirmation prompts (
04_confirmation_mode_example.py
and
16_llm_security_analyzer.py
) ignored it, instead printing a truncated Pydantic repr like:
Copy code
1. terminal: command='ls -la' is_input=False timeout=None reset=False...
Since these previews are only shown when confirmation mode is enabled, that's exactly where the summary should shine (as in the Codex app screenshot you shared). Resolution (committed as 0af5174) Both examples now lead with the summary and keep the raw snippet as secondary detail — users still see exactly what will run before approving:
Copy code
šŸ” Agent created 1 action(s) awaiting confirmation:
  1. [terminal] List all files in current directory with details
     command='ls -la' is_input=False timeout=None reset=False kind='TerminalAction'...
Verification • āœ… pre-commit (ruff, pycodestyle, pyright, import rules) passes on both files • āœ… Ran
04_confirmation_mode_example.py
live against the All-Hands LLM proxy — the output above is real, and the run completed cleanly with no leftover files Would you like me to push this to a branch and open a PR (referencing #4210, using the repo's PR template — note the
HUMAN:
section will need your own words), or keep the changes local for now?
c
Sure @nutritious-balloon-65098 go ahead. How about canvas, with this PR will it show the summary or do we need a PR there too? Open it if so. In both cases set ready, and /iterate
n
Sure — pausing. Here's where everything stands: Status summary SDK PR: #4211 (marked ready for review, resolves #4210) • āœ… 35 checks passed, 0 pending • āŒ 2 failures, both non-code: a. Validate PR description — it needs a human-written note between
HUMAN:
and
AGENT:
in the PR description. Per repo policy I can't edit that section — you'll need to add a short note (20+ chars) in your own words on the PR. b. REST API (OpenAPI) — pre-existing failure, also failing on
main
and other recent branches (complains about a
base_url
default removal from an earlier merge). Unrelated to this examples-only change; it should clear once fixed upstream. Agent Canvas — answer to your question No PR needed there. Canvas already consumes `ActionEvent.summary`: •
get-event-content.tsx
uses
getSummaryTitleForActionEvent()
as the headline title for action events in the chat, and it even filters out the server's
{tool_name}: {json-args}
fallback so it never shows raw dumps. • Since the pending action is rendered as a normal action event in the chat while the confirmation buttons appear below it, the summary is already what users see when deciding to approve/reject. The gap was only in the SDK's reference examples, which is what #4211 fixes. When you resume • Add the HUMAN note on #4211, then the description check will re-run. • The REST API check should be re-run (or will pass on rebase) once main is fixed — no action from this PR required. • The
qa-changes
bot passed, and no review-bot feedback is pending so far.
c
@nutritious-balloon-65098 re: the REST failure, check the workflow, understand that we have some maintainer-approved exceptions, this should be one of them, but narrow: propose a pr with that fix, from main
n
Done — the fix works. Here's the full picture: PR #4213 — fix(ci): accept the /api/vscode/url base_url documented-default removal Root cause understood: The
REST API breakage checks
workflow compares the current OpenAPI schema against the v1.37.0 PyPI baseline with oasdiff. #4181 changed the server-side fallback for the optional
base_url
query param of
GET /api/vscode/url
(hardcoded
:8001
→ actual configured VSCode port), and oasdiff flags the removed documented default as breaking — even though the param stays optional and omitting it still works. The script already has a maintainer-approved exception mechanism (the
/api/cloud-proxy
removal from PR #3326), so this is the same pattern. The fix (narrow by construction):
_is_accepted_vscode_base_url_default_removal()
matches only the exact oasdiff change: rule id
request-parameter-default-value-removed
+
GET /api/vscode/url
+ operationId + the literal
base_url
/
<http://localhost:8001>
text. I verified narrowness with negative tests (different param, endpoint, rule id, or default value → still breaking), and reproduced the CI failure locally before the fix (exit 1) and success after (exit 0 with an explanatory
::notice
). Verification on the PR itself: the
REST API (OpenAPI)
check is āœ… SUCCESS on #4213 — end-to-end proof, since the same workflow was red on main. Status: 22 passed, 0 pending, marked ready. Two known non-code items: 1. PR Description Check — needs your human note in the
HUMAN:
section (same as #4211; I can't edit it). 2. check-pr-artifacts — fails with `Resource not accessible by integration`: the workflow can't post comments from fork PRs. The smolpaws account has no push access to the org repo, so the branch lives on
smolpaws/software-agent-sdk
. This failure is a fork-permissions limitation, not related to the change (there's no
.pr/
directory in this PR). Once #4213 merges, the
REST API (OpenAPI)
failure on #4211 (and main) clears on re-run/rebase.
Here's where we are with the summary work: Status SDK PR #4211 (the summary-in-confirmation-previews fix, closes #4210) • āœ… 36 checks passed, 0 pending — and the PR description check now passes (thanks for adding the HUMAN note!) • āŒ Only remaining failure: REST API (OpenAPI) — the pre-existing main breakage, not caused by this PR CI-fix PR #4213 (unblocks that REST failure) • āœ… REST API check green on it, ready for review, mergeable • Needs its own HUMAN note + a maintainer review. Once merged, re-running the REST check on #4211 clears the last red. Canvas — no PR needed āœ… I checked when you first asked: agent-canvas already displays the summary, so #4211 alone completes the picture. Specifically: •
src/components/conversation-events/chat/event-content-helpers/get-event-content.tsx
has
getSummaryTitleForActionEvent()
, which uses
event.summary
as the headline title for every action event rendered in the chat. • It even has an
isServerFallbackSummary()
guard that detects the SDK's
{tool_name}: {json-args}
fallback and suppresses it, falling back to nicer action-kind titles ("Running `cmd`", "Editing `path`") — so it never shows raw dumps. • In confirmation mode, the pending action renders as a normal action event (with its summary headline) and
ConversationConfirmationButtons
appears beneath it with the accept/reject controls and risk alert. So the user already sees the readable summary when deciding. The only place showing raw
str(action.action)
dumps was the SDK's own reference examples — which is exactly what #4211 fixes. What's left 1. Someone adds the HUMAN note on #4213 and a maintainer approves/merges it. 2. Re-run the REST API check on #4211 (or rebase) → all green → merge. Want me to keep polling both PRs and drive them through (/iterate style), or pause here?