# `package.action_invalid`

Package action does what package code may not.

Area 11, [External services](../topics/external-services.md); not declinable; the next step is usually the agent's.

A package's action calls only its own API: its operations, in any order,
and its pure functions, never another action, so what it does is one way
through it that a retry replays in order. It never emits when it is
`public`, since a package emits only about the outside world, and it
never shares a name with one of its resources, which share its
connection's namespace. A package's code also reads none of the app's
settings (`config.<name>`, keys included) and calls none of its sign-in
operations (`sessions.*`, `magic_links.*`), which are the app's own:








```jadpo
/// Opens the customer, through the other action.
public action start_subscription(input: PayRequest) -> PayReply {
    return open_customer(input)
}
```

```text
error: `start_subscription` calls the package's action `open_customer`
 --> shared/providers/acme_pay/v1/actions/start_subscription.jadpo:3:12
  |
3 |     return open_customer(input)
  |            ^^^^^^^^^^^^^ another action
  reason: A package's action calls only its own API: its operations, in any order, and its pure functions. The steps it makes are one way through it, which a retry replays in order.
  next: Make `open_customer`'s calls here, or move what both share to a function (agent)
  rule: package.action_invalid
  help: https://jadpo.dev/docs/errors/package.action_invalid

check failed: 1 error, 8 files
```
