public inbox for kaagum@systemreboot.net
 help / color / mirror / Atom feed
* connecting to bifrost over SOCKS5 proxy fails
@ 2026-11-02 19:54 Ricardo Wurmus
  2026-11-03  0:43 ` Arun Isaac
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo Wurmus @ 2026-11-02 19:54 UTC (permalink / raw)
  To: kaagum

Hi,

thank you for kaagum.  I'm trying to use it with a bifrost 
installation on a network that I can only access with an SSH 
tunnel.  I've configured agent-shell like so:

--8<---------------cut here---------------start------------->8---
(require 'agent-shell-kaagum)

(setq agent-shell-kaagum-command "proxychains4"
      agent-shell-kaagum-parameters
      '("-f" "/path/to/proxychains.conf"
        "/path/to/bin/kaagum"
        "--api-base-uri=https://llm.example.net"
        "--api-key-command=gpg -dq /path/to/password.gpg"
        "--model=vllm/Qwen/Qwen3.8-27B"))

(add-to-list 'agent-shell-agent-configs
             (agent-shell-kaagum-make-agent-config))
--8<---------------cut here---------------end--------------->8---

This seems to work fine up to the first request from the agent 
shell:

--8<---------------cut here---------------start------------->8---
[proxychains] config file found: /path/to/proxychains.conf
[proxychains] preloading 
/gnu/store/djhjgy1j0iqd317pmgazv9wng249q0df-proxychains-ng-4.17/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] Strict chain  ...  127.0.0.1:8022  ... 
llm.example.net:443  ...  OK
Backtrace:
In ice-9/boot-9.scm:
  1791:12  9 (with-exception-handler _ _ #:unwind? _ 
  #:unwind-for-type _)
In unknown file:
           8 (apply-smob/0 #<thunk 7fde38d193a0>)
In ice-9/boot-9.scm:
    740:2  7 (call-with-prompt _ _ #<procedure 
    default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8  6 (_ #(#(#<directory (guile-user) 7fde38d1cc80>)))
In kaagum/tea.scm:
   970:19  5 (tea-loop #<<state> client-request-id: #f 
   agent-request-id: 0 next-session-id: 0 requests-alist: () 
   sessions: ()> "https://llm.example.net" "[MY API KEY]" 
   (("vllm/Qwen/Qwen3.8-27B" . #<<model> name: #f description: #f 
   context-length: #f>) ("vllm/Aleph-Alpha/Kolibri-1" . #<<model> 
   name: #f description: #f context-length: #f>) 
   ("vllm/google/medgemma-27b-it" . #<<model> name: #f 
   description: #f context-length: #f>)) (("read" . #<<tool> 
   descript…>) …) …)
In kaagum/monads.scm:
    139:2  4 (run-with-state _ _)
In kaagum/tea.scm:
   971:20  3 (_ _)
   971:20  2 (_ _)
   205:21  1 (_ _)
In rnrs/records/procedural.scm:
   143:10  0 (_ _)

rnrs/records/procedural.scm:143:10: ERROR:

  1. &assertion-failure

Process acp-client(proxychains4)-36 stderr finished
--8<---------------cut here---------------end--------------->8---

I have installed kaagum 0.1.0 with Guix.

I have no experience with agent-shell, nor do I have access to any 
other LLM server.  Am I doing something obviously wrong?

I've also changed the URL to https://llm.example.net/v1 and it 
fails at a different point:

--8<---------------cut here---------------start------------->8---
[proxychains] config file found: /path/to/proxychains.conf
[proxychains] preloading 
/gnu/store/djhjgy1j0iqd317pmgazv9wng249q0df-proxychains-ng-4.17/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] DLL init: proxychains-ng 4.17
[proxychains] Strict chain  ...  127.0.0.1:8022  ... 
llm.example.net:443  ...  OK
Backtrace:
In ice-9/boot-9.scm:
  1791:12  7 (with-exception-handler _ _ #:unwind? _ 
  #:unwind-for-type _)
In unknown file:
           6 (apply-smob/0 #<thunk 7fa0ce1193a0>)
In ice-9/boot-9.scm:
    740:2  5 (call-with-prompt _ _ #<procedure 
    default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8  4 (_ #(#(#<directory (guile-user) 7fa0ce11cc80>)))
In kaagum/tea.scm:
  1015:17  3 (run-tea-loop "https://llm.example.net/v1" "[MY API 
  KEY]" "vllm/Qwen/Qwen3.8-27B" (("read" . #<<tool> description: 
  "Read whole text file, or optionally a subset of its 
  lines.\n\nLine numbers start from 1. Output is the raw file 
  contents without line numbers." parameters: (("path" 
  . #<<tool-parameter> type: "string" description: "File path to 
  read" required?: #t>) ("start-line" . #<<tool-parameter> type: 
  "integer" description: "Read file start…>) …))
In kaagum/openai.scm:
    67:29  2 (openai-models _ _)
In json/parser.scm:
   404:20  1 (json->scm _ #:null _ #:ordered _ #:concatenated _)
     40:2  0 (json-read-number #<input:delimited input port 
     7fa0ce03ed40>)

json/parser.scm:40:2: In procedure json-read-number:
Throw to key json-invalid' with args (#<input:delimited input port 
7fa0ce03ed40>)'.

Process acp-client(proxychains4)-39 stderr finished
--8<---------------cut here---------------end--------------->8---

In the Bifrost admin interface I see that my "hello" message has 
been processed, but the response never made it to Emacs.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-02 19:54 connecting to bifrost over SOCKS5 proxy fails Ricardo Wurmus
@ 2026-11-03  0:43 ` Arun Isaac
  2026-11-03 12:45   ` Ricardo Wurmus
  0 siblings, 1 reply; 13+ messages in thread
From: Arun Isaac @ 2026-11-03  0:43 UTC (permalink / raw)
  To: Ricardo Wurmus, kaagum


Hi Ricardo,

Thanks for trying kaagum out!

It's possible there is a bug in kaagum. I have only tested it with
OpenRouter. I don't see anything obviously wrong with your
configuration. But I'll look at your report more closely tomorrow and
get back to you.

Meanwhile, you could also try adding "--trace-file=/tmp/kaagum-trace" to
agent-shall-kaagum-parameters. That should produce a detailed trace in
/tmp/kaagum-trace. Maybe that will help narrow down the problem.

Regards,
Arun

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-03  0:43 ` Arun Isaac
@ 2026-11-03 12:45   ` Ricardo Wurmus
  2026-11-04  0:15     ` Arun Isaac
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo Wurmus @ 2026-11-03 12:45 UTC (permalink / raw)
  To: Arun Isaac; +Cc: Ricardo Wurmus, kaagum

Hi Arun,

> It's possible there is a bug in kaagum. I have only tested it 
> with
> OpenRouter. I don't see anything obviously wrong with your
> configuration. But I'll look at your report more closely 
> tomorrow and
> get back to you.
>
> Meanwhile, you could also try adding 
> "--trace-file=/tmp/kaagum-trace" to
> agent-shall-kaagum-parameters. That should produce a detailed 
> trace in
> /tmp/kaagum-trace. Maybe that will help narrow down the problem.

I have upgraded to the latest commit of kaagum to get the 
trace-file feature (v0.1.0 does not seem to have it) and tried 
again.

Now I get a different (and later) error:

--8<---------------cut here---------------start------------->8---
[proxychains] Strict chain  ...  127.0.0.1:8022  ... 
llm.example.net:443  ...  OK
WARNING: (kaagum web): imported module (rnrs conditions) overrides 
core binding `&error'
Backtrace:
In ice-9/boot-9.scm:
  1791:12 17 (with-exception-handler _ _ #:unwind? _ 
  #:unwind-for-type _)
In unknown file:
          16 (apply-smob/0 #<thunk 7fbc9fc8f3a0>)
In ice-9/boot-9.scm:
    740:2 15 (call-with-prompt _ _ #<procedure 
    default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8 14 (_ #(#(#<directory (guile-user) 7fbc9fc92c80>)))
In ice-9/boot-9.scm:
    161:2 13 (with-fluid* _ _ _)
In ice-9/ports.scm:
   439:17 12 (call-with-output-file _ _ #:binary _ #:encoding _)
In ice-9/boot-9.scm:
    161:2 11 (with-fluid* _ _ _)
In kaagum/tea.scm:
   979:19 10 (tea-loop #<<state> client-request-id: 4 
   agent-request-id: 0 next-session-id: 1 requests-alist: () 
   sessions: (("session-0" . #<<session> cwd: "/path/to/my/dir" 
   model: "vllm/Qwen/Qwen3.8-27B" input-tokens: 0 output-tokens: 0 
   thought-tokens: 0 cache-read-tokens: 0 cache-write-tokens: 0 
   cost: 0 cancelling?: #f messages: ((("role" . "user") 
   ("content" . #((("text" . "hello") ("type" . "text")))))) 
   tool-calls: () allowed-tools: () rejected-tools: ()>))> 
   "https://llm…" …)
In kaagum/monads.scm:
    139:2  9 (run-with-state _ _)
In kaagum/tea.scm:
   980:20  8 (_ _)
   980:20  7 (_ _)
   829:26  6 (_ _)
In kaagum/utils.scm:
    33:22  5 (->-helper #<<state> client-request-id: 4 
    agent-request-id: 0 next-session-id: 1 requests-alist: () 
    sessions: (("session-0" . #<<session> cwd: "/path/to/my/dir" 
    model: "vllm/Qwen/Qwen3.8-27B" input-tokens: 956 
    output-tokens: 35 thought-tokens: 23 cache-read-tokens: 0 
    cache-write-tokens: 0 cost: 0 cancelling?: #f messages: 
    ((("role" . "user") ("content" . #((("text" . "hello") ("type" 
    . "text")))))) tool-calls: () allowed-tools: () 
    rejected-tools: ()>))> #<proce…> …)
In kaagum/records.scm:
    61:48  4 (_ #<<state> client-request-id: 4 agent-request-id: 0 
    next-session-id: 1 requests-alist: () sessions: (("session-0" 
    . #<<session> cwd: "/path/to/my/dir" model: 
    "vllm/Qwen/Qwen3.8-27B" input-tokens: 956 output-tokens: 35 
    thought-tokens: 23 cache-read-tokens: 0 cache-write-tokens: 0 
    cost: 0 cancelling?: #f messages: ((("role" . "user") 
    ("content" . #((("text" . "hello") ("type" . "text")))))) 
    tool-calls: () allowed-tools: () rejected-tools: ()>))> 
    #<procedure 7fbc…>)
In srfi/srfi-1.scm:
   702:17  3 (map1 (("session-0" . #<<session> cwd: 
   "/path/to/my/dir" model: "vllm/Qwen/Qwen3.8-27B" input-tokens: 
   956 output-tokens: 35 thought-tokens: 23 cache-read-tokens: 0 
   cache-write-tokens: 0 cost: 0 cancelling?: #f messages: 
   ((("role" . "user") ("content" . #((("text" . "hello") ("type" 
   . "text")))))) tool-calls: () allowed-tools: () rejected-tools: 
   ()>)))
In lens/lenses.scm:
    95:54  2 (_ _)
In kaagum/records.scm:
    61:48  1 (_ #<<session> cwd: "/path/to/my/dir" model: 
    "vllm/Qwen/Qwen3.8-27B" input-tokens: 956 output-tokens: 35 
    thought-tokens: 23 cache-read-tokens: 0 cache-write-tokens: 0 
    cost: 0 cancelling?: #f messages: ((("role" . "user") 
    ("content" . #((("text" . "hello") ("type" . "text")))))) 
    tool-calls: () allowed-tools: () rejected-tools: ()> 
    #<procedure 7fbc9fccd420 at kaagum/lens.scm:57:13 
    (t-715eab49ae64536-24)>)
In kaagum/lens.scm:
    57:13  0 (_ 0)

kaagum/lens.scm:57:13: In procedure +: Wrong type argument in 
position 1: #f

Process acp-client(proxychains4)-48 stderr finished
--8<---------------cut here---------------end--------------->8---

I ran "/tools" (which worked) and "hello", which produced the 
error.

The trace says this:


--8<---------------cut here---------------start------------->8---
web: -> GET https://llm.example.net/v1/models
web: <- 200 
{"key_statuses":[{"provider":"vllm","status":"success","key_id":"..."},{"provider":"vllm","status":"success","key_id":"..."},{"provider":"vllm","status":"success","key_id":"..."},{"provider":"vllm","status":"success","key_id":"..."},{"provider":"vllm","status":"success","key_id":"..."},{"provider":"vllm","status":"success","key_id":"..."},{"provider":"vllm","status":"success","key_id":"..."},{"provider":"vllm","status":"success","key_id":"..."},{"provider":"vllm","status":"success","key_id":"..."}],"extra_fields":{"chunk_index":0,"latency":38,"routing_info":{},"request_type":"list_models"},"data":[{"owned_by":"vllm","created":1793709325,"id":"vllm/Aleph-Alpha/Kolibri-1"},{"owned_by":"vllm","created":1793709325,"id":"vllm/Qwen/Qwen3.8-27B"},{"owned_by":"vllm","created":1793709325,"id":"vllm/google/medgemma-27b-it"}]}
acp: <- 
{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"clientInfo":{"name":"agent-shell","title":"Emacs 
Agent 
Shell","version":"0.89.1"},"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":true,"writeTextFile":true}}}}
acp: -> 
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":1,"agentCapabilities":{},"agentInfo":{"name":"kaagum","title":"Kaagum","version":"0.1.0"},"authMethods":[]}}
acp: <- 
{"jsonrpc":"2.0","method":"session/new","id":2,"params":{"cwd":"/path/to/my/cwd","mcpServers":[]}}
acp: -> 
{"jsonrpc":"2.0","id":2,"result":{"sessionId":"session-0","configOptions":[{"id":"model","name":"Model","category":"model","type":"select","currentValue":"vllm/Qwen/Qwen3.8-27B","options":[{"value":"vllm/Qwen/Qwen3.8-27B"},{"value":"vllm/Aleph-Alpha/Kolibri-1"},{"value":"vllm/google/medgemma-27b-it"}]}]}}
acp: -> 
{"jsonrpc":"2.0","method":"session/update","params":{"sessionId":"session-0","update":{"sessionUpdate":"available_commands_update","availableCommands":[{"name":"cwd","description":"Print 
current working directory of the 
session"},{"name":"tools","description":"List available tools and 
their permission status"}]}}}
acp: <- 
{"jsonrpc":"2.0","method":"session/prompt","id":3,"params":{"sessionId":"session-0","prompt":[{"type":"text","text":"/tools"}]}}
acp: -> 
{"jsonrpc":"2.0","method":"session/update","params":{"sessionId":"session-0","update":{"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":"| 
Tool | Permission |\n| --- | --- |\n| read | prompt user |\n| list 
| prompt user |\n| search | prompt user |\n| github-issue | prompt 
user |"}}}}
acp: -> 
{"jsonrpc":"2.0","id":3,"result":{"stopReason":"end_turn"}}
acp: -> 
{"jsonrpc":"2.0","method":"session/update","params":{"sessionId":"session-0","update":{"sessionUpdate":"usage_update","used":0,"size":false,"cost":{"amount":0,"currency":"USD"}}}}
acp: <- 
{"jsonrpc":"2.0","method":"session/prompt","id":4,"params":{"sessionId":"session-0","prompt":[{"type":"text","text":"hello"}]}}
web: -> POST https://llm.example.net/v1/chat/completions 
{"model":"vllm/Qwen/Qwen3.8-27B","cache_control":{"type":"ephemeral","ttl":"1h"},"messages":[{"role":"user","content":[{"text":"hello","type":"text"}]}],"tools":[{"type":"function","function":{"name":"read","description":"Read 
whole text file, or optionally a subset of its lines.\n\nLine 
numbers start from 1. Output is the raw file contents without line 
numbers.","parameters":{"type":"object","properties":{"path":{"description":"File 
path to read","type":"string"},"start-line":{"description":"Read 
file starting from this line number (inclusive). Default is 
1.","type":"integer"},"end-line":{"description":"Read up to this 
line number (inclusive). Default is the last line of the 
file.","type":"integer"}},"required":["path"]}}},{"type":"function","function":{"name":"list","description":"List 
files recursively.\n\nThe output is in three columns—the file 
type, the file size and the file 
path.","parameters":{"type":"object","properties":{"root":{"description":"Root 
path to list 
from","type":"string"},"pattern":{"description":"POSIX extended 
regular expression to match basename (including extension) 
of\nfile against. Default matches all files.\n\nFor example, to 
match all scheme (.scm) files, use 
\"\\.scm$\"","type":"string"}},"required":["root"]}}},{"type":"function","function":{"name":"search","description":"Print 
lines that match a pattern (similar to grep)\n\nSimilar to grep, 
the output is three colon separated columns—the file path, 
the\nline number and the matching line. Line numbers start from 
1.","parameters":{"type":"object","properties":{"pattern":{"description":"POSIX 
extended regular expression to search 
for","type":"string"},"files-root":{"description":"Root path to 
start search 
from","type":"string"},"files-pattern":{"description":"POSIX 
extended regular expression to match basename (including 
extension) of\nfile against. Default matches all files.\n\nFor 
example, to match all scheme (.scm) files, use 
\"\\.scm$\"","type":"string"}},"required":["pattern","files-root"]}}},{"type":"function","function":{"name":"github-issue","description":"Read 
conversation in GitHub/Forgejo issue.\n\nFor example, to read 
https://codeberg.org/guix/maintenance/issues/105, use 
the\nfollowing arguments:\n{\n  \"host\": \"codeberg.org\",\n 
\"owner\": \"guix\",\n  \"repo\": \"maintenance\",\n 
\"issue-number\": 
105\n}\n","parameters":{"type":"object","properties":{"host":{"description":"Host 
(aka domain name) of GitHub/Forgejo instance. Default is 
\"github.com\".","type":"string"},"owner":{"description":"Owner 
(or organization) from the issue 
URL","type":"string"},"repo":{"description":"Repository name from 
the issue URL","type":"string"},"number":{"description":"Issue 
number to 
read","type":"integer"}},"required":["owner","repo","number"]}}}]}
web: <- 200 
{"extra_fields":{"chunk_index":0,"upstream_latency":346,"latency":346,"resolved_model_used":"Qwen/Qwen3.8-27B","original_model_requested":"Qwen/Qwen3.8-27B","provider":"vllm","routing_info":{"key":"GPU1","model":"Qwen/Qwen3.8-27B","provider":"vllm"},"request_type":"chat_completion"},"usage":{"total_tokens":991,"completion_tokens_details":{"reasoning_tokens":23},"completion_tokens":35,"prompt_tokens":956},"system_fingerprint":"vllm-0.29.0-17dae9e8","object":"chat.completion","model":"Qwen/Qwen3.8-27B","created":1793709349,"choices":[{"message":{"reasoning_content":"The 
user just said \"hello\" — a simple greeting. I should respond in 
a friendly and helpful 
manner.\n","reasoning_details":[{"text":"The user just said 
\"hello\" — a simple greeting. I should respond in a friendly and 
helpful 
manner.\n","type":"reasoning.text","index":0}],"reasoning":"The 
user just said \"hello\" — a simple greeting. I should respond in 
a friendly and helpful 
manner.\n","refusal":null,"content":"\n\nHello! How can I help you 
today?","role":"assistant"},"logprobs":null,"finish_reason":"stop","index":0}],"id":"chatcmpl-8dfb5f093fb5db67"}
--8<---------------cut here---------------end--------------->8---

-- 
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-03 12:45   ` Ricardo Wurmus
@ 2026-11-04  0:15     ` Arun Isaac
  2026-11-04  7:45       ` Ricardo Wurmus
  0 siblings, 1 reply; 13+ messages in thread
From: Arun Isaac @ 2026-11-04  0:15 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: kaagum


Hi Ricardo,

> I have upgraded to the latest commit of kaagum to get the trace-file
> feature (v0.1.0 does not seem to have it) and tried again.

Yes, indeed. The trace is a new feature.

The trace was very helpful, and I may have figured out the issue. The
"cached_tokens" field was missing from the "usage" section of your
bifrost LLM response. I have now patched kaagum to be more robust:
https://git.systemreboot.net/kaagum/commit/?id=8423d578cffdef869d323d4e46c41f347b2268cb

Let me know if this works for you. Thanks!

Regards,
Arun

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-04  0:15     ` Arun Isaac
@ 2026-11-04  7:45       ` Ricardo Wurmus
  2026-11-04 10:40         ` Arun Isaac
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo Wurmus @ 2026-11-04  7:45 UTC (permalink / raw)
  To: Arun Isaac; +Cc: Ricardo Wurmus, kaagum

Hi Arun,

>> I have upgraded to the latest commit of kaagum to get the 
>> trace-file
>> feature (v0.1.0 does not seem to have it) and tried again.
>
> Yes, indeed. The trace is a new feature.
>
> The trace was very helpful, and I may have figured out the 
> issue. The
> "cached_tokens" field was missing from the "usage" section of 
> your
> bifrost LLM response. I have now patched kaagum to be more 
> robust:
> https://git.systemreboot.net/kaagum/commit/?id=8423d578cffdef869d323d4e46c41f347b2268cb
>
> Let me know if this works for you. Thanks!

Thank you!  With this change I can get past this hurdle and get a 
response back.

I'm stuck on tool calls now (reading a file in cwd), but I'll 
investigate first and send a new email when I've diagnosed this.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-04  7:45       ` Ricardo Wurmus
@ 2026-11-04 10:40         ` Arun Isaac
  2026-11-05 12:13           ` Ricardo Wurmus
  0 siblings, 1 reply; 13+ messages in thread
From: Arun Isaac @ 2026-11-04 10:40 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Ricardo Wurmus, kaagum


> Thank you!  With this change I can get past this hurdle and get a 
> response back.

That's great.

> I'm stuck on tool calls now (reading a file in cwd), but I'll 
> investigate first and send a new email when I've diagnosed this.

Thank you, that would be very helpful!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-04 10:40         ` Arun Isaac
@ 2026-11-05 12:13           ` Ricardo Wurmus
  2026-11-06  0:46             ` Arun Isaac
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo Wurmus @ 2026-11-05 12:13 UTC (permalink / raw)
  To: Arun Isaac; +Cc: Ricardo Wurmus, kaagum

Arun Isaac <arunisaac@systemreboot.net> writes:

>> I'm stuck on tool calls now (reading a file in cwd), but I'll 
>> investigate first and send a new email when I've diagnosed 
>> this.
>
> Thank you, that would be very helpful!

I was not able to reliably reproduce this, but *sometimes* the 
agent gets stuck trying to search "/", which seems to be 
impossible to abort.  Overall I don't have much in terms of 
introspection into what happens when and why, but this may very 
well be a "me" problem.

I also noticed that I cannot seem to just abort a single tool call 
that I deem unnecessary.  Aborting one of many tool calls appears 
to terminate the whole evaluation.  Not sure if that's by design.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-05 12:13           ` Ricardo Wurmus
@ 2026-11-06  0:46             ` Arun Isaac
  2026-11-06  9:36               ` Ricardo Wurmus
  0 siblings, 1 reply; 13+ messages in thread
From: Arun Isaac @ 2026-11-06  0:46 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Ricardo Wurmus, kaagum


Hi Ricardo,

> I was not able to reliably reproduce this, but *sometimes* the agent
> gets stuck trying to search "/", which seems to be impossible to
> abort. Overall I don't have much in terms of introspection into what
> happens when and why, but this may very well be a "me" problem.

I notice this sometimes too. I believe this is a performance issue with
the search tool. It would be nice to fix this somehow, and ideas
welcome. Perhaps we should fire off a ripgrep process? Or maybe, in the
interest of keeping tight security, we should write a C extension that
does the searching?

For now, I've mostly worked around by working on small codebases or
advising the LLM not to search over the entire filesystem tree.

> I also noticed that I cannot seem to just abort a single tool call
> that I deem unnecessary. Aborting one of many tool calls appears to
> terminate the whole evaluation. Not sure if that's by design.

True, and it's annoying. But this seems to be a problem with
agent-shell. For some reason, when you reject a tool call, agent-shell
decides to not only pass on the rejection but cancel the entire prompt
turn. You can inspect the ACP traffic in agent-shell using `M-x
agent-shell-toggle-logging` followed by `M-x agent-shell-view-traffic`.
I think this issue is worth raising to the agent-shell upstream.

Regards,
Arun

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-06  0:46             ` Arun Isaac
@ 2026-11-06  9:36               ` Ricardo Wurmus
  2026-11-07  1:53                 ` Arun Isaac
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo Wurmus @ 2026-11-06  9:36 UTC (permalink / raw)
  To: Arun Isaac; +Cc: Ricardo Wurmus, kaagum

Hi Arun,

>> I was not able to reliably reproduce this, but *sometimes* the 
>> agent
>> gets stuck trying to search "/", which seems to be impossible 
>> to
>> abort. Overall I don't have much in terms of introspection into 
>> what
>> happens when and why, but this may very well be a "me" problem.
>
> I notice this sometimes too. I believe this is a performance 
> issue with
> the search tool. It would be nice to fix this somehow, and ideas
> welcome. Perhaps we should fire off a ripgrep process? Or maybe, 
> in the
> interest of keeping tight security, we should write a C 
> extension that
> does the searching?

I find this surprising.  Is i/o performance with Guile so bad? 
Within the container there aren't all that many files, so even 
when the tool naïvely visits every file I didn't expect it to ever 
get truly stuck.  Perhaps it reads files (like /dev/zero) that 
never produce EOF?

> For now, I've mostly worked around by working on small codebases 
> or
> advising the LLM not to search over the entire filesystem tree.
>
>> I also noticed that I cannot seem to just abort a single tool 
>> call
>> that I deem unnecessary. Aborting one of many tool calls 
>> appears to
>> terminate the whole evaluation. Not sure if that's by design.
>
> True, and it's annoying. But this seems to be a problem with
> agent-shell. For some reason, when you reject a tool call, 
> agent-shell
> decides to not only pass on the rejection but cancel the entire 
> prompt
> turn. You can inspect the ACP traffic in agent-shell using `M-x
> agent-shell-toggle-logging` followed by `M-x 
> agent-shell-view-traffic`.
> I think this issue is worth raising to the agent-shell upstream.

I have filed a bug report: 
https://github.com/xenodium/agent-shell/issues/936

-- 
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-06  9:36               ` Ricardo Wurmus
@ 2026-11-07  1:53                 ` Arun Isaac
  2026-11-08 23:50                   ` Arun Isaac
  0 siblings, 1 reply; 13+ messages in thread
From: Arun Isaac @ 2026-11-07  1:53 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Ricardo Wurmus, kaagum


> I find this surprising. Is i/o performance with Guile so bad? Within
> the container there aren't all that many files, so even when the tool
> naïvely visits every file I didn't expect it to ever get truly stuck.
> Perhaps it reads files (like /dev/zero) that never produce EOF?

Ah, indeed, you're right! I've fixed this now. kaagum now only searches
regular files.
https://git.systemreboot.net/kaagum/commit/?id=330d89641c4dc5372b787f5db3a0fec657b0c790

> I have filed a bug report: 
> https://github.com/xenodium/agent-shell/issues/936

Thanks for reporting! And xenodium has responded too. Not the most
favourable answer, but I guess xenodium is right.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-07  1:53                 ` Arun Isaac
@ 2026-11-08 23:50                   ` Arun Isaac
  2026-11-09 11:58                     ` Ricardo Wurmus
  0 siblings, 1 reply; 13+ messages in thread
From: Arun Isaac @ 2026-11-08 23:50 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Ricardo Wurmus, kaagum


>> I have filed a bug report: 
>> https://github.com/xenodium/agent-shell/issues/936

From your bug report:

> My prompt caused three tool calls to read three files. I denied
> permission to one of the calls via the button "Reject once" on the
> permission prompt for one of the files

I may have ideas for a rather complex but interesting workaround—object
capabilities.

I'm assuming the problem is that you need the LLM to only read a few
files from the working directory. But since the LLM can see all the
files in the directory, it chooses to read other files as well. At least
I encounter this issue a lot, and every time, I have to reword my prompt
telling the LLM to not read any files other than those I mentioned.

An interesting idea may be to expose to the LLM, only those few files
that we want it to read. Containers can't help us much here. But object
capabilities can. Here's the basic idea:

You create "objects" representing the files you wish to share. Each
object is identified by a long unforgeable UUID. These UUIDs are shared
with the LLM. And to invoke a tool such as `read', the LLM must specify
the UUID of the file it wishes to read rather than the path. Since the
UUIDs are unforgeable, the LLM can only read those files whose UUIDs
have been shared with it. The LLM cannot even *refer* to any other
files.

