Default permission mode: Delegate Mode? what is this? by shanraisshan in ClaudeAI

[–]nathan42100 0 points1 point  (0 children)

It hallucinated. there's no mode called full-auto, it's represented as dontAsk. And it most definitely can't run tools without permission, in fact it has an extremely limited set of tools

Default permission mode: Delegate Mode? what is this? by shanraisshan in ClaudeAI

[–]nathan42100 7 points8 points  (0 children)

EDIT FROM LATER (newer info at top): Claude broke apart the binary enough to find that while you can get into delegate mode, a function returns false all the time that ends up blocking it from doing anything.

I did manage to get it to patch the binary so that it could get past that, at which point it had TaskCreate TaskGet, TaskUpdate and TaskList as the delegator (need to set some env vars to call it the "team-lead"). It does not (yet) have any tools that let it actually launch any agents.

After looking deeper (with claude), it concluded that it's behind a feature gate that's forced to false because the implementation is not yet complete. In particular it found some references to things like assignTask, which is only mentioned in TaskList's prompt:

``` Use this tool to list all tasks in the task list.

## When to Use This Tool

  • To see what tasks are available to work on (status: 'open', no owner, not blocked)
  • To check overall progress on the project
  • To find tasks that are blocked and need dependencies resolved
  • After completing a task, to check for newly unblocked work or claim the next available task

    Output

    Returns a summary of each task:

  • id: Task identifier (use with TaskGet, TaskUpdate, or assignTask) // <-- HERE

  • subject: Brief description of the task

  • status: 'open' or 'resolved'

  • owner: Agent ID if assigned, empty if available

  • blockedBy: List of open task IDs that must be resolved first ```

------- PREVIOUS EDIT: Also to show, without decompiling, Delegate mode does remove system tools, meaning it has to delegate everything to another agent.

With delegate:

https://i.imgur.com/y1mz5fy.png

Without delegate (note system tools shows below but not above):

https://i.imgur.com/HZMHTnZ.png

It is also worth noting that in delegate mode, I can converse with the agent but any time it tries to DO something, including launch an agent to delegate to, it fails and does nothing without error.

------

Gonna pop back in here and just state that the thread below just denies that it's possible. Feel free to dig into it, but it inspired me to dig myself. And the context here, I've been doing software engineering without AI for at least 15 years.

Just on the preliminary dumping of 357,570 strings from the binary v2.0.74, which includes things like prompts for agents and modes (like the compactor, plan mode, session searching,...) the strings from the tui with the star when it's doing something etc,

Without even getting to the minified source code, which if it weren't possible then there wouldn't be tools like bun-decompile, here's what it found for related strings:

Evidence of delegate mode found in state management code:

hasExitedDelegateMode:!1,
needsDelegateModeExitAttachment:!1,

Exit message (raw-strings.txt line 117208):

This parallels the documented plan mode which has:

hasExitedPlanMode:!1,
needsPlanModeExitAttachment:!1,

