Skip to content

Open links without xdg-open, give agents Sonny's current tools and subscriptions, retry Bedrock clock-skew refusals - #382

Merged
lydakis merged 5 commits into
mainfrom
claude/project-thread-fwzozw
Oct 29, 2026
Merged

lydakis merged 5 commits into
mainfrom
claude/project-thread-fwzozw

Conversation

@lydakis

@lydakis lydakis commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Four fixes from a day of use. Each one copies a pattern other tools already use. One commit per fix, plus one commit for a review finding.

1. Sonny: open links with the desktop's opener, or copy them

open() ran xdg-open alone, so on a Linux machine without it, opening a link showed only the spawn error. Sonny now uses the open crate, which tries the openers a desktop may have (xdg-open, gio, wslview and the rest). When none is installed, the link goes on the clipboard (pbcopy or OSC 52) and the notice says so, the way a CLI login that can't open a browser prints its URL.

2. Sonny: the lookout gives agents Sonny's current tools when it starts

Sonny declared its tools on a bot only when the bot's window opened. An agent nobody opened after an upgrade, such as a task out of sight, kept the tools it was made with and never got exec. Codex and Claude Code take a session's tools from the current client, not from when the session started.

Now, when the lookout starts (so after every upgrade), it brings every agent Sonny declared on up to this build's tools, as opening its window would (declared::refresh):

  • An agent counts as Sonny's only when one of its declared tools is answered by Sonny's lookout (answered_by: "sonny"). A tool that merely shares a name doesn't count; this was the Codex security finding, fixed in f0e4a62.
  • A lead stays a lead, judged by start_task.
  • A newly added gated tool is gated the way the bot's auto or ask mode gates the rest.
  • A busy agent is tried again each minute, for an hour.

3. Sonny: every agent gets the subscriptions tool

Any bot could already subscribe through the agent CLI and the lookout's files, and the lookout itself knows nothing of leads. But only a lead was given the tool, so a monitor needed a hand-written subscription file to hear a source. The tool now goes to every agent Sonny declares on, gated as before, and each agent subscribes only for itself. The README's tool list now matches.

4. Bedrock: retry a signature refused for its time

A request signed before the machine slept and received minutes later is refused as expired, and the turn failed for good. Every attempt is already signed at send time, so the only gap was how the refusal was classified.

A 401 or 403 whose x-amzn-ErrorType is one of the clock-skew codes the AWS SDK for Java retries (RequestTimeTooSkewed, RequestExpired, RequestInTheFuture, InvalidSignatureException, SignatureDoesNotMatch, AuthFailure) now retries at once as provider_signature_expired, signed again. The check reads the typed code, not the message, and re-resolving changed keys still comes first. The new code is documented in docs/RUST_PROTOTYPE.md.

Tests

  • cargo test -p sonny: 453 passed. New: an_agent_sonny_declared_on_before_takes_this_build_s_tools, which covers the name-collision case.
  • cargo test -p agent-runtime --lib: 180 passed. New: a_refusal_for_the_signature_s_time_is_told_from_one_for_its_keys.
  • cargo clippy --all-targets is clean, and cargo fmt was run.
  • The Bedrock provider refuses a non-https URL, so the HTTP path of fix 4 has no end-to-end test. The classification is unit tested, and the retry rides the existing retryable list.

🤖 Generated with Claude Code

…s installed

Links, files and pages opened through xdg-open alone, so a Linux machine
without it showed only the spawn error. The open crate tries the openers
a desktop may have (xdg-open, gio, wslview and the rest); when none is
there, the link goes on the clipboard and the notice says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
Sonny declared its tools on a bot only when the bot's window opened, so
an agent no one opened after an upgrade, such as a task out of sight,
kept the tools it was made with and never got exec. When the lookout
starts, it brings every agent Sonny declared on up to this build's tools,
as opening its window would: a lead stays a lead, a new gated tool is
gated as the bot's mode gates the rest, and a busy agent is tried again
each minute.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
A request signed before the machine slept and received minutes later is
refused as expired, and the turn failed for good. A 401 or 403 whose
x-amzn-ErrorType is one of the clock-skew codes the AWS SDK for Java
retries now retries at once as provider_signature_expired, and the retry
is signed with the time then, as every attempt already is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
@lydakis lydakis self-assigned this Oct 29, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T23:46:57.155916Z e7dc056 New commits
🔒 Security Review ✅ Completed 2026-10-29T23:51:31.230899Z e7dc056 New commits

Security findings

Advisory findings (1)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: be47c90605

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread sonny/src/declared.rs Resolved
An agent another client made could share a tool's name with one of
Sonny's (memory, plan), and the lookout would have taken it for Sonny's
and added tools to it, an ungated goal check among them. Ownership is now
a declared tool answered by Sonny's lookout, which no other client's tool
carries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
Any bot could already subscribe through the agent CLI and the lookout's
files, and the lookout knows no leads, but only a lead was given the
tool, so a monitor needed a hand-written subscription file to hear a
source. The tool now goes to every agent Sonny declares on, gated as
before; each subscribes for itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGDsJVnkrdmmdTXFLin
@lydakis lydakis changed the title Open links without xdg-open, give old agents Sonny's current tools, retry Bedrock clock-skew refusals Open links without xdg-open, give agents Sonny's current tools and subscriptions, retry Bedrock clock-skew refusals Oct 29, 2026
@lydakis
lydakis merged commit 90a6712 into main Oct 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants