Infiltrator still rerouted/hangs after Gate.stop #34

Closed
opened 2026-04-27 08:58:05 -07:00 by haakon-e · 4 comments
haakon-e commented 2026-04-27 08:58:05 -07:00 (Migrated from github.com)

If I manually execute Gate.stop(), infiltrator sessions still (try to) get rerouted through Kaimon. In practice, the session just hangs.

  • Relatedly: I have found no way to (manually) exit an infiltrator session (when the gate is active) without fully exiting the terminal. Is there a way to achieve this (without an agent doing it for me)

Screenshot of two julia sessions, comparing Infiltrator behavior on a session with stopped Gate, vs session where Kaimon was never activated in the first place

Image

the left session just hangs indefinitely.

If I manually execute `Gate.stop()`, infiltrator sessions still (try to) get rerouted through Kaimon. In practice, the session just hangs. - Relatedly: I have found no way to (manually) exit an infiltrator session (when the gate is active) without fully exiting the terminal. Is there a way to achieve this (without an agent doing it for me) Screenshot of two julia sessions, comparing Infiltrator behavior on a session with stopped Gate, vs session where Kaimon was never activated in the first place <img width="1205" height="395" alt="Image" src="https://github.com/user-attachments/assets/8c83c338-921e-4093-80e5-c7ac90d5da22" /> the left session just hangs indefinitely.
kahliburke commented 2026-06-08 23:22:48 -07:00 (Migrated from github.com)

@haakon-e I haven't looked this case of manually stopping, it's a bit of an edge case and may just require a restart (could be done with by the agent via manage_repl.

@haakon-e I haven't looked this case of manually stopping, it's a bit of an edge case and may just require a restart (could be done with by the agent via manage_repl.
haakon-e commented 2026-06-09 09:12:20 -07:00 (Migrated from github.com)

@haakon-e I haven't looked this case of manually stopping, it's a bit of an edge case and may just require a restart (could be done with by the agent via manage_repl.

Currently, I have using Kaimon in my startup.jl file, so all REPLs can be controlled by an agent; very convenient!

The underlying issue is that I would sometimes like to infiltrate myself. I found no way to do this with the Gate running, and tried to stop the gate to see if it then would work (but alas, no).

So, in my opinion, it's an edge case insofar as it doesn't "automatically" work when stopping the gate. But the real issue is that there's no way whatsoever for me to infiltrate in a kaimon-connected REPL, as far as I can tell.

Unfortunately restarting is not always practical. Some work may require long compute to get to the relevant infiltration point.

> @haakon-e I haven't looked this case of manually stopping, it's a bit of an edge case and may just require a restart (could be done with by the agent via manage_repl. Currently, I have `using Kaimon` in my startup.jl file, so all REPLs _can_ be controlled by an agent; very convenient! The underlying issue is that I would sometimes like to infiltrate myself. I found no way to do this with the Gate running, and tried to stop the gate to see if it then would work (but alas, no). So, in my opinion, it's an edge case insofar as it doesn't "automatically" work when stopping the gate. But the real issue is that there's no way whatsoever for me to infiltrate in a kaimon-connected REPL, as far as I can tell. Unfortunately restarting is not always practical. Some work may require long compute to get to the relevant infiltration point.
kahliburke commented 2026-06-19 12:27:15 -07:00 (Migrated from github.com)

Fixed on 2.0-integration (just pushed) — three parts:

  1. Hang after Gate.stop(). stop() now restores Infiltrator's normal start_prompt, and the gate's prompt override falls back to it whenever the gate isn't running. So after Gate.stop(), @infiltrate opens the normal interactive prompt instead of routing to the now-dead gate and hanging.

  2. No way to exit a paused breakpoint. You can now press Ctrl-C to release a breakpoint locally instead of being stuck until an agent resumes it.

  3. Debugging a gate-connected REPL yourself (without stopping the gate). New toggle:

    Gate.infiltrator_routing(false)   # @infiltrate opens the normal interactive infil> prompt
    # ... debug interactively ...
    Gate.infiltrator_routing(true)    # hand @infiltrate back to the agent
    

    Eval/tools keep working while routing is off, so you don't lose a long-running computation — no restart()/serve() needed.

This addresses your point about long compute making restarts impractical. Documented in the debugging guide. Thanks for the detailed report and screenshot, @haakon-e — ships in the next release.

Fixed on `2.0-integration` (just pushed) — three parts: 1. **Hang after `Gate.stop()`.** `stop()` now restores Infiltrator's normal `start_prompt`, and the gate's prompt override falls back to it whenever the gate isn't running. So after `Gate.stop()`, `@infiltrate` opens the normal interactive prompt instead of routing to the now-dead gate and hanging. 2. **No way to exit a paused breakpoint.** You can now press `Ctrl-C` to release a breakpoint locally instead of being stuck until an agent resumes it. 3. **Debugging a gate-connected REPL yourself (without stopping the gate).** New toggle: ```julia Gate.infiltrator_routing(false) # @infiltrate opens the normal interactive infil> prompt # ... debug interactively ... Gate.infiltrator_routing(true) # hand @infiltrate back to the agent ``` Eval/tools keep working while routing is off, so you don't lose a long-running computation — no `restart()`/`serve()` needed. This addresses your point about long compute making restarts impractical. Documented in the debugging guide. Thanks for the detailed report and screenshot, @haakon-e — ships in the next release.
haakon-e commented 2026-06-19 13:31:42 -07:00 (Migrated from github.com)

wow! I'm thoroughly impressed and appreciative!

You addressed all my challenges and more, thank you so much for continuing making Kaimon such a pleasure to use

wow! I'm thoroughly impressed and appreciative! You addressed all my challenges and more, thank you so much for continuing making Kaimon such a pleasure to use
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kahliburke/Kaimon.jl#34
No description provided.