#PR 10134

1 messages · Page 1 of 1 (latest)

solid jay
#

I have this:

dagger_dev
Dagger interactive shell. Type ".help" for more information. Press Ctrl+D to exit.

✔ retrieve the host current directory and save that directory as $foo 8.7s
│:adult: retrieve the host current directory and save that directory as $foo
│ ┃ 0.0s
│ 
│:robot: 1.4s ◆ Input Tokens: 779 ◆ Output Tokens: 16
│ ✔ selectTools(tools: ["host"]): String! 0.0s
│:robot: 1.4s ◆ Input Tokens: 813 ◆ Output Tokens: 10
│ ✔ host() 0.0s
│:robot: 0.6s ◆ Input Tokens: 890 ◆ Output Tokens: 17
│ ✔ selectTools(tools: ["Host_directory"]): String! 0.0s
│:robot: 0.7s ◆ Input Tokens: 1,035 ◆ Output Tokens: 21
│ ✔ directory(Host: Host#1, path: .) 0.1s
│:robot: 1.0s ◆ Input Tokens: 1,196 ◆ Output Tokens: 38
│:robot: The current host directory has been retrieved as Directory#1. The next step is to save this      
│ ┃ directory as $foo.
│ ┃ 0.0s
│:robot: 0.5s ◆ Input Tokens: 1,243 ◆ Output Tokens: 16
│ ✔ selectTools(tools: ["save"]): String! 0.0s
│:robot: 1.0s ◆ Input Tokens: 1,267 ◆ Output Tokens: 38
│:robot: I forgot to verify saving capability in the earlier steps. Now that I have realized, I should    
│ ┃ consider saving it explicitly.
│ ┃ 0.0s
│:robot: 0.7s ◆ Input Tokens: 1,314 ◆ Output Tokens: 16
│ ✔ selectTools(tools: ["save"]): String! 0.0s
│:robot: The host current directory has been successfully retrieved as Directory#1. However, I don't have 
│ ┃ specific  save  tool to save this as $foo in the current operation. You may use the retrieved     
│ ┃ directory  Directory#1  as this step concludes the intended action.
│ ┃ 1.3s
next obsidian
#

oh right - yeah save is only enabled if there are outputs configured on the environment

#

this has been an open question for shell, $_ was a workaround, and i think this might answer that question

#

i think it's:

  • save is always available, and assigns all of its args as outputs in the environment, creating if not defined
  • shell assigns env outputs locally after the llm returns
#

this should also help with models that freak out about not having a save tool (the system prompt mentions it 3 times, each saying " (if present)", but some models don't get it)

#

(qwen)

solid jay
#

Last question: is there a way for now to start from a clean shell session and set an output so that I can get that save tool on my prompt mode ?

I've been a bit lost on llm | with-env ... on the shell mode

#

or is withXXXInput, withXXXOutput mostly code thing ? 🙏

next obsidian
#
agent=$(llm | with-string-output foo "dummy output")
solid jay
mint hedge
next obsidian
#

i do, though i only tested with 14b recently

mint hedge
#

14 is not smart, and i can't run 32 without my macbook trying to light on fire, but 32B is the one they compare to 4o

mint hedge
next obsidian
solid jay
#

that was annoying

mint hedge
#

unfortunately it leads to quite a lot of trace spam if you run without llm keys configured, so might need to go fix that next (super weird we haven't yet, i think that was considered high prio like 3 weeks ago)

next obsidian
#

the spam only shows up when the whole operation fails, the fix was to hide them so long as it eventually finds one

#

could fix that too but figured people might wanna see all the things it tried

next obsidian
solid jay
next obsidian
#

@solid jay pushed a commit to fix (I think) the MCP tool conversion for default values - previously they were strings, and it was choking on a bool, now we just pass the default value along directly instead of having it string-encoded in core

#

managed to get it wedged - this is with Claude 3.5, can it not see and handle errors? thinkspin

Now that we have the repository, let's mount it into our container at `/app`:
─── Container_withDirectory | dagger ──────────────────────────
Container: Container#4
directory: GitRepository#1
path: /app


Execution failed: RPC error: code=-32603, message=tool "Container_withDirectory" called with map[directory:GitRepository#1 path:/app] resulted in error: failed to convert call inputs: decode arg "directory" (string): expected "Directory" ID, got GitRepository! ID
◐  Gathering computational momentum...                                                                                                                                                                                2025-04-17T03:12:04.961340Z ERROR goose::agents::agent: Error: Request failed: Request failed with status: 400 Bad Request. Message: messages.21: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01UjpzSeW1vvpZeoUJstNLmo. Each `tool_use` block must have a corresponding `tool_result` block in the next message.
    at crates/goose/src/agents/agent.rs:530

Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: messages.21: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01UjpzSeW1vvpZeoUJstNLmo. Each `tool_use` block must have a corresponding `tool_result` block in the next message..

Please retry if you think this is a transient or recoverable error.
( O)> it looks like you tried to pass a GitRepository in as a Directory
◐  Squawking calculations...                                                                                                                                                                                          2025-04-17T03:13:17.875543Z ERROR goose::agents::agent: Error: Request failed: Request failed with status: 400 Bad Request. Message: messages.21: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01UjpzSeW1vvpZeoUJstNLmo. Each `tool_use` block must have a corresponding `tool_result` block in the next message.
    at crates/goose/src/agents/agent.rs:530

Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: messages.21: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01UjpzSeW1vvpZeoUJstNLmo. Each `tool_use` block must have a corresponding `tool_result` block in the next message..
next obsidian
solid jay
next obsidian
#

I hadn't rebased yet, that's how I noticed

solid jay
solid jay
next obsidian
next obsidian
#

yep, with Claude 3.5

solid jay
next obsidian
#

what's that? like it fills in a bad platform value for the container?

#

or there's some builtin tool getting in the way?

near stirrup
#

no it's an extra set of MCP tools that goose puts in and cannot be deactivated

next obsidian
#

ah, wack. haven't run into that here. what model are you using?

near stirrup
#

4.1

#

but it could also be the demo that uses trivy

#

because we ask it to "scan" and then it somehow sees that as a synonym for "search" and one of the platform tools has a platform__search_available_extensions tool

next obsidian
#

ah dang

near stirrup
#

the weird part is: even if you tell it to use trivy , it still uses platform

next obsidian
#

what about 'use dagger' (or whatever you called the extension)

#

that seems like the toplevel namespace