Skip to content

docs: written verification procedure for the OAuth token fallback path #197

Closed

Description

@fdaviddpt

The REMEMBER_OAUTH_TOKEN fallback has no automated guard and won't get one. The condition it exists for — the host redacting CLAUDE_CODE_OAUTH_TOKEN from a spawned subprocess — only occurs inside the Claude Code desktop host, which CI never runs under. The suite can mock the plumbing and prove the precedence order; it cannot prove the path recovers auth on the machine that withholds the token.

Right now the only evidence that it works is one manual run reported in a comment thread (#179). That evidence should be a procedure in the repo, not a comment.

What to write

A short section in the docs (or docs/verification.md) covering:

  1. Preconditions — claude setup-token has been run; the value is in REMEMBER_OAUTH_TOKEN (env or haiku.oauth_token in config.json).
  2. Confirm the precondition that makes the test meaningful — assert CLAUDE_CODE_OAUTH_TOKEN is genuinely absent from the child env. If the host stopped redacting, the test passes for the wrong reason and proves nothing.
  3. The assertion — call_haiku authenticates and the nested claude -p returns is_skip=False with the expected reply.
  4. The negative case — a malformed value (too short) produces the warning with source and length, and never the value itself (fix(haiku): report a refused OAuth token instead of dropping it in silence #184).
  5. What to record — OS, Python version, package version, and the date, so a future reader knows how stale the last verification is.

When it should be run

Any change to auth resolution in call_haiku — the precedence order, _looks_like_token, or the config layer feeding it. Those are the changes CI will wave through green while breaking the only thing this code exists to do.

Activity

  1. added a commit that references this issue on Jul 30, 2026
    fddd466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions