Skip to content

Commit 33750cb

Browse files
committed
feat: --dangerously-skip-permissions flag, default max_tokens 64k (opus 32k)
1 parent 5aebf4f commit 33750cb

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"messages":[{"blocks":[{"text":"hello","type":"text"}],"role":"user"},{"blocks":[{"text":"\n\nHello! 👋 How can I help you today? I see you're working in a Rust project (`rusty-claude-cli`) with some changes to the argument parsing in `main.rs` — specifically loading the model from config with a fallback to a default. \n\nWhat would you like to work on?","type":"text"}],"role":"assistant","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":324,"output_tokens":73}}],"version":1}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"messages":[{"blocks":[{"text":"--dangerously-skip-permissions","type":"text"}],"role":"user"},{"blocks":[{"text":"\n\nI see you're working in the `rusty-claude-cli` project. The git diff shows a simplification of the `max_tokens_for_model` function - collapsing sonnet/haiku/default cases into a single `else` branch returning 64,000.\n\nHow can I help you today? What would you like to work on?","type":"text"}],"role":"assistant","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":2126,"output_tokens":81}}],"version":1}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"messages":[],"version":1}

rust/crates/rusty-claude-cli/src/main.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,8 @@ const DEFAULT_MODEL: &str = "claude-opus-4-6";
3838
fn max_tokens_for_model(model: &str) -> u32 {
3939
if model.contains("opus") {
4040
32_000
41-
} else if model.contains("sonnet") {
42-
64_000
43-
} else if model.contains("haiku") {
44-
64_000
4541
} else {
46-
16_384
42+
64_000
4743
}
4844
}
4945
const DEFAULT_DATE: &str = "2026-03-31";
@@ -196,6 +192,10 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
196192
permission_mode = parse_permission_mode_arg(&flag[18..])?;
197193
index += 1;
198194
}
195+
"--dangerously-skip-permissions" => {
196+
permission_mode = PermissionMode::DangerFullAccess;
197+
index += 1;
198+
}
199199
"--allowedTools" | "--allowed-tools" => {
200200
let value = args
201201
.get(index + 1)
@@ -2348,6 +2348,7 @@ fn print_help_to(out: &mut impl Write) -> io::Result<()> {
23482348
out,
23492349
" --permission-mode MODE Set read-only, workspace-write, or danger-full-access"
23502350
)?;
2351+
writeln!(out, " --dangerously-skip-permissions Skip all permission checks")?;
23512352
writeln!(out, " --allowedTools TOOLS Restrict enabled tools (repeatable; comma-separated aliases supported)")?;
23522353
writeln!(
23532354
out,

0 commit comments

Comments
 (0)