I thought I could edit my post 
Anyway, @bjorng
input
|> Input.stream!(trim: true) #=> #Stream<[
enum: %File.Stream{
path: "/home/ken/aoc_2024/priv/input/2024/day-21.inp",
modes: [:raw, :read_ahead, :binary],
line_or_bytes: :line,
raw: true,
node: :nonode@nohost
},
funs: [#Function<49.118167795/1 in Stream.map/2>,
#Function<39.118167795/1 in Stream.filter/2>]
]>
|> Enum.map(fn code ->
{number, _} = Integer.parse(code)
{number, code}
end) #=> [{803, "803A"}, {528, "528A"}, {586, "586A"}, {341, "341A"}, {319, "319A"}]
[lib/aoc_2024/solutions/y24/day21.ex:15: Aoc2024.Solutions.Y24.Day21.parse/2]
parse2(Input.stream!(input, trim: true)) #=> [{803, "803A"}, {528, "528A"}, {586, "586A"}, {341, "341A"}, {319, "319A"}]
parse2
is your function - they return the same. I checked every other line of code multiple times, nothing stands out to me - everything is the same AFAIK. I’m flabbergasted to say the least.

Here is some more debug data I ran with pads = [numeric() | List.duplicate(direct(), 3)]
:
"BUTTONS ~c\"^>A\""
[lib/aoc_2024/solutions/y24/day21.ex:103: Aoc2024.Solutions.Y24.Day21.press_recursive/2]
cache_key #=> {65, {1, 2}, 2}
"LENGTH OF PADS 2"
[lib/aoc_2024/solutions/y24/day21.ex:105: Aoc2024.Solutions.Y24.Day21.press_recursive/2]
pad #=> %Aoc2024.Solutions.Y24.Day21.Keypad{
position: {1, 2},
grid: %{
{0, 0} => :panic,
{0, 1} => {-1, 0},
{0, 2} => :activate,
{1, 0} => {0, -1},
{1, 1} => {1, 0},
{1, 2} => {0, 1}
},
parse: #Function<1.134059619/1 in Aoc2024.Solutions.Y24.Day21.vector_dir>
}
[lib/aoc_2024/solutions/y24/day21.ex:107: Aoc2024.Solutions.Y24.Day21.press_recursive/2]
Process.get(cache_key) #=> {{17},
%Aoc2024.Solutions.Y24.Day21.Keypad{
position: {3, 2},
grid: %{
{0, 0} => 7,
{0, 1} => 8,
{0, 2} => 9,
{1, 0} => 4,
{1, 1} => 5,
{1, 2} => 6,
{2, 0} => 1,
{2, 1} => 2,
{2, 2} => 3,
{3, 0} => :panic,
{3, 1} => 0,
{3, 2} => :activate
},
parse: #Function<2.134059619/1 in Aoc2024.Solutions.Y24.Day21.numeric/0>
}}
"VALUE FOUND"
[lib/aoc_2024/solutions/y24/day21.ex:138: Aoc2024.Solutions.Y24.Day21.press_recursive/2]
pad #=> %Aoc2024.Solutions.Y24.Day21.Keypad{
position: {3, 2},
grid: %{
{0, 0} => 7,
{0, 1} => 8,
{0, 2} => 9,
{1, 0} => 4,
{1, 1} => 5,
{1, 2} => 6,
{2, 0} => 1,
{2, 1} => 2,
{2, 2} => 3,
{3, 0} => :panic,
{3, 1} => 0,
{3, 2} => :activate
},
parse: #Function<2.134059619/1 in Aoc2024.Solutions.Y24.Day21.numeric/0>
}
"BUTTONS ~c\">^A\""
[lib/aoc_2024/solutions/y24/day21.ex:103: Aoc2024.Solutions.Y24.Day21.press_recursive/2]
cache_key #=> {62, {3, 2}, 2}
"LENGTH OF PADS 2"
[lib/aoc_2024/solutions/y24/day21.ex:105: Aoc2024.Solutions.Y24.Day21.press_recursive/2]
pad #=> %Aoc2024.Solutions.Y24.Day21.Keypad{
position: {3, 2},
grid: %{
{0, 0} => 7,
{0, 1} => 8,
{0, 2} => 9,
{1, 0} => 4,
{1, 1} => 5,
{1, 2} => 6,
{2, 0} => 1,
{2, 1} => 2,
{2, 2} => 3,
{3, 0} => :panic,
{3, 1} => 0,
{3, 2} => :activate
},
parse: #Function<2.134059619/1 in Aoc2024.Solutions.Y24.Day21.numeric/0>
}
[lib/aoc_2024/solutions/y24/day21.ex:107: Aoc2024.Solutions.Y24.Day21.press_recursive/2]
Process.get(cache_key) #=> nil
">"
part_two: Aoc2024.Solutions.Y24.Day21.part_two/1 error: ** (CaseClauseError) no case clause matching: 62
(aoc_2024 0.1.0) lib/aoc_2024/solutions/y24/day21.ex:53: anonymous fn/1 in Aoc2024.Solutions.Y24.Day21.numeric/0
(aoc_2024 0.1.0) lib/aoc_2024/solutions/y24/day21.ex:178: Aoc2024.Solutions.Y24.Day21.Keypad.press/2
(aoc_2024 0.1.0) lib/aoc_2024/solutions/y24/day21.ex:124: anonymous fn/3 in Aoc2024.Solutions.Y24.Day21.press_recursive/2
(elixir 1.18.0) lib/enum.ex:1840: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(aoc_2024 0.1.0) lib/aoc_2024/solutions/y24/day21.ex:115: anonymous fn/2 in Aoc2024.Solutions.Y24.Day21.press_recursive/2
(elixir 1.18.0) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2
(aoc_2024 0.1.0) lib/aoc_2024/solutions/y24/day21.ex:114: anonymous fn/3 in Aoc2024.Solutions.Y24.Day21.press_recursive/2
(elixir 1.18.0) lib/enum.ex:1840: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
The previous step succeeded because cache was found, but for the fail step nothing was found.
I’ll give it another go later, this is a puzzle beyond advent of code for me, an exercise in debugging. 