This way, filesystem access is restricted without even needing
containers. And, in contrast to containers, we can easily allow the LLM
to read files that don't live under the same directory—imagine you wish
to share a file from a different project that lives in a different
directory.

We may also extend this idea to other kinds of objects. Here are a few
ideas:
- directory objects
- directory objects that only permit listing of contents, but not
reading
- objects representing specific GitHub/Codeberg repos—thus allowing us
to limit the repos the LLM can access—really fine-grained network access
control

I'd love to hear what you think—does this make sense? does this address
any problems you may have? etc.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: connecting to bifrost over SOCKS5 proxy fails
  2026-11-08 23:50                   ` Arun Isaac
@ 2026-11-09 11:58                     ` Ricardo Wurmus
  2026-11-15 15:43                       ` object capabilities Arun Isaac
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo Wurmus @ 2026-11-09 11:58 UTC (permalink / raw)
  To: Arun Isaac; +Cc: Ricardo Wurmus, kaagum

Hi Arun,

> An interesting idea may be to expose to the LLM, only those few 
> files
> that we want it to read. Containers can't help us much here. But 
> object
> capabilities can. Here's the basic idea:
>
> You create "objects" representing the files you wish to 
> share. Each
> object is identified by a long unforgeable UUID. These UUIDs are 
> shared
> with the LLM. And to invoke a tool such as `read', the LLM must 
> specify
> the UUID of the file it wishes to read rather than the 
> path. Since the
> UUIDs are unforgeable, the LLM can only read those files whose 
> UUIDs
> have been shared with it. The LLM cannot even *refer* to any 
> other
> files.

