Skip to content

Mix.env in production #4

@mrcwinn

Description

@mrcwinn

https://github.com/nshkrdotcom/claude_agent_sdk/blob/0ede92ea74f53e0e76ead12b90814cff6321f934/lib/claude_agent_sdk/client.ex#L1055C3-L1060C8

Mix.env/0 is not available in releases. Relatively harmless, unless one is wrapping an agent run inside something like an Oban job. In that case, the UndefinedFunctionError exception causes a crash, causing jobs to be marked as error state but (in my case) retryable. Since Mix.env/0 is called in terminate, the whole run (and all the token inference costs) will repeat but then crash at the end.

Thought it was worth mentioning!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions