Repository navigation
fix(a2a): keep a failed agent's logged URLs only as their scheme and host - #92
Closed
earakely-scale wants to merge 3 commits into
Closed
earakely-scale wants to merge 3 commits into
earakely-scale wants to merge 3 commits into
Conversation
…host When an agent's task fails on a sandbox with docker, core keeps the tail of the agent's container logs with the step's error and logs it. An agent that logs the URLs it fetches put grant and signed URLs there, credentials and all. The tail is now passed through redact_urls, which the protocol package exposes from the rule its httpx log filter already used, before it is cut to length, so the cut can't leave part of a URL behind. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…run as its host only The echo agent prints the text of a `fail-with <text>` line and fails the task, so a local run shows the container-log tail kept in the failed step's error, with the URL the agent logged cut to its scheme and host. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… grant server it used, and fails if the registry never answers It ran before the file-parts test, which then reached a grant server still serving the first state root's certificate, and its agents, trusting the new root's CA, couldn't connect. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Closing for now: in the last 7 days, none of prod's failed-agent log tails carried a signed URL, so this isn't needed yet. The fix is on branch edgararakelyan/redact-agent-log-tail if it is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When an agent's task fails on a sandbox with docker,
fetch_container_logstails the agent's container logs. Core logs that tail and keeps it with the failed step's error, which is persisted in the run context. An agent that logs the URLs it fetches therefore had its grant and signed URLs stored with the run, credentials and all. OpenCode does this through its HTTP client's request log.agentenv_protocol.transfers.redact_urls(text)cuts each HTTP(S) URL intextto its scheme and host. It is the rule the protocol's httpx log filter already applied to grant requests, now public, and the filter uses it too.fetch_container_logspasses stdout and stderr through it before cutting them to length. Otherwise the cut could leave part of a URL behind with no scheme for the pattern to match. This covers both the solver's and the rubrics judge's failure paths.Testing
redact_urlson signed, staging and local URLs, leaving the rest of the text alone;fetch_container_logsredacting a URL that the length cut runs through.fail-with <text>line and fails the task. A local run tells it to log a signed URL and fail. The failed step's persisted error keeps the container-log tail, with the URL cut to its host and no part of its signature or credential left.main'sfetch_container_logsfails the integration test: the full URL is kept;tst/unit+ protocol, 6341 passed.🤖 Generated with Claude Code
The PR appears safe to merge; no finding remains outstanding.
What we checked:
Summary
Failed-agent container logs now keep URL origins while hiding URL paths and credentials, so signed or temporary links are not retained in failure details.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Agent container logs] --> B[Redact HTTP URLs] B --> C[Keep the log tail] C --> D[Save the failed step error]Reviews (2) · Last reviewed commit: "test(a2a): the failure-logs test keeps i..." · Reviewed by Greptile