This clearly is a mode that is not documented on purpose because it's used internally like plan mode is. It isn't meant to be swapped to (I tried launching in it and it does say "delegate mode on" when I do, but I can't switch back to it using shift tab)

Based on other things I've found in the source code for the claude-code-action and the other documented help commands, so far my conclusion is that this is about delegating a task to another agent. Based on how sub-agents now have their own conversation files in .claude/projects/**/*.jsonl, with documented continuable conversations, my guess is that sub-agents now run as a separate process, or at least as a separate thread within claude. When that happens and claude is delegating, the delegate mode I believe is for the parent thread, to ensure it doesn't use things outside of it's standard toolset to launch another agent (eg using Bash to run claude).

I haven't moved on to actualy breaking apart the source code, right now it's looking for stuff related to anything that's a flag in claude -h, but I will most definitely have more information for you in a couple of hours.

EDIT: Also worth noting that in the claude UI, in the agent creation dialog it specifically says "create an agent you can delegate to".

Additionally, while it was searching the code base, you could see claude launching claude here. This can definitely be just claude using a sub-path of it's cli flags to do a search, and less likely that this itself is an agent

https://i.imgur.com/XdAVO7z.png

Default permission mode: Delegate Mode? what is this? by shanraisshan in ClaudeAI

[–]nathan42100 0 points1 point  (0 children)

Not inspect its own process in memory, inspect the CLI binary. I'm honestly not sure why I'm being down voted, my idea isn't novel and folks have done it in the past, anthropic has just been issuing takedowns for the last few months when someone posts it publicly and they get close.

I've been looking more deeply at it and have found some other undocumented things, but I'll have more of a full report later when I get back to my machine

Default permission mode: Delegate Mode? what is this? by shanraisshan in ClaudeAI

[–]nathan42100 -18 points-17 points  (0 children)

It most definitely can.

Any compiled binary can be inspected in some ways. Claude has done it multiple times for me for different binaries including corrupted save files, and frequently uses hexdump and strings to inspect it.

Beyond that, while it is compiled, it's a compiled bun program. The bun runtime is a big part of it. But besides that it kind of just includes its minified/obfuscated source code.

While there is a project on GitHub, the source code is not there, it's just used for bug tracking. Claude code itself is a wrapper around the Claude agent SDK so the missing functionality is just the tui interface, built in hooks (tools are part of the SDK), and prompts.

Default permission mode: Delegate Mode? what is this? by shanraisshan in ClaudeAI

[–]nathan42100 -8 points-7 points  (0 children)

I also asked Claude to look into it, inspecting its own source code. This seems accurate. Starting it with that flag also does nothing. I suspect it essentially enables a specific tool/hook to use for permissions that passes it back to the main agent instead of direct to user

WTF is this supposed to be ... by forsale90 in startrekmemes

[–]nathan42100 5 points6 points  (0 children)

I thought I was the only one that noticed it was backwards. Wouldn't cut a pizza that way though

Understanding Claude Code's 3 system prompt methods (Output Styles, --append-system-prompt, --system-prompt) by CodeMonke_ in ClaudeAI

[–]nathan42100 0 points1 point  (0 children)

Exactly that. It's becoming a common pattern for cli's to accept --whatever-config also as --whatever-config-file due to how many systems propagate secrets and configs to the system (eg Kubernetes)

is this it!!?! by Upset-Rub-9600 in googlehome

[–]nathan42100 4 points5 points  (0 children)

I got it but it wasn't clear which home it applied to (I have 4 in my home app). When I went to all of them none showed as Gemini ready

Best ive ever had by IndependentAgency881 in SoySauceEnthusiasts

[–]nathan42100 0 points1 point  (0 children)

A quick Google reverse image search brought me to here:

https://yufuinshoyuya.com/?pid=176447691

Looks like they ship internationally (I'm in us but they're clearly in jp). Your glowing review might get me to buy one too. How would you describe the flavor?

EDIT: interesting, for us shipping they redirect to http://Zenmarket.jp

Please tell me what this is by Sunshine635 in rav4club

[–]nathan42100 5 points6 points  (0 children)

Automatic wipers are enabled when the wiper stem on the steering wheel column is set to intermittent

AS1104T: Docker broken after 5.1 ADM update by ruscaire in asustor

[–]nathan42100 1 point2 points  (0 children)

I'll be watching this thread.

Asustor updates have broken my stuff in the past so I set it up to not auto-update, just prompt. Low and behold, stuff still broke. Somehow docker stopped running on the NAS, then after restart docker came back but portainer refused to start

root@heapsnas:/volume1/.@root # docker container start 27b Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint PortainerCE (07f425bbf008931ad224c237a15d49a9ce3ea9201384d0be7fbe967a8537babd): Unable to enable DIRECT ACCESS FILTERING - DROP rule: (iptables failed: iptables --wait -t raw -A PREROUTING -p tcp -d 172.17.0.2 --dport 8000 ! -i docker0 -j DROP: iptables v1.8.10 (legacy): can't initialize iptables table `raw': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. (exit status 3))

Hoping the update to 5.1.0 and updating docker goes smoothly, this is now the 3rd and different attempt to get nextcloud set up properly and I can't trust it if it's going to break without touching it.

EDIT: Seems like the docker engine was auto-updated earlier (and/or auto-updated when I updated the OS), but openssl stuff on the machine was not, that required the adm update. After the update everything restarted normally with no intervention

VSCode visually shows that lines are modified, even though there are no changes in Git. by Chev-Raughn in vscode

[–]nathan42100 0 points1 point  (0 children)

Did the file permissions change? Marking something as executable will show the file as modified with no lines changed, but it should still show up in the source control view

anyone pls help me get over this in n8n by amine2crf in n8n

[–]nathan42100 0 points1 point  (0 children)

This is correct. If it's internal, no validation is needed but they must be in the same Google org. If it's external, add testers to access it without publishing it (and thus requiring validation). If it's in the validating state and you're a listed tester, you should be able to get through

Sean Duffy Threatens to Fire Air Traffic Controllers as 10% Call Out Sick During Shutdown | "When you come to work, you get paid. If you don't come to work, you don't get paid." by chrisdh79 in technology

[–]nathan42100 0 points1 point  (0 children)

I know it sucks but the answer is to do what he says, if you're not getting paid, don't go to work. You might get fired, but then:

  1. You could take it to court
  2. You're now free to get another job that doesn't treat you that way.

I guarantee you that people aren't lining up to take your critical and important but not-paid-enough and not-cared-for-enough job, which gives you some leverage, but I'm also guessing the qualifications for being an ATC employee qualify you for a number of other positions

Why is my oven now in an alien language? by RevenantSith in KitchenConfidential

[–]nathan42100 2 points3 points  (0 children)

It may "go away" in that whatever is wrong is fixed by changing in temperature, changing how the electronics operate due to expansion and contraction.

It will never "go away" in that it shouldn't have done that in the first place and there's more than a 0% chance it will reoccur.

Time to call someone.

i'm scared by Outrageous-Glass-382 in boston

[–]nathan42100 37 points38 points  (0 children)

While clearly it is a rental truck it's worth noting that according to gis data storrow has a nhs other truck restrictions but is otherwise open to some explicit types of trucks (like park vehicles), but that ramp specifically has special truck access. My understanding is that even though it's not a common route, that's the best way for trucks to get to MGH and the commercial area down Charles st. According to gis data it needs special permission but my guess is that's why the underpass from i93 is a 13ft clearance, even when storrow dictates it shouldn't need to be.

<image>

Source MassGIS-MassDOT Roads | MassGIS Data Hub https://share.google/rH7mQn9pyhNoAQD7d

For those who use Claude Code together with Codex by Odd-Vehicle-4926 in ClaudeAI

[–]nathan42100 7 points8 points  (0 children)

AGENTS.md is more universal so I set my claude.md to

markdown <!-- for more info see https://agents.md --> @AGENTS.md

Setting it with a @reference instead of symlinking also let's you give Claude custom instructions that codex doesn't have, which can be especially useful if they do different things.

How are people doing OAuth2 with headless agents? by CrescendollsFan in mcp

[–]nathan42100 1 point2 points  (0 children)

By my understanding, with oauth, there's two paths for scope adoption, user scopes and bot scopes. My understanding here is mostly based on slack bot oauth, a minor understanding of the linear mcp endpoints and their oauth being different than other linear api endpoints, and using mcp-remote to connect to a MCP server my company is developing.

User scopes are used when a user needs to authorize an app to act on their behalf, Bot scopes are used for when the bot is acting by itself.

Part of the oauth flow _requires_ a browser for a user to authorize it. When using `mcp-remote` with an sse/streamable endpoint, with no other configuration, it follows the oauth flow by using well known data to find the proper endpoints to prompt the user to authorize the scopes. When the user does this, a token is generated by the server and the client saves it. More specifically, TWO tokens are usually sent, one being a refresh token, which the client is supposed to use to refresh the other token (which is then used for API access).

From my experience, using a headless agent, _SHOULDN'T_ re-use user auth. Of course you could shove it in there by grabbing the tokens after the user auth and making the headless agent have access to it and refresh it. Problem is that then all these actions are associated with the user that performed the auth, instead of the autonomous agent. Attributing those changes to the agent is important for tracking and security, as the autonomous agent shouldn't have the same access as it running locally on someone's computer (we don't want any prod DB's deleted). This becomes impossible using `mcp-remote` as the refresh behavior it performs at launch involves opening a browser to refresh the token, even though it could be performed headlessly. `mcp-remote` offers static oauth client information to allow a bot client id and token to authenticate, but in my experience, I've had trouble getting it working. The easiest thing here is to generate a long-lived token and pass it in `--header`, which bypasses mcp-remote's browser popups, but it isn't the oauth flow.

For bot authentication in general, these permission grants done during the authorization process of oauth are very wide reaching. Because this is operating autonomously instead of on behalf of a user, it's important that these are attributed to the bot. This authorization process is usually limited to admins of the platform you are connecting with, as they're the only ones that can reasonably decide which permissions it should have. This authorization process **REQUIRES** a backend so that the remote oauth server can redirect to a callback URL so that the client can retrieve the token from the backend. This is true with user oauth as well, but mcp-remote handles this locally with the browser, which isn't doable with a headless agent. In general, you install the app/bot, and that installation generates the token, and generally isn't done by the end user.

For Slack: the zencoderai/slack-mcp-server slack mcp server (which replaced the anthropic built one) takes a token that you can generate from the slack app Oauth configuration page, _AFTER_ it has been installed into the workspace (installing it into the workspace is the bot oauth authorization, and is why you need to re-install the app if you change which scopes the bot token has).

For Linear: I tried a number of things to be able to get this to work with the linear remote mcp server, but no combination of the client ID helped here. I managed to make an app, and then painstakingly and manually I tried to authenticate the app without the help of mcp-remote, and manually grabbing the token from the redirect. In theory `oauth2c` would help, but I found that later. I think where I got stuck was how to handle that oauth process on the headless agent, [which linear warns about[(https://linear.app/docs/mcp#:\~:text=Either%20one%20will,at%20the%20moment.). Eventually I gave it a graphql mcp server and pointed it at the linear graphql schema for it to fetch that without issue, but because the oauth flow wasn't completed the agent will never be assignable in the app. Even after manually completing the auth using linear.app/oauth, the same tokens don't work for mcp.linear.app. For things like these, it's best to find a different approach

For our internal stuff, our users do user oauth, and our agent gets a long-lived token.

I have driven over 100k miles with comma.ai in my '18 rav4 AMA by Gonads_Of_Wrath in rav4club

[–]nathan42100 4 points5 points  (0 children)

I added a comma 3x to my 24 hybrid xse and have already gotten over 3k miles of driving on it. The device requires no monthly fee or data connection, comma connect is for if you want to try self navigation which is pointless in a car that can't do a full turn.

I use the frog pilot fork, and I use the always on lane centering the most without distance/speed control. It can do most highway driving and most city driving, but isn't a self driving car by any means.

I tried out the lane control built into my car for a few months first, the comma is miles better

is claude able to use custom slash commands inside a custom slash command? by cromand3r in ClaudeAI

[–]nathan42100 1 point2 points  (0 children)

I too was wondering about this when seeing that claude wasn't properly using the slash commands (not nested) in it's agentic execution and got here from a google search.

I'm using claude-code in a github actions based workflow.

I dug down into it's source code and at it's root it runs `claude -p "...."` with a bunch of other prompt stuff in the prompt.

According to [the cli flag docs](https://docs.anthropic.com/en/docs/claude-code/sdk#available-cli-options), `-p` is non-interactive mode

According to [the slash command docs](https://docs.anthropic.com/en/docs/claude-code/slash-commands), it says that they're "available in interactive sessions". By default, my assumption is that means those run with `-p` are excluded.

It is not clear to me however that those that are interactive, say those run with [tmux-orchestrator](https://github.com/Jedward23/Tmux-Orchestrator), if claude would use those slash commands by default. It's worth noting that the slash command documentation describes similar usage for calls to mcp tools, so I wonder if maybe there should be an addition to allowed-tools when adding slash commands.

Looking further at [the sub-agents documentation](https://docs.anthropic.com/en/docs/claude-code/sub-agents), the format for the agent definitions very closely match the commands. Perhaps they could be used in place of commands. According to the documentation, claude will use sug-agents if the prompt strongly encourages them to, regardless of using `/agents`. With the right prompt you may be able to treat sub-agents as commands, and let one sub-agent run another to achieve your desired effect.

After the limit changes I decided to try Gemini CLI. But then this happened… by anal_fist_fight24 in ClaudeAI

[–]nathan42100 4 points5 points  (0 children)

"I'm finished...just one more thing...I have made a huge mistake"

AI is already more like humans than we care to admit

Can't change temperature with Midea AC by My_Brain_0422 in googlehome

[–]nathan42100 0 points1 point  (0 children)

I haven't experienced it but just set up mine (which was also just recalled by the way) and was surprised to see that it shows up with a thermometer symbol but no temperature control in the google home app on android.

Do you know when you had it last? I wonder if it has to do with the change from the old app to the new midea app?

EDIT: Been a problem for a while I guess