[Bug] Claude Code loses context between sessions and repeats previously resolved issues

Resolved 💬 1 comment Opened May 5, 2026 by despinal19 Closed Jun 2, 2026

Bug Description
He's always making things up, creating situations where there aren't any. He takes on roles and deletes things without permission; he doesn't save the solutions to problems in his memory and keeps the same old issues that have already been resolved in his mind. And when he's called back to continue where we left off, he goes back to making the same mistakes that had already been fixed, but he doesn't know where he left off and has to start all over again.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.126
  • Feedback ID: 3eede37f-b91e-4d6e-9036-3948966e4d67

Errors

[{"error":"Error: Failed to create shell snapshot: Command failed: /bin/zsh -c -l SNAPSHOT_FILE=/Users/franciscoespinalbaez/.claude/shell-snapshots/snapshot-zsh-1778010724006-bquagw.sh\n      source \"/Users/franciscoespinalbaez/.zshrc\" < /dev/null\n\n      # First, create/clear the snapshot file\n      echo \"# Snapshot file\" >| \"$SNAPSHOT_FILE\"\n\n      # When this file is sourced, we first unalias to avoid conflicts\n      # This is necessary because aliases get \"frozen\" inside function definitions at definition time,\n      # which can cause unexpected behavior when functions use commands that conflict with aliases\n      echo \"# Unset all aliases to avoid conflicts with functions\" >> \"$SNAPSHOT_FILE\"\n      echo \"unalias -a 2>/dev/null || true\" >> \"$SNAPSHOT_FILE\"\n\n      \n      echo \"# Functions\" >> \"$SNAPSHOT_FILE\"\n\n      # Force autoload all functions first\n      typeset -f > /dev/null 2>&1\n\n      # Now get user function names - filter completion functions (single underscore prefix)\n      # but keep double-underscore helpers (e.g. __zsh_like_cd from mise, __pyenv_init)\n      typeset +f | grep -vE '^_[^_]' | while read func; do\n        typeset -f \"$func\" >> \"$SNAPSHOT_FILE\"\n      done\n    \n      echo \"# Shell Options\" >> \"$SNAPSHOT_FILE\"\n      setopt | sed 's/^/setopt /' | head -n 1000 >> \"$SNAPSHOT_FILE\"\n    \n      echo \"# Aliases\" >> \"$SNAPSHOT_FILE\"\n      # Filter out winpty aliases on Windows to avoid \"stdin is not a tty\" errors\n      # Git Bash automatically creates aliases like \"alias node='winpty node.exe'\" for\n      # programs that need Win32 Console in mintty, but winpty fails when there's no TTY\n      if [[ \"$OSTYPE\" == \"msys\" ]] || [[ \"$OSTYPE\" == \"cygwin\" ]]; then\n        alias | grep -v \"='winpty \" | sed 's/^alias //g' | sed 's/^/alias -- /' | head -n 1000 >> \"$SNAPSHOT_FILE\"\n      else\n        alias | sed 's/^alias //g' | sed 's/^/alias -- /' | head -n 1000 >> \"$SNAPSHOT_FILE\"\n      fi\n  \n\n      \n      # Check for rg availability\n      echo \"# Check for rg availability\" >> \"$SNAPSHOT_FILE\"\n      echo \"if ! (unalias rg 2>/dev/null; command -v rg) >/dev/null 2>&1; then\" >> \"$SNAPSHOT_FILE\"\n  \n      cat >> \"$SNAPSHOT_FILE\" << 'RIPGREP_FUNC_END'\n  function rg {\n  local _cc_bin=\"${CLAUDE_CODE_EXECPATH:-}\"\n  [[ -x $_cc_bin ]] || _cc_bin=/Users/franciscoespinalbaez/.local/bin/claude\n  if [[ ! -x $_cc_bin ]]; then command rg \"$@\"; return; fi\n  if [[ -n $ZSH_VERSION ]]; then\n    ARGV0=rg \"$_cc_bin\" \"$@\"\n  elif [[ \"$OSTYPE\" == \"msys\" ]] || [[ \"$OSTYPE\" == \"cygwin\" ]] || [[ \"$OSTYPE\" == \"win32\" ]]; then\n    ARGV0=rg \"$_cc_bin\" \"$@\"\n  elif [[ $BASHPID != $$ ]]; then\n    exec -a rg \"$_cc_bin\" \"$@\"\n  else\n    (exec -a rg \"$_cc_bin\" \"$@\")\n  fi\n}\nRIPGREP_FUNC_END\n    \n      echo \"fi\" >> \"$SNAPSHOT_FILE\"\n  \n      # Shadow find/grep with embedded bfs/ugrep (ant-native only)\n      echo \"# Shadow find/grep with embedded bfs/ugrep\" >> \"$SNAPSHOT_FILE\"\n      cat >> \"$SNAPSHOT_FILE\" << 'FIND_GREP_FUNC_END'\nunalias find 2>/dev/null || true\nunalias grep 2>/dev/null || true\nfunction find {\n  local _cc_bin=\"${CLAUDE_CODE_EXECPATH:-}\"\n  [[ -x $_cc_bin ]] || _cc_bin=/Users/franciscoespinalbaez/.local/bin/claude\n  if [[ ! -x $_cc_bin ]]; then command find \"$@\"; return; fi\n  if [[ -n $ZSH_VERSION ]]; then\n    ARGV0=bfs \"$_cc_bin\" -S dfs -regextype findutils-default \"$@\"\…

Note: Content was truncated.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