Would this not make other tools much harder to compose?  Any tool 
that works with files (e.g. a call to pdftotext) will have to keep 
track of input and output files to ensure that they get an ID and 
can be addressed by other tools.

Would we not also lose the ability to automatically widen a search 
or follow references from one file to another?  It sounds like for 
this to work we'd either need to let tools transparently handle 
conversion of files into objects (which sounds like it would 
defeat the purpose) or accept that tasks would need to be fully 
specified at the start so that capabilities are always sufficient.

Generally, I think it is a good idea to leave fewer things up to 
an autonomous loop and give fine-grained control over capabilities 
to the human; I guess I struggle to imagine if a system like this 
would be worth the trouble it will undoubtedly cause.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: object capabilities
  2026-11-09 11:58                     ` Ricardo Wurmus
@ 2026-11-15 15:43                       ` Arun Isaac
  0 siblings, 0 replies; 13+ messages in thread
From: Arun Isaac @ 2026-11-15 15:43 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Ricardo Wurmus, kaagum


> Would this not make other tools much harder to compose?  Any tool 
> that works with files (e.g. a call to pdftotext) will have to keep 
> track of input and output files to ensure that they get an ID and 
> can be addressed by other tools.

Yes, there will be slightly more work for a pdftotext tool. It'll have
to write the object to a file, operate on it, and then read the output
file back into an object. We can make this easy by providing the
necessary utility functions.

> Would we not also lose the ability to automatically widen a search 
> or follow references from one file to another?  It sounds like for 
> this to work we'd either need to let tools transparently handle 
> conversion of files into objects (which sounds like it would 
> defeat the purpose) or accept that tasks would need to be fully 
> specified at the start so that capabilities are always sufficient.

We will also have directory objects, and not just file objects. That
means the LLM will be able to discover the file objects in that
directory, follow references, widen search, etc. just like it can now.

That feels like we are just reinventing the current system on top of
objects and capabilities. But, this will allow us to do more—for
example, expose a directory object that only allows listing its files,
but not reading, or a directory object that exposes certain files but
not others, etc.

> Generally, I think it is a good idea to leave fewer things up to 
> an autonomous loop and give fine-grained control over capabilities 
> to the human; I guess I struggle to imagine if a system like this 
> would be worth the trouble it will undoubtedly cause.

I hear your caution. I'm not planning to implement object capabilities
right away or even ever, but if/when I do, I'll do so with an abundance
of caution. It was nice bouncing this idea off you. Thanks!

> I think it is a good idea to leave fewer things up to an autonomous
> loop and give fine-grained control over capabilities to the human

I absolutely agree. That's why I wrote kaagum in the first place. Most
agents out there tend toward automagic; that makes me deeply suspicious
and uncomfortable. So, we are aligned on this front! 😄

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-11-15 15:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 19:54 connecting to bifrost over SOCKS5 proxy fails Ricardo Wurmus
2026-11-03  0:43 ` Arun Isaac
2026-11-03 12:45   ` Ricardo Wurmus
2026-11-04  0:15     ` Arun Isaac
2026-11-04  7:45       ` Ricardo Wurmus
2026-11-04 10:40         ` Arun Isaac
2026-11-05 12:13           ` Ricardo Wurmus
2026-11-06  0:46             ` Arun Isaac
2026-11-06  9:36               ` Ricardo Wurmus
2026-11-07  1:53                 ` Arun Isaac
2026-11-08 23:50                   ` Arun Isaac
2026-11-09 11:58                     ` Ricardo Wurmus
2026-11-15 15:43                       ` object capabilities Arun Isaac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox