Skip to content

Commit f4b519f

Browse files
bekossyclaude
andcommitted
revert: remove /invoke backwards-compat stripping from remote_forward_v0
The stored URL is always the service base (pre-/invoke); /invoke is appended unconditionally. The backwards-compat stripping logic was unnecessary and has been reverted to the original single-line form. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6439151 commit f4b519f

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

sdks/python/agenta/sdk/engines/running/handlers.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,13 +2275,9 @@ async def remote_forward_v0(
22752275
got=webhook_url,
22762276
) from exc
22772277

2278-
# The stored url is the service base; /invoke is always the invoke surface.
2279-
# Strip a trailing /invoke first so existing hooks that stored the full
2280-
# endpoint URL don't get /invoke/invoke after this PR's behaviour change.
2281-
base_url = webhook_url.rstrip("/")
2282-
if base_url.endswith("/invoke"):
2283-
base_url = base_url[: -len("/invoke")]
2284-
target_url = f"{base_url}/invoke"
2278+
# The stored url is the service base (pre-/invoke); the invoke surface lives
2279+
# at /invoke and is always appended.
2280+
target_url = f"{webhook_url.rstrip('/')}/invoke"
22852281

22862282
log.info("remote_forward_v0 POST", url=target_url)
22872283

0 commit comments

Comments
 (0)