Skip to main content

HCP Waypoint Actions Need a Narrow Execution Contract

·

10 min read

Listen to this article

Matthew · Amazon Polly

0:00
0:00

A self-service button can hide a larger privilege boundary than a deployment form. The interface may expose a single action, while the credential behind that action can access many applications, environments, or administrative endpoints.

The engineering problem is the distance between the task a developer requested and the authority the execution system possesses. A useful action contract keeps that distance small and inspectable.

HCP Waypoint actions became generally available on 3 June 2025, with custom HTTP actions and agent actions for private environments. This article uses that established surface within an evidence cutoff of 28 June 2026. It does not assume capabilities announced after that date. HCP Waypoint is the hosted platform product; its execution agents are not LLM reasoning agents. Actions GA announcement.

The proposed design treats an action as a bounded operation against an identified application. The portal presents it, a controller validates its scope, and a downstream executor retains responsibility for authorization and completion.

A button is an interface, not a permission model.

Custom actions can invoke an external HTTP API with a method, URL, headers, and body. Agent actions can execute configured operations in a private environment. The same developer-facing gesture can therefore trigger very different execution paths. Historical action capabilities.

That flexibility is valuable. It also means that a button labeled “restart service” cannot determine what the underlying credential is capable of. The downstream API might accept a broad application identifier, a different environment, or an arbitrary command.

The control belongs where those inputs become authority. A proposed adapter can map a small operation name to a fixed endpoint and validate the selected application against a trusted inventory. It should not merely forward every form field to a privileged API.

The HCP provider's historically pinned action schema makes the HTTP boundary explicit: a custom request has a method and may include URL, headers, and body. Those fields existed in provider 0.100.0, released in December 2024. They describe request configuration, not an application-specific authorization protocol. Pinned action schema.

Separate configuration authority from invocation authority

The platform engineer who creates an action can define its destination and execution behavior. The application engineer who invokes it usually needs a narrower capability: request a particular operation for an application under their responsibility.

Those are different authorities. Combining them would let a consumer change the destination or operation while retaining access to the platform's execution identity.

The proposed workflow fixes the operation catalog under platform review. Invocation supplies only the bounded inputs that remain legitimate choices, such as an application identifier and an approved deployment revision. Destination URLs, credential references, and command templates remain outside that input surface.

An AI assistant can participate in the same constrained workflow. It can identify the intended application, explain the operation, and prepare a request. It does not need permission to rewrite the action definition or choose a different network destination.

This distinction improves reviewability. The platform can audit changes to the action contract separately from individual executions. An unexpected operation can then be traced to a changed definition, an invalid invocation, or a downstream authorization defect.

Proposed action adapter. Its authorization and replay controls are additional platform logic, not implied HCP Waypoint guarantees.

An executable admission boundary

The following complete example validates a proposed restart request without making a network call. It uses synthetic identifiers and a fixed destination. The function is a local reference design, not a Waypoint API adapter.

from urllib.parse import urlsplit

ENDPOINT = "https://ops.example.internal/v1/restarts"

def admit(request, inventory, grants):
    try:
        url = urlsplit(request["url"])
        port = url.port
    except (KeyError, ValueError):
        return False
    if (url.scheme != "https" or url.hostname != "ops.example.internal"
            or port not in (None, 443) or url.username or url.password
            or url.path != "/v1/restarts" or url.query or url.fragment):
        return False
    if request.get("method") != "POST" or request.get("operation") != "restart":
        return False
    app = inventory.get(request.get("application_id"))
    if app is None or request.get("revision") != app["revision"]:
        return False
    return ((request.get("actor"), app["team"], app["environment"], "restart")
            in grants)

inventory = {"app-42": {"team": "catalog", "environment": "staging",
                        "revision": "deployment-8"}}
grants = {("operator-7", "catalog", "staging", "restart")}
request = dict(url=ENDPOINT, method="POST", operation="restart",
               application_id="app-42", revision="deployment-8",
               actor="operator-7")
assert admit(request, inventory, grants)
assert not admit({**request, "url": ENDPOINT + "?target=production"},
                 inventory, grants)
print("Bounded action admission checks passed")

The actor value would have to come from authenticated identity, not an untrusted payload, in a real implementation. The example accepts it as a parameter so that the authorization decision can be inspected. Treating the supplied string as authenticated would defeat the model.

The application inventory supplies team and environment. The caller does not get to assert those facts independently. Otherwise a production application could be relabelled as staging inside the request while retaining its real identifier.

The revision check rejects an action prepared against an outdated deployment record. This is a proposed consistency rule. A production implementation still needs an atomic or appropriately synchronized check at execution time; a successful preflight does not prevent a later race.

Destination validation has a network boundary

The example checks URL components rather than searching for a trusted hostname anywhere in a string. A suffix, user-information segment or query parameter should not be enough to redirect a privileged operation.

However, lexical validation is only one layer. The function does not resolve DNS, inspect IP addresses, establish TLS or constrain redirect behavior. A real executor needs controls for those operations at the point where the connection is made.

One proposed deployment disables redirects for privileged action requests and restricts egress to the intended service. Another routes requests through a gateway that resolves application identifiers to fixed internal operations. The appropriate choice depends on the execution environment and the downstream API contract.

