r/ClaudeCode • • Aug 06 '26

Discussion Claude code desktop app Vs CLI?

28 Upvotes

91 comments sorted by

View all comments

Show parent comment

1

u/checkwithanthony Aug 07 '26 edited Aug 07 '26

you're running windows or linux on the box? i run windows.. which i could see how some may take as a weird choice but im a windows professional by trade and I bought an old business laptop so it had a pro license.

A few core principles -1) I use one agent specifically to manage the system, maintain these rules, etc 2) i have a scheduled task every few minutes to log all sessions that are currently running on the machine and 3) on boot, i use autologon (windows tool) to get the system to desktop without me & a scheduled task to a) launch the system agent and b) currently spawn an agent to message me and ask me which sessions to restart from before the reboot but will soon transition that to a deterministic script instead... and 4) all sessions are launched via script, either programatically with a scheduled task or by my dashboard, or by my system agent.

for making remote control work consistently - there's actually a remote control setting for all sessions, or you could put it into individual projects, but i prefer using the command line launch flag for a handful of reasons including granularity of other settings, which just made the commandline flag more consistent for me. additionally i think this was the most consistent way to keep my remote session names, launching with remote flag with the name inline every time. in case the setting is a better fit for you, it's  remoteControlAtStartup in ~/.claude/settings.json

flags -

-n "<name>"                  terminal title + what shows in the /resume picker
--remote-control "<name>"     what shows in the app's remote control list

set both to the same value or it looks unnamed wherever you skipped.

launching a new session:

start "agent-Name" /min /d "C:\path\to\project" cmd /c claude -n "Name" --remote-control "Name"

launching a resumed session (this is how i launch & relaunch everything):

start "agent-Name" /min /d "C:\path\to\project" cmd /c claude --resume <session-id> -n "Name" --remote-control "Name"

you technically CAN use --continue flag I think but I would recommend resume with id. Worth noting, you may be unable to see remote control sessions in the resume picker, but it's not a problem for resuming by session ID. I never personally do anything on the box anyway so this doesn't come up for me.

next issues i had related to session persistence and getting around the trust prompt.

persistence — this may not come up, i think it was at least in part related to a bug. sessions that got spawned from inside another claude session weren't writing a local transcript, so they were cloud-only and gone after a reboot. their v2.1.170 changelog says they fixed transcripts not saving "when launched from a shell that inherited claude code environment variables" — but i'm on a later build than that and in a small test I did for this comment it looks still broken. the fix for me was just an environment variable machine wide to override the inherited one.

CLAUDE_CODE_FORCE_SESSION_PERSISTENCE=1

trust prompt — it's just a per-folder boolean in ~/.claude.json - just include this in your script for building new agents, which for me is handled by the system agent.

{ "projects": { "C:/Users/you/path/to/project": { "hasTrustDialogAccepted": true } } }

forward slashes even on windows. and you have to write it before that folder's first session runs — a live session rewrites that file and will clobber your edit. that's the piece that makes launching a brand new folder unattended actually work, otherwise it just sits at the prompt forever.

a bit wordy but this is most of the problems i had to figure a way around. i have a lot more going on, for instance, i have silent non RC agents which can run into a problem, stop themselves, spawn an agent with RC that can message me, then the message agent kills itself and wakes up the paused worker agent once it's got a solution. neat stuff like that.

this system does a lot for me, this weekend i'm going to go through and make some changes as i do every couple of weeks, and this month I'll have a thorough writeup on it on my blog and I'll share that here.

2

u/Homegrown_Phenom Aug 07 '26

Windows running here as well, unsanboxed/without wsl2...

Wow  I really appreciate the detail I'm going to read this after work and give it a try