Skip to content

SessionEnd hook: source CLAUDE_ENV_FILE to preserve agent identity #1

@brettimus

Description

@brettimus

Came across this issue when using the plugin with the claude agent sdk. not sure if it's specific to using fp in that context, but the core problem is that fp agent end would use a new agent name for me.

Problem appears to be that the session-end.sh hook isn't sourcing t he CLAUDE_ENV_FILE to get the FP_AGENT_NAME that was set during session-start.sh. This caused fp agent end to use a different agent identity for session_ended events.

  if [ -n "$CLAUDE_ENV_FILE" ] && [ -f "$CLAUDE_ENV_FILE" ]; then
    source "$CLAUDE_ENV_FILE"
  fi

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