These are design controls, not claims that HCP Waypoint exposes each setting natively. The action may need to call an adapter precisely because the downstream API is broader than the self-service capability being offered.

A fixed endpoint also reduces the model's authority in AI-assisted workflows. The assistant can choose an approved operation and application, while a trusted mapping decides where the request goes. A persuasive explanation cannot expand the set of allowed destinations.

Credentials remain privileged at execution time

The historical GA announcement establishes configured action execution in private environments. This reference design consequently treats the executor as a privileged process and requires any execution credential to be scoped to its operation. It makes no claim about historically unverified storage-encryption internals. Agent action model.

The design consequence is narrow execution credentials. A staging restart action should not carry an identity able to delete production databases merely because both operations exist in the same automation system.

The same principle applies to logging. A useful execution record includes application identity, operation, actor, contract revision and correlation identifier. It should not require copying authorization headers, secret variables or raw command environments into the log.

An agent process also becomes part of the trust boundary. Its host, configuration, executable dependencies and access to local resources determine what a configured operation can reach. Private network placement changes reachability; it does not automatically establish trustworthy execution.

The local model deliberately contains no real token or credential lookup. Integration work must establish how the adapter authenticates the caller, how it obtains its own credential and which permissions the downstream service enforces.

Acceptance is not completion

HTTP separates acceptance from completion. A 202 response indicates that a request has been accepted for processing but does not establish that processing finished successfully. That distinction predates the archive cutoff and is defined by the HTTP semantics specification. RFC 9110, section 15.3.3.

An action controller can therefore preserve states such as requested, admitted, accepted, running, completed and failed. These are proposed controller states, not an assertion about Waypoint's internal state machine.

A restart action should complete against an explicit condition. Depending on the service, that might include a new process generation and a bounded health check. The exact condition belongs to the service contract; a successful request submission is insufficient evidence.

This improves the developer experience more than a generic green notification. The interface can distinguish “the operation is queued” from “the expected service state has been verified,” while retaining the downstream operation identifier needed for investigation.

Timeouts require similar care. A lost response leaves uncertainty about whether an operation started. The controller should inspect the known downstream operation before deciding that a second request is safe.

Repeated requests need an operation contract

HTTP method semantics do not make every application workflow safe to repeat. A POST-based restart endpoint may create another operation each time it is called. A client cannot infer deduplication from a friendly operation name.

A proposed adapter assigns an operation identifier and records the requested application revision before forwarding the action. If the downstream service supports idempotency keys, its exact retention and conflict behavior should be verified. If it does not, the adapter must retain uncertainty and reconcile rather than inventing an exactly-once guarantee.

The replay decision is especially important for AI callers. A model may repeat a tool call after seeing an ambiguous failure. The executor needs a durable rule that is independent of the model's interpretation of the message.

A duplicate request with identical content can be treated differently from reuse of an identifier for a changed application or revision. The latter is a conflict requiring review, not a reason to silently return the original result.

The HTTP specification's idempotency discussion supports careful method interpretation, but the application-specific contract remains necessary. It does not document the behavior of a particular CI/CD endpoint. RFC 9110, section 9.2.2.

Cancellation needs its own meaning

A cancellation request can arrive before admission, after forwarding or after the downstream system has committed an operation. Those positions cannot share a single implied rollback behavior. The proposed controller distinguishes withdrawal of an unsubmitted request from a request to stop work already accepted elsewhere.

Before forwarding, cancellation can prevent the adapter from creating a downstream operation. After acceptance, the adapter needs a documented cancellation capability from that service. If none exists, the interface can truthfully record cancellation requested while continuing to observe the operation. It cannot manufacture reversal from a local state change.

The same boundary applies to a revoked user grant. Revocation can prevent a new request, but an already running operation may hold its own execution identity. A design that promises immediate interruption needs a tested mechanism for propagating revocation, not merely a disabled portal button.

For AI-assisted operations, these states should be explicit tool results. A model that receives “cancellation requested; operation still running” has less reason to issue a replacement operation than one receiving an ambiguous failure. The durable operation record remains the authority even when the assistant conversation ends.

Test the boundary that the interface conceals

The packaged admission study tests a valid request and rejects an alternate host, insecure scheme, unexpected port, URL user information, query or fragment, different method, unknown operation, unknown application, stale revision and unauthorized actor.

Those checks execute locally when this historical draft is prepared. They validate the reference predicate, not HCP Waypoint, TLS, network policy or a downstream restart service. No claim of a June 2026 test run or production deployment follows.

Integration tests should add authenticated caller binding, destination resolution, redirects, credential scope and downstream outcome reconciliation. A negative test is particularly useful when it attempts to cross the environment boundary while keeping the rest of the request plausible.

Operational measurement should also remain specific. Admission denials, downstream authentication failures, accepted operations and verified completions describe different failure domains. Combining them into a single action-failure counter hides whether the contract or its execution needs attention.

The result is an action that can be explained in terms of its authority: who requested it, which application it targeted, what operation was allowed and which evidence established completion. HCP Waypoint supplies the self-service entry point. The platform's execution contract makes that entry point safe enough to delegate without turning a convenient button into an unrestricted administrative interface.