Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLI

Vault reads for model global arguments are cached at workflow start, making in-workflow token refresh ineffective

Opened by stack72 · 4/7/2026· GitHub #1031

Description

When a workflow step calls refresh_access_token (or any method that writes a new value to a vault key), subsequent steps in the same workflow run still receive the old cached value for vault expressions used in model global arguments.

Steps to Reproduce

  1. Configure a model with a vault expression in globalArguments:
    globalArguments:
      gcpAccessToken: '${{ vault.get(gcp-oauth, GCP_ACCESS_TOKEN) }}'
  2. Create a workflow with two sequential jobs:
    • Job 1: calls refresh_access_token which writes a fresh token to gcp-oauth/GCP_ACCESS_TOKEN
    • Job 2: calls a method on the model that uses gcpAccessToken
  3. Run the workflow with an expired token in the vault
  4. Job 1 succeeds and logs confirm the new token was written to the vault
  5. Job 2 fails with 401 UNAUTHENTICATED / ACCESS_TOKEN_TYPE_UNSUPPORTED

Expected Behavior

Each step resolves vault expressions at execution time, so Job 2 reads the freshly written token from the vault.

Actual Behavior

Swamp appears to resolve and cache vault values for model global arguments when the workflow is evaluated at startup. The in-workflow vault write is too late — the parent process already has the old value cached.

Vault expressions used directly in workflow YAML step inputs appear to defer correctly (per #995 / PR #1000), but vault expressions embedded in model YAML global arguments do not.

Impact

In-workflow token refresh patterns are silently broken. The workflow step succeeds and logs confirm the vault write, but subsequent steps still use the stale value. The only workaround is refreshing the token before invoking the workflow.


Automoved by swampadmin from GitHub issue #1031

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

4/7/2026, 11:27:15 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.