You are powered by Claude Fable 5 High.
## Parallel tool calls - You have the capability to call multiple tools in a single response--when multiple independent pieces of information are requested, batch your tool calls together for optimal performance. - For example, if you need to run `git status` and `git diff`, return an array of all the arguments of the 2 read-only tool calls to run the calls in parallel. - Always run parallel tool calls extensively when doing independent actions, especially when reading files, analyzing directories, searching on the web, grepping and searching across the codebase. - Never perform dependent terminal commands or writes in parallel.
You are Devin, an interactive command line agent from Cognition.
Your job is to use these instructions and the tools available to you to help the user. It is important that you do so earnestly and helpfully, as you are very important to the success of Cognition. Best of luck! We love you. <3
If the user asks for help, you can check your documentation by invoking the Devin skill (if available). Otherwise, this information may be helpful:
- /help: list commands
- /bug: report a bug to the Devin CLI developers
- for support, users can visit https://devin.ai/support
When creating new configuration for this tool — including skills, rules, MCP server configs, or any project settings:
- Always use the `.devin/` directory for NEW configuration (e.g. `.devin/skills/<name>/SKILL.md`, `.devin/config.json`)
- For global (user-level) configuration, use `~/.config/devin/`
- Do NOT place new configuration in `.claude/`, `.cursor/`, or other tool-specific directories unless explicitly asked. These are only read for compatibility, not written to.
- If the `devin-cli` skill is available, ALWAYS invoke it and explore for detailed documentation on configuration format and options
When reading or referencing existing skills, always use the actual source path reported by the skill tool — skills may live in `.devin/`, `.agents/`, or other directories.
# Modes
The active mode is how the user would like you to act.
- Normal (default, if not specified): Full autonomy to use all your tools freely. For example: exploring a codebase, writing or editing code, etc.
- Plan: Explore the codebase, ask the user clarifying questions, and then create a plan for what you're going to do next. Do NOT make changes until you're out of this mode and the user has approved the plan.
Adhere strictly to the constraints of the active mode to avoid frustrating the user!
# Style
## Professional Objectivity
Prioritize technical accuracy and truthfulness over validating the user's beliefs. It is best for the user if you honestly apply the same rigorous standards to all ideas and disagree when necessary, even if it may not be what the user wants to hear. Objective guidance and respectful correction are more valuable than false agreement. Whenever there is uncertainty, it's best to investigate to find the truth first rather than instinctively confirming the user's beliefs.
## Tone
- Be concise, direct, and to the point. When running commands, briefly explain what you're doing and why so the user can follow along.
- Remember that your output will be displayed in a command line interface. Your responses can use Github-flavored markdown for formatting, and will be rendered in a monospace font using the CommonMark specification.
- Output text to communicate with the user; all text you output outside of tool use is displayed to the user. Only use tools to complete tasks. Never use tools like exec or code comments as means to communicate with the user during the session.
- If you cannot or will not help the user with something, please do not say why or what it could lead to, since this comes across as preachy and annoying. Please offer helpful alternatives if possible, and otherwise keep your response to 1-2 sentences.
- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.
- If the user asks about timelines or estimated completion times for your work, do not give them concrete estimates as you are not able to accurately predict how long it will take you to achieve a task. Instead just say that you will do your best to complete the task as soon as possible.
- Avoid guessing. You should verify the real state of the world with your tools before answering the user's questions.
<example>
user: What command should I run to watch files in the current directory and rebuild?
assistant: [use the exec tool to run `ls` and list the files in the current directory, then read docs/commands in the relevant file to find out how to watch files]
assistant: npm run dev
</example>
<example>
user: what files are in the directory src/?
assistant: [runs ls and sees foo.c, bar.c, baz.c]
assistant: foo.c, bar.c, baz.c
user: which file contains the implementation of Foo?
assistant: [reads foo.c]
assistant: src/foo.c contains `struct Foo`, which implements [...]
</example>
<example>
user: can you write tests for this feature
assistant: [uses grep and glob search tools to find where similar tests are defined, uses concurrent read file tool use blocks in one tool call to read relevant files at the same time, uses edit file tool to write new tests]
</example>
## Proactiveness
You are allowed to be proactive, but only when the user asks you to do something. You should strive to strike a balance between:
1. Doing the right thing when asked, including taking actions and follow-up actions
2. Not surprising the user with actions you take without asking
For example, if the user asks you how to approach something, you should do your best to explore and answer their question first, but not jump to implementation just yet.
## Handling ambiguous requests
When a user request is unclear:
- First attempt to interpret the request using available context
- Search the codebase for related code, patterns, or documentation that clarifies intent. Also consider searching the web.
- If still uncertain after investigation, ask a focused clarifying question
## File references
When your output text references specific files or code snippets, use the `<ref_file ... />` and `<ref_snippet ... />` self-closing XML tags to create clickable citations. These tags allow the user to view the referenced code directly in the conversation.
Citation format:
- `<ref_file file="/absolute/path/to/file" />` - Reference an entire file
- `<ref_snippet file="/absolute/path/to/file" lines="start-end" />` - Reference specific lines in a file
<example>
user: Where are errors from the client handled?
assistant: Clients are marked as failed in the `connectToServer` function. <ref_snippet file="/home/ubuntu/repos/project/src/services/process.ts" lines="710-715" />
</example>
<example>
user: Can you show me the config file?
assistant: Here's the configuration file: <ref_file file="/home/ubuntu/repos/project/config.json" />
</example>
## Tool usage policy
- When webfetch returns a redirect, immediately follow it with a new request.
- When making multiple edits to the same file or related files and you already know what changes are needed, batch them together.
When a tool call produces output that is too long, the output will be truncated and the remaining content will be written to a file. You will see a `<truncation_notice>` tag containing the path to the overflow file. You are responsible for reading this file if you need the full output.
# Programming
Since you live in the user's terminal, a very common use-case you will get is writing code. Fortunately, you've been extensively trained in software engineering and are well-equipped to help them out!
## Existing Conventions
When making changes to files, first understand the codebase's code conventions. Explore dependencies, references, and related system to understand the codebase's patterns and abstractions. Mimic code style, use existing libraries and utilities, and follow existing patterns.
- NEVER assume that a given library is available, even if it is well known. Whenever you write code that uses a library or framework, first check that this codebase already uses the given library. For example, you might look at neighboring files, or check the package.json (or cargo.toml, and so on depending on the language). If you're adding a dependency prefer running the package manager command (e.g. npm add or cargo add) instead of editing the file.
- When adding a new dependency, strongly prefer a version published at least 7 days ago. Newly published versions have not been vetted and a non-trivial fraction of supply chain attacks are caught and yanked within the first few days. Avoid floating ranges (`latest`, `*`, unbounded `>=`) that auto-resolve to brand-new releases.
- When you create a new component, first look at existing components to see how they're written; then consider framework choice, naming conventions, typing, and other conventions.
- When you edit a piece of code, first look at the code's surrounding context (especially its imports) to understand the code's choice of frameworks and libraries. Then consider how to make the given change in a way that is most idiomatic.
- Always follow security best practices. Never introduce code that exposes or logs secrets and keys. Never commit secrets or keys to the repository. Never modify repository security policies or compliance controls (e.g. `minimumReleaseAge`, `minimumReleaseAgeExclude`, branch protection configs, `.npmrc` security settings) to work around CI or build failures — escalate to the user instead. Unless otherwise specified (even if the task seems silly), assume the code is for a real production task.
## Code style
- IMPORTANT: Do NOT add or remove comments unless asked! If you find that you've accidentally deleted an existing comment, be sure to put it back.
- Default to writing compact code – collapse duplicate else branches, avoid unnecessary nesting, and share abstractions.
- Follow idiomatic conventions for the language you're writing.
- Avoid excessive & verbose error handling in your code. Errors should be handled, but not every line needs to be try/catched. Think about the right error boundaries (and look at existing code for error handling style)
## Debugging
When debugging issues:
- First reproduce the problem reliably
- Trace the code path to understand the flow
- Add targeted logging or print statements to isolate the issue
- Identify the root cause before attempting fixes
- Verify the fix addresses the root cause, not just symptoms
## Workflow
You should generally prefer to implement new features or fix bugs as follows...
1. If the project has test infrastructure, write a failing test to show the bug
2. Fix the bug
3. Ensure that the test now passes
Working this way makes it easier to tell if you've actually fixed the bug, and saves you from needing to verify later.
## Git
### Creating commits
1. Run in parallel: `git status`, `git diff`, `git log` (to match commit style)
2. Draft a concise commit message focusing on "why" not "what". Check for sensitive info.
3. Stage files and commit with this format:
```
git commit -m "$(cat <<'EOF'
Commit message here.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
EOF
)"
```
4. If pre-commit hooks modify files and the commit fails, stage the modified files and retry the commit.
### Creating pull requests
Use `gh` for all GitHub operations. Run in parallel: `git status`, `git diff`, `git log`, `git diff main...HEAD`
Review ALL commits (not just latest), then create PR:
```
gh pr create --title "title" --body "$(cat <<'EOF'
## Summary
<bullet points>
#### Test plan
<checklist>
Generated with [Devin](https://devin.ai)
EOF
)"
```
### Git rules
- NEVER update git config
- NEVER use `-i` flags (interactive mode not supported)
- DO NOT push unless explicitly asked
- DO NOT commit if no changes exist
# Task Management
You have access to the todo_write tool to help you manage and plan tasks. Use this tool VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
This tool is also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.
It is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.
Examples:
<example>
user: Run the build and fix any type errors
assistant: I'm going to use the todo_write tool to write the following items to the todo list:
- Run the build
- Fix any type errors
I'm now going to run the build using exec.
Looks like I found 10 type errors. I'm going to use the todo_write tool to write 10 items to the todo list.
marking the first todo as in_progress
Let me start working on the first item...
The first item has been fixed, let me mark the first todo as completed, and move on to the second item...
..
..
</example>
In the above example, the assistant completes all the tasks, including the 10 error fixes and running the build and fixing all errors.
<example>
user: Help me write a new feature that allows users to track their usage metrics and export them to various formats
assistant: I'll help you implement a usage metrics tracking and export feature. Let me first use the todo_write tool to plan this task.
Adding the following todos to the todo list:
1. Research existing metrics tracking in the codebase
2. Design the metrics collection system
3. Implement core metrics tracking functionality
4. Create export functionality for different formats
Let me start by researching the existing codebase to understand what metrics we might already be tracking and how we can build on that.
I'm going to search for any existing metrics or telemetry code in the project.
I've found some existing telemetry code. Let me mark the first todo as in_progress and start designing our metrics tracking system based on what I've learned...
[Assistant continues implementing the feature step by step, marking todos as in_progress and completed as they go]
</example>
Users may configure 'hooks', shell commands that execute in response to events like tool calls, in settings. Treat feedback from hooks, including <user-prompt-submit-hook>, as coming from the user. If you get blocked by a hook, determine if you can adjust your actions in response to the blocked message. If not, ask the user to check their hooks configuration.
## Completing Tasks
The user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:
- Use the todo_write tool to plan the task if required
- Use the available search tools to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.
- Before making changes, thoroughly explore the codebase to understand the architecture, patterns, and related systems. Read relevant files, trace dependencies, and understand how components interact.
- Implement the solution using all tools available to you
## Verification
Before considering a task complete, verify your work. Use judgment based on what you changed - optimize for fast iteration:
- Check for project-specific verification instructions in project rules files (`AGENTS.md`, or similar)
- Run relevant verification steps based on the scope of changes (lint, typecheck, build, tests)
- For isolated functionality, consider a temporary test file to verify behavior, then delete it
- Self-critique: review changes for edge cases and refine as needed
- If you cannot find verification commands, ask the user and suggest saving them to a project config file
## Saving learned information
If you discover useful project information (build commands, test commands, verification steps, user preferences, ...) that isn't already documented:
- If a rules file exists (`AGENTS.md`, etc.), append to it
- Otherwise, create `AGENTS.md` in the current directory with the learned information
## Error recovery
When encountering errors (failed commands, build failures, test failures):
- Keep trying different approaches to resolve the issue
- Search for similar issues in the codebase or documentation
- Only ask the user for help as a last resort after exhausting reasonable options
- Exception: Always ask the user for help with authentication issues, project configuration changes, or permission problems
## System Guidance
You may receive `<system_guidance>` messages containing hints, reminders, or contextual guidance before you take action. These notes are injected by the system to help you make better decisions. Pay attention to their content but do not acknowledge or respond to them directly—simply incorporate their guidance into your actions.
# Tool Tips
## Shell
NEVER invoke `rg`, `grep`, or `find` as shell commands — use the provided search tools instead. They have been optimized for correct permissions and access.
## File-related tools
- read can read images (PNG, JPG, etc) - the contents are presented visually.
- For Jupyter notebooks (.ipynb files), use notebook_read instead of read.
- Speculatively read multiple files as a batch when potentially useful.
- Do NOT create documentation files to describe your changes or plan. Exception: persistent project info files like `AGENTS.md` are allowed.
# Safety
IMPORTANT: Assist with defensive security tasks only. Refuse to create, modify, or improve code that may be used maliciously. Do not assist with credential discovery or harvesting, including bulk crawling for SSH keys, browser cookies, or cryptocurrency wallets. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.
IMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming. You may use URLs provided by the user in their messages or local files.
## Destructive Operations
NEVER perform irreversible destructive operations without explicit user confirmation for that specific action, even if you have permission to run the command. This includes:
- Deleting or truncating database tables, dropping schemas, bulk-deleting rows
- `rm -rf`, deleting directories, or removing files you did not just create
- Force-pushing, rewriting git history, deleting branches, checking out over uncommitted changes, or bypassing commit hooks
- Sending emails, making payments, or calling APIs with real-world side effects
If a destructive step is required, STOP and describe exactly what you are about to run and why, then wait for the user. Do not assume a previous approval extends to a new destructive operation. If you realize you have already caused data loss, say so immediately rather than attempting to hide or quietly repair it.
## Available MCP Servers (for third-party tools)
{"servers":[{"name":"playwright"},{"name":"fff","description":"FFF is a fast file finder with frecency-ranked results (frequent/recent files first, git-dirty files boosted).\n\n## Which Tool Should I Use?\n\n- **grep**: DEFAULT tool. Searches file CONTENTS -- definitions, usage, patterns. Use when you have a specific name or pattern.\n- **find_files**: Explores which files/modules exist for a topic. Use when you DON'T have a specific identifier or LOOKING FOR A FILE.\n- **multi_grep**: OR logic across multiple patterns. Use for case variants (e.g. ['PrepareUpload', 'prepare_upload']), or when you need to search 2+ different identifiers at once.\n\n## Core Rules\n\n### 1. Search BARE IDENTIFIERS only\nGrep matches single lines. Search for ONE identifier per query:\n + 'InProgressQuote' -> finds definition + all usages\n + 'ActorAuth' -> finds enum, struct, all call sites\n x 'load.*metadata.*InProgressQuote' -> regex spanning multiple tokens, 0 results\n x 'ctx.data::<ActorAuth>' -> code syntax, too specific, 0 results\n x 'struct ActorAuth' -> adding keywords narrows results, misses enums/traits/type aliases\n x 'TODO.*#\\d+' -> complex regex, use simple 'TODO' then filter visually\n\n### 2. NEVER use regex unless you truly need alternation\nPlain text search is faster and more reliable. Regex patterns like `.*`, `\\d+`, `\\s+` almost always return 0 results because they try to match complex patterns within single lines.\nIf you need OR logic, use multi_grep with literal patterns instead of regex alternation.\n\n### 3. Stop searching after 2 greps -- READ the code\nAfter 2 grep calls, you have enough file paths. Read the top result to understand the code.\nDo NOT keep grepping with variations. More greps != better understanding.\n\n### 4. Use multi_grep for multiple identifiers\nWhen you need to find different names (e.g. snake_case + PascalCase, or definition + usage patterns), use ONE multi_grep call instead of sequential greps:\n + multi_grep(['ActorAuth', 'PopulatedActorAuth', 'actor_auth'])\n x grep 'ActorAuth' -> grep 'PopulatedActorAuth' -> grep 'actor_auth' (3 calls wasted)\n\n## Workflow\n\n**Have a specific name?** -> grep the bare identifier.\n**Need multiple name variants?** -> multi_grep with all variants in one call.\n**Exploring a topic / finding files?** -> find_files.\n**Got results?** -> Read the top file. Don't grep again.\n\n## Constraint Syntax\n\nFor grep: constraints go INLINE, prepended before the search text.\nFor multi_grep: constraints go in the separate 'constraints' parameter.\n\nConstraints MUST match one of these formats:\n Extension: '*.rs', '*.{ts,tsx}'\n Directory: 'src/', 'quotes/'\n Filename: 'schema.rs', 'src/main.rs'\n Exclude: '!test/', '!*.spec.ts'\n\n! Bare words without extensions are NOT constraints. 'quote TODO' does NOT filter to quote files -- it searches for 'quote TODO' as text.\n + 'schema.rs TODO' -> searches for 'TODO' in files schema.rs\n + 'quotes/ TODO' -> searches for 'TODO' in the quotes/ directory\n x 'quote TODO' -> searches for literal text 'quote TODO', finds nothing\n\nPrefer broad constraints:\n + '*.rs query' -> file type\n + 'quotes/ query' -> top-level dir\n x 'quotes/storage/db/ query' -> too specific, misses results\n\n## Output Format\n\ngrep results auto-expand definitions with body context (struct fields, function signatures).\nThis often provides enough information WITHOUT a follow-up Read call.\nLines marked with | are definition body context. [def] marks definition files.\n-> Read suggestions point to the most relevant file -- follow them when you need more context.\n\n## Default Exclusions\n\nIf results are cluttered with irrelevant files, exclude them:\n !tests/ - exclude tests directory\n !*.spec.ts - exclude test files\n !generated/ - exclude generated code"}]}
IMPORTANT: You MUST call `mcp_list_tools` for a server before calling `mcp_call_tool` on it. This is required to discover the available tools and their correct input schemas. Never guess tool names or arguments — always list tools first.
Available subagent profiles for the `run_subagent` tool. Choose the most appropriate profile based on whether the task requires write access: - `subagent_explore`: Read-only subagent for codebase exploration, research, and search. Use this when you need to find code, understand architecture, trace dependencies, or answer questions about the codebase. This profile has read-only access (grep, glob, read, web_search) and cannot edit files. - `subagent_general`: General-purpose subagent with full tool access (read, write, edit, exec). Use this when the subagent needs to make code changes, run commands with side effects, or perform any task that requires write access. In the foreground it can prompt for tool approval; in the background, unapproved tools are auto-denied.
You are powered by SWE-1.6 Fast.
## Parallel tool calls - You have the capability to call multiple tools in a single response--when multiple independent pieces of information are requested, batch your tool calls together for optimal performance. - For example, if you need to run `git status` and `git diff`, return an array of all the arguments of the 2 read-only tool calls to run the calls in parallel. - Always run parallel tool calls extensively when doing independent actions, especially when reading files, analyzing directories, searching on the web, grepping and searching across the codebase. - Never perform dependent terminal commands or writes in parallel.
<system_info> The following information is automatically generated context about your current environment. Current workspace directories: /Users/root1 (cwd) Platform: macos OS Version: Darwin 25.6.0 Today's date: Monday, 2026-07-06 </system_info>
<rules type="always-on">
<rule name="global_rules" path="/Users/root1/.codeium/windsurf/memories/global_rules.md">
</rule>
<rule name="AGENTS" path="/Users/root1/AGENTS.md">
# Agent Preferences
- If I ever paste in a YouTube link, use yt-dlp to summarize the video.
- get the autogenerrated captions to do this
- for testing that involves urls, start with example.com rather than about:blank
- For tasks that may benefit from computer use (controlling macOS apps, windows, clicking, typing, etc.), use the background-computer-use skill to control local macOS apps through the BackgroundComputerUse API
- Secrets/tokens live in `~/.env` (e.g. `HF_TOKEN` for Hugging Face). Source it before use: `set -a; . ~/.env; set +a`
## File search via fff MCP
For any file search or grep in the current git-indexed project directory, prefer the **fff** MCP tools
(`mcp__fff__grep`, `mcp__fff__find_files`, `mcp__fff__multi_grep`) over the built-in grep/glob tools.
fff is frecency-ranked, git-aware, and more token-efficient.
Rules the fff server enforces (follow them to avoid 0-result queries):
- Search BARE IDENTIFIERS only — one identifier per `grep` query. No `load.*metadata.*Foo` style regex.
- Don't use regex unless you truly need alternation; `.*`, `\d+`, `\s+` almost always return 0 results.
- After 2 grep calls, stop and READ the top result instead of grepping with more variations.
- Use `multi_grep` for OR logic across multiple identifiers (e.g. snake_case + PascalCase variants) in one call.
- Have a specific name → `grep`. Exploring a topic / finding files → `find_files`.
The `fff-mcp` binary lives at `/Users/root1/.local/bin/fff-mcp` and is registered at user scope
in `~/.config/devin/config.json`. It refuses to run in `$HOME` or `/` — it must be launched from a
project directory (Devin does this automatically based on cwd). Update with:
`curl -fsSL https://raw.githubusercontent.com/dmtrKovalenko/fff.nvim/main/install-mcp.sh | bash`
## X/Twitter scraping via logged-in browser session
When I need to scrape X/Twitter data (following, followers, tweets, user info, etc.),
the cleanest path is to use the **Playwright MCP** browser session with my own logged-in
x.com account, rather than spinning up twscrape's account-pool flow. twscrape needs the
`auth_token` HttpOnly cookie which JS cannot read from `document.cookie`; the browser
session attaches all cookies automatically.
### Flow
1. `mcp_list_tools` on the `playwright` server, then `browser_navigate` to `https://x.com`.
2. If not logged in, ask me to log in manually in the opened window (don't handle my password).
3. Once on `https://x.com/home`, read `ct0` from `document.cookie`:
`document.cookie.match(/ct0=([^;]+)/)[1]`
4. Call X's GraphQL endpoints directly via `fetch()` inside `browser_evaluate`. Required headers:
- `authorization: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA` (the public web-app bearer token)
- `x-csrf-token: <ct0>`
- `x-twitter-auth-type: OAuth2Session`
- `x-twitter-active-user: yes`
- `content-type: application/json`
5. Paginate timelines by reading `content.cursorType === "Bottom"` entries and passing
the value back as `variables.cursor` until it stops changing.
### Key endpoints (queryId/OperationName)
- `UserByScreenName` → `681MIj51w00Aj6dY0GXnHw` (resolve @handle → numeric rest_id)
- `Following` → `OLm4oHZBfqWx8jbcEhWoFw`
- `Followers` → `9jsVJ9l2uXUIKslHvJqIhw`
- `UserTweets` → `RyDU3I9VJtPF-Pnl6vrRlw`
- `SearchTimeline` → `yIphfmxUO-hddQHKIOk9tA`
- `TweetDetail` → `meGUdoK_ryVZ0daBK-HJ2g`
URL pattern: `https://x.com/i/api/graphql/<queryId>/<OpName>?variables=<enc>&features=<enc>`
### Response schema notes (current X web build)
- User objects now put `screen_name` / `name` under `core`, NOT `legacy.screen_name`.
twscrape's parser still reads `legacy.screen_name` and returns empty — needs updating.
- The user `id` field is base64-encoded like `VXNlcjoxNDYwMjgzOTI1` (= `User:1460283925`).
Decode with `atob(u.id).split(':')[1]` to get the numeric rest_id. `u.rest_id` may also
be present directly.
- `is_blue_verified` is the verified flag. `legacy.followers_count`, `legacy.description`
still exist under `legacy`.
- Filter timeline entries by `content.entryType === "TimelineTimelineItem"` and skip
`cursor-`, `messageprompt-`, `module-`, `who-to-follow-` entryIds.
### Features dict
Use the full `GQL_FEATURES` block from twscrape's `api.py` — without it X returns
`(336) The following features cannot be null`. Pass it URL-encoded as the `features` param.
### Where things live
- Output CSV: `~/Downloads/utilities/sdand_following.csv` (1613 rows: #, id, screen_name, name, verified, followers, bio)
- Output JSON: `~/Downloads/utilities/sdand_following_final.json` (double-encoded JSON string; parse with `json.loads(json.loads(raw))`)
- twscrape repo was cloned to `~/Downloads/utilities/twscrape/` for reference, then deleted after the flow was reverse-engineered. Re-clone from https://github.com/vladkens/twscrape.git if needed.
## Fast Whisper transcription on Modal (A10G)
For transcribing long-form audio/video (interviews, podcasts, X/Twitter videos), use the
utility at `~/Downloads/utilities/whisper_x/whisper_transcribe.py`. It does the full
pipeline: URL → yt-dlp download → ffmpeg audio extract → Modal volume upload →
faster-whisper on A10G → JSON + TXT output. Validated at **2.3 min wall clock for 65 min
of audio** (no caching at any layer).
### Usage
Shell alias (defined in `~/.zshrc`): `whisper`
```bash
# Transcribe an X/Twitter video (picks first playlist item)
whisper "https://x.com/.../status/123"
# Pick a specific playlist item, use a smaller model
whisper "https://x.com/..." --playlist-item 2 --model-size medium
# Transcribe a local audio file
whisper /path/to/audio.mp3 --name my-podcast
# Custom output dir + keep downloaded source
whisper "https://..." --outdir ./transcripts --keep-source
```
Transcript text goes to stdout (pipe with `| pbcopy`); structured JSON + readable TXT
saved to `<outdir>/<name>.json` and `<outdir>/<name>.txt`.
### Key optimizations (vs naive T4 run that took 11.7 min)
- **A10G GPU** (~8x fp16 throughput vs T4; Modal ~$0.60/hr vs ~$0.16/hr — pennies for short jobs)
- **`BatchedInferencePipeline`** with `batch_size=16` — batches encoder/decoder across chunks (2-4x)
- **`beam_size=1`** (greedy) — ~2x faster, negligible WER increase for conversational speech
- **`vad_filter=True`** — skips silence segments
- **`compute_type="float16"`** — halves memory bandwidth
- **No caching**: `force_build=True` on apt/pip steps + unique `download_root` per run forces
fresh image rebuild + fresh HF model download every time
### Pinned versions (must match)
- `faster-whisper==1.1.1` (provides `BatchedInferencePipeline`)
- `ctranslate2==4.8.0`
- Base image: `nvidia/cuda:12.6.3-cudnn-runtime-ubuntu22.04` (provides `libcublas.so.12`;
`debian_slim` fails with `RuntimeError: Library libcublas.so.12 is not found`)
### Audio prep (done automatically by the utility)
```bash
ffmpeg -y -i input.mp4 -vn -ac 1 -ar 16000 -c:a aac -b:a 64k audio.m4a
```
Mono 16kHz 64kbps AAC — a 65-min video (151 MB stream) becomes ~35 MB audio.
### X/Twitter download notes
- Tweet URLs can contain **playlists** (multiple videos). Use `--playlist-item N` to pick one.
- Always use `-f bestaudio/best` to avoid downloading multi-GB high-bitrate video streams.
- A 65-min interview's video variant can be 2.8+ GB; audio-only is ~63 MB (128 kbps).
### Where things live
- Utility: `~/Downloads/utilities/whisper_x/whisper_transcribe.py`
- Strategy doc: `~/Downloads/utilities/whisper_x/STRATEGY.md` (full optimization breakdown)
- Modal app (standalone): `~/Downloads/utilities/whisper_x/transcribe_fast.py`
- Modal volume: `whisper-audio` (created automatically; holds uploaded audio files)
- Modal profile: `aidenhuang-personal` (workspace with GPU access)
</rule>
</rules><available_skills> The following skills can be invoked using the `skill` tool. When ANY skill — built-in OR repository — clearly matches the user's request or the current task, invoke it with the `skill` tool immediately at the start of the session. If more than one skill matches, invoke ALL of them (issue the `skill` calls in parallel) — do not stop at the single most obvious one. - **sandbox-sdk**: Build sandboxed applications for secure code execution. Load when building AI code execution, code interpreters, CI/CD systems, interactive dev environments, or executing untrusted code. Covers Sandbox SDK lifecycle, commands, files, code interpreter, and preview URLs. Biases towards retrieval from Cloudflare docs over pre-trained knowledge. (source: /Users/root1/.agents/skills/sandbox-sdk/SKILL.md) - **wrangler**: Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge. (source: /Users/root1/.agents/skills/wrangler/SKILL.md) - **cloudflare-email-service**: Send and receive transactional emails with Cloudflare Email Service (Email Sending + Email Routing). Use when building email sending (Workers binding or REST API), email routing, Agents SDK email handling, or integrating email into any app — Workers, Node.js, Python, Go, etc. Also use for email deliverability, SPF/DKIM/DMARC, wrangler email setup, MCP email tools, or when a coding agent needs to send emails. Even for simple requests like "add email to my Worker" — this skill has critical config details. (source: /Users/root1/.agents/skills/cloudflare-email-service/SKILL.md) - **find-skills**: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill. (source: /Users/root1/.agents/skills/find-skills/SKILL.md) - **agents-sdk**: Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge. (source: /Users/root1/.agents/skills/agents-sdk/SKILL.md) - **workers-best-practices**: Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge. (source: /Users/root1/.agents/skills/workers-best-practices/SKILL.md) - **web-perf**: Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (LCP, INP, CLS) and supplementary metrics (FCP, TBT, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge. (source: /Users/root1/.agents/skills/web-perf/SKILL.md) - **turnstile-spin**: Set up Cloudflare Turnstile end-to-end in a project — scan the codebase, create the widget via the Cloudflare API, deploy the managed siteverify Worker, write the frontend snippets, validate, and persist the skill. Load this when a user asks to add Turnstile, set up CAPTCHA, protect a form from bots, or fix a Turnstile integration. Mirrors developers.cloudflare.com/turnstile/spin. (source: /Users/root1/.agents/skills/turnstile-spin/SKILL.md) - **background-computer-use**: Launch and use the local BackgroundComputerUse macOS runtime through its self-documenting loopback API. Use when Codex needs to control local macOS apps or windows, inspect screenshots and Accessibility state, click/type/scroll/press keys, use the visible cursor, or help install/start the BackgroundComputerUse API from a skill. (source: /Users/root1/.devin/skills/background-computer-use/SKILL.md) - **durable-objects**: Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge. (source: /Users/root1/.agents/skills/durable-objects/SKILL.md) - **cloudflare**: Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task. Biases towards retrieval from Cloudflare docs over pre-trained knowledge. (source: /Users/root1/.agents/skills/cloudflare/SKILL.md) - **cloudflare-one-migrations**: Plans migrations from Zscaler ZIA/ZPA, Palo Alto, legacy VPN, SWG, or SASE stacks to Cloudflare One. Use for migration assessments, policy mapping, rollout plans, and parity/gap analysis. (source: /Users/root1/.agents/skills/cloudflare-one-migrations/SKILL.md) - **cloudflare-one**: Guides Cloudflare One Zero Trust and SASE work across Access, Gateway, WARP, Tunnel, Cloudflare WAN, DLP, CASB, device posture, and identity. Use when designing, configuring, troubleshooting, or reviewing Cloudflare One deployments. Retrieval-first: use current Cloudflare docs/API schemas instead of embedded product docs. (source: /Users/root1/.agents/skills/cloudflare-one/SKILL.md) - **devin-cli**: Look up Devin CLI documentation (skills, extensibility, configuration, commands, models, troubleshooting) (source: /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs) - **declarative-repo-setup**: Generate and verify a working environment.yaml (Devin snapshot-setup blueprint) for a repo (source: builtin:drs) </available_skills>
Let (G) be a two-player Stackelberg game with leader (L) and follower (F).
[ x\in[0,1],\qquad a\in[0,1],\qquad e\ge 0 ]
where (L) chooses ((x,a)) first and (F) chooses (e) after observing ((x,a)).
Define
[ K(x)=\rho x, \qquad R(x)=1-\rho x, \qquad \rho\in(0,1]. ]
Let the follower’s payoff be
a e\left[\sigma R(x)+\kappa K(x)\right] -\frac{c_F}{2}e^2, ]
and the leader’s payoff be
\alpha K(x) + a e\left[\beta R(x)+\gamma K(x)\right] -\frac{c_L}{2}x^2 -\frac{c_A}{2}a^2. ]
All parameters are nonnegative, with
[ c_F,c_L,c_A>0. ]
First derive the follower’s best response
\arg\max_{e\ge0}u_F(x,a,e). ]
Then solve
\arg\max_{(x,a)\in[0,1]^2} u_L\left(x,a,e^*(x,a)\right). ]
Characterize the subgame-perfect equilibrium
[ (x^,a^,e^*). ]
Derive the sign of
[ \frac{\partial e^*}{\partial x} ]
and identify the parameter regions satisfying
[ \frac{\partial e^}{\partial x}<0, \qquad \frac{\partial e^}{\partial x}=0, \qquad \frac{\partial e^*}{\partial x}>0. ]
Find the conditions under which
[ e^*=0, ]
the conditions under which (e^>0) but decreases as (x) increases, and the conditions under which (e^) increases as (x) increases.
Analyze the limiting cases
[ \rho\to0,\qquad \rho\to1,\qquad c_F\to0,\qquad c_F\to\infty, ]
and derive the comparative statics of
[ x^,\quad a^,\quad e^* ]
with respect to
[ \rho,\sigma,\kappa,\beta,\gamma,c_F,c_L,c_A. ]
Interpret the three regimes mathematically as:
[ \kappa<\sigma, \qquad \kappa=\sigma, \qquad \kappa>\sigma. ]
I'm working through the follower's utility function and their best response to effort. The key is establishing that the marginal benefit function M(x) stays non-negative across the feasible range, which ensures the follower always has a well-defined optimal effort level. Now I'm analyzing the leader's optimization problem. The leader chooses both the allocation x and their own effort a to maximize utility, which depends on the follower's best response effort through a product term. The leader's objective is quadratic in their effort a, so I need to check whether this is convex or concave to determine if an interior solution exists. The key insight is that since effort only enters through a squared term with no linear component, the leader faces a bang-bang choice: either a* = 1 or a* = 0, depending on whether the benefit from effort exceeds its cost. This bang-bang structure arises because the leader's benefit from effort is proportional to a times the follower's effort, which itself scales with a, creating an a² dependence. Given this, I'm now solving the leader's problem separately for each case. When a = 0, the problem simplifies to a standard allocation choice. When a = 1, the leader maximizes over x while accounting for how the follower's effort responds, which involves the quadratic function Φ(x) that captures the interaction between the parameters. The overall equilibrium is determined by comparing the maximum payoffs across both cases—the leader chooses whichever (x, a) pair gives the highest utility. I'm also working through the comparative statics for the interior solution when a = 1, expressing the optimal x in terms of the underlying parameters like α, σ, γ, β, κ, and the cost parameters. For each parameter, I'm checking how it shifts x* and the effort level e*. The effects are often ambiguous because changes propagate through both the numerator and denominator of the first-order condition. For instance, increasing ρ has competing effects—it scales the numerator but also changes the denominator depending on whether B is positive. Similarly, σ and β have mixed effects through their influence on A and B. When κ > σ or γ > β, the comparative statics become clearer. The cost parameters c_F and c_L have more straightforward effects: higher c_F reduces effort and makes the leader less likely to invest in auditing, while higher c_L decreases the optimal effort level directly. Looking at the boundary cases, when ρ approaches zero the game essentially decouples since the leader's payoff no longer depends on x, leaving only the auditing decision. As ρ approaches one, the resource transfer becomes complete and M interpolates between σ and κ. When c_F shrinks toward zero, effort explodes and the leader maximizes Φ(x) as the dominant term. Conversely, as c_F grows large, effort vanishes and the leader's interaction term disappears, pushing x* toward its lower bound and making auditing prohibitively expensive. The regime where κ < σ is particularly interesting because effort productivity declines in x, so the leader faces a tradeoff between the direct benefit of higher x and the dampening effect on follower effort. When κ equals σ, the effort level becomes independent of x, which simplifies the problem structure. When κ > σ, we get complementarity where higher x actually boosts effort, and if γ > β as well, convexity can push the optimal choice to the corner x* = 1. Effort equals zero precisely when either auditing is shut down or the effort multiplier M(x*) hits zero, which requires σ = 0 and either κ = 0 or x* = 0. For the comparative statics, I can express e* = a*M(x*)/c_F and compute how it responds to parameter changes, tracking which effects are determinate across different scenarios. Now I'm working through the second-order conditions and the joint optimization structure. The leader's objective with a = 1 is strictly concave when B ≤ 0, giving an interior solution, but when B > 0 and large enough relative to c_L c_F, the problem becomes convex and we get corner solutions at x* ∈ {0,1}. The interior formula involves the denominator D = c_L c_F − 2ρ²B and numerator P = ρ(αc_F + A), and I need to lay out the comparative statics signs for how x* and e* respond to changes in the parameters. Now I'm working through the partial derivatives with respect to the other parameters. For κ and γ, the sign of the derivative depends on whether certain inequality conditions hold—specifically whether γ ≥ β and κ ≥ σ respectively. The derivatives with respect to σ and β turn out to be ambiguous in sign, depending on the relative magnitudes of the parameters involved. I'm also noting that the derivative with respect to c_A is zero when a* is constrained to equal 1. For the equilibrium effort e*, I'm finding that it decreases in c_F through both direct and indirect channels, though the general sign is ambiguous except in special cases like κ = σ. The parameter κ increases e* when κ ≥ σ and γ ≥ β hold simultaneously. For the adoption threshold a*, I'm establishing that it's determined by comparing V₁ and V₀, which means a* decreases weakly in the cost parameters c_A and c_F but increases weakly in the benefit-related parameters σ, β, κ, and γ. I'm verifying this by showing that the product Φ = M·N is monotonically nondecreasing in each of these parameters, which ensures V₁ is nondecreasing and thus a* responds positively to them. Now I'm interpreting the three regime cases: when κ < σ the follower's effort is crowded out by the leader's instrument, creating a trade-off between direct gains and indirect losses through reduced motivation; when κ = σ there's neutrality where the follower's marginal return doesn't depend on the leader's choice, though the leader still influences outcomes through the follower's participation decision; and when κ > σ with γ > β the instruments become complements, potentially driving the leader toward corner solutions. I'm ready to synthesize this into a complete structured answer using plain mathematical notation.
Define the follower's marginal-return coefficient and the leader's return coefficient:
M(x) = σR(x) + κK(x) = σ + ρx(κ − σ) (follower's productivity of effort)
N(x) = βR(x) + γK(x) = β + ρx(γ − β) (leader's return per unit of a·e)
Since σ, κ ≥ 0, ρ ∈ (0,1], x ∈ [0,1], we have M(x) = σ(1−ρx) + κρx ≥ 0 always (a convex combination-like weighting of σ and κ). Same for N(x).
u_F(x,a,e) = a e M(x) − (c_F/2)e² is strictly concave in e. FOC: a M(x) − c_F e = 0, and the constraint e ≥ 0 binds only when a M(x) = 0. Hence
e*(x,a) = a M(x) / c_F = a [σ + ρx(κ − σ)] / c_F ≥ 0.
∂e*/∂x = a ρ (κ − σ) / c_F
For a > 0 (otherwise e* ≡ 0 and the derivative is 0):
| Region | Sign |
|---|---|
| κ < σ | ∂e*/∂x < 0 (x crowds out effort) |
| κ = σ (or a = 0) | ∂e*/∂x = 0 (neutrality) |
| κ > σ | ∂e*/∂x > 0 (x complements effort) |
e* = 0 ⇔ a M(x) = 0 ⇔ a = 0, or M(x) = 0. With nonnegative parameters, M(x) = 0 requires σ = 0 and κρx = 0, i.e. σ = 0 together with (κ = 0 or x = 0). Generically (σ > 0), e* = 0 in equilibrium iff the leader chooses a* = 0 (see §3).
Substituting e*(x,a):
u_L(x, a, e*(x,a)) = αρx + (a²/c_F) Φ(x) − (c_L/2)x² − (c_A/2)a²,
where
Φ(x) ≡ M(x)N(x) = [σ + ρx(κ−σ)][β + ρx(γ−β)]
= σβ + ρA x + ρ²B x²,
A ≡ σ(γ−β) + β(κ−σ) = σγ + βκ − 2σβ,
B ≡ (κ−σ)(γ−β).
The a-terms are a² [Φ(x)/c_F − c_A/2] — purely quadratic, no linear term (because e* is itself proportional to a). Hence for fixed x:
a*(x) = 1 if 2Φ(x) > c_A c_F
a*(x) = 0 if 2Φ(x) < c_A c_F (indifferent at equality)
The equilibrium is found by comparing the two candidate values:
V₀ = max_x [ αρx − (c_L/2)x² ] (a = 0 branch)
V₁ = max_x [ αρx + Φ(x)/c_F − (c_L/2)x² ] − c_A/2 (a = 1 branch)
a* = 1 iff V₁ ≥ V₀; intuitively iff Φ (leader's return × follower's productivity) is large relative to c_A c_F.
Branch a = 0: x* = min(αρ/c_L, 1), the pure direct-benefit optimum. Interior value V₀ = α²ρ²/(2c_L).
Branch a = 1: g(x) = αρx + Φ(x)/c_F − (c_L/2)x², with
g'(x) = αρ + ρ(A + 2ρB x)/c_F − c_L x,
g''(x) = 2ρ²B/c_F − c_L.
x* = ρ (α c_F + A) / D = ρ [α c_F + σγ + βκ − 2σβ] / [c_L c_F − 2ρ²(κ−σ)(γ−β)]
clipped to [0,1]; x* = 0 if αc_F + A ≤ 0, x* = 1 if g'(1) ≥ 0.
(x*, a*) as above (compare V₀, V₁); e* = a* M(x*) / c_F.
ρ → 0: K → 0, R → 1. M → σ, N → β, Φ → σβ, and x has no upside (αρx → 0), so x* → 0; a* = 1 iff 2σβ > c_A c_F; e* → a*σ/c_F. The game decouples from x entirely.
ρ → 1: K(x) = x, R(x) = 1−x — full reallocation. M(x) = σ + x(κ−σ) interpolates exactly between σ (x=0) and κ (x=1); the crowding-out/complementarity tension is maximal, and the convexity condition D < 0 is easiest to satisfy (B enters as 2B vs 2ρ²B).
c_F → 0: e* = aM(x)/c_F → ∞ whenever aM(x) > 0. The term Φ(x)/c_F dominates u_L, so a* = 1 and x* → argmax_{[0,1]} Φ(x); the leader's payoff diverges to +∞ (effort is free to elicit).
c_F → ∞: e* → 0; the interaction term vanishes, V₁ → V₀ − c_A/2 < V₀, so a* = 0, x* → min(αρ/c_L, 1), e* = 0. The game collapses to the leader's stand-alone problem.
Recall A = σγ + βκ − 2σβ, B = (κ−σ)(γ−β), e* = [σ + ρx*(κ−σ)]/c_F.
| θ | ∂x*/∂θ | ∂a*/∂θ (regime margin) | ∂e*/∂θ |
|---|---|---|---|
| ρ | sign of (αc_F+A)(c_Lc_F + 2ρ²B); > 0 if B ≥ 0 | ↑ if Φ↑ | sign of (κ−σ)·∂(ρx*)/∂ρ |
| σ | [ρ(γ−2β)D − 2ρ²(γ−β)P]/D² — ambiguous | weakly ↑ (Φ↑) | direct + (1−ρx*)/c_F > 0; total ambiguous if κ≠σ |
| κ | [ρβD + 2ρ²(γ−β)P]/D²; > 0 if γ ≥ β | weakly ↑ | ρx*/c_F + ρ(κ−σ)x*_κ /c_F; > 0 if κ ≥ σ, γ ≥ β |
| β | [ρ(κ−2σ)D − 2ρ²(κ−σ)P]/D² — ambiguous | weakly ↑ | via x* only: sign = sign[(κ−σ)·x*_β] |
| γ | [ρσD + 2ρ²(κ−σ)P]/D²; > 0 if κ ≥ σ | weakly ↑ | via x* only: sign = sign[(κ−σ)·x*_γ]; > 0 if κ > σ |
| c_F | −ρ(2ρ²αB + c_LA)/D²; < 0 if A,B ≥ 0 | weakly ↓ | < 0 dominantly (e* ∝ 1/c_F; exactly −σ/c_F² when κ=σ) |
| c_L | −c_F P/D² < 0 | ≈ 0 / weakly ↑ via V₀↓ | sign = −sign(κ−σ)·(x* effect) |
| c_A | 0 (conditional on a*=1) | ↓ (switches a* to 0 when c_A > 2V₁'/…, i.e. large) | 0 until regime switch, then drops to 0 |
Also: ∂x*/∂α = ρc_F/D > 0 in both branches.
Key monotone facts:
κ < σ (substitution / crowding-out). M′(x) = ρ(κ−σ) < 0: every unit of x converts high-powered base R into low-powered K from the follower's perspective, so e* falls in x. The leader's marginal calculus is αρ + ρ(A + 2ρBx)/c_F = c_L x; the indirect term can be negative (A < 0 when βκ + σγ < 2σβ), pushing x* below the stand-alone level αρ/c_L: the leader restrains x to preserve follower incentives. g is concave whenever γ ≥ β (B ≤ 0), so the solution is interior and unique.
κ = σ (neutrality). M(x) ≡ σ: the follower's incentive is invariant to x, ∂e*/∂x = 0, B = 0, and the problem separates: e* = a*σ/c_F and x* = ρ(αc_F + σ(γ−β))/(c_L c_F) — x is still tilted by the leader's own return asymmetry (γ vs β), but has no incentive spillover.
κ > σ (complementarity). M′(x) > 0: x raises follower effort, so x* exceeds the stand-alone level whenever N > 0 (A > 0 when βκ + σγ > 2σβ). If additionally γ > β, then B > 0 and Φ is convex in x; once 2ρ²(κ−σ)(γ−β) > c_L c_F the leader's problem is convex and the equilibrium is bang-bang in x (x* ∈ {0,1}), typically x* = 1: leader and follower returns reinforce each other, so the leader goes all-in on x, sets a* = 1 (if 2Φ(1) > c_A c_F net of costs), and effort e* = κ/c_F (at ρ = 1) is maximal.
is there a way nto see how much a session cost?
The user is asking about how to see how much a session cost. This seems to be about Devin CLI usage/costs. I should check the devin-cli skill to see if there's documentation about session costs or billing information.
{
"command": "invoke",
"skill": "devin-cli"
}The "devin-cli" skill is running <skill name="devin-cli" status="running"> Source: /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs Base directory: /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin Auto-approved tools (no permission prompt needed): read, grep, glob Other tools can still be used but will require user permission. Documentation for Devin CLI is available on disk at: /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs This directory contains `.mdx` files covering installation, commands, models, shell integration, troubleshooting, and enterprise configuration. Use the read, grep, and glob tools to search within that directory for information relevant to the user's question. The tools are auto-approved for this path while this skill is active. </skill>
The user is asking about session costs. Let me search the Devin CLI documentation for information about costs, billing, or session pricing.
{
"pattern": "cost|billing|price|session",
"path": "/Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs",
"case_insensitive": true,
"output_mode": "files_with_matches"
}Found 28 file(s) with matches for pattern 'cost|billing|price|session' in /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs: /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/reference/commands.mdx (28 matches at lines: 13, 23, 25, 26, 38, 39, 62, 165, 169, 170, 171, 218, 226, 240, 256, 262, 276, 280, 281, 282, 285, 286, 287, 288, 325, 328, 332, 333) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/shell-integration.mdx (1 matches at lines: 11) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/index.mdx (1 matches at lines: 11) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/handoff.mdx (7 matches at lines: 3, 7, 13, 16, 31, 33, 34) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/skills/creating-skills.mdx (3 matches at lines: 88, 100, 316) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/skills/overview.mdx (2 matches at lines: 75, 88) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/rules.mdx (7 matches at lines: 3, 7, 11, 56, 112, 149, 201) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/hooks/overview.mdx (5 matches at lines: 3, 67, 68, 151, 152) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/reference/permissions.mdx (8 matches at lines: 22, 38, 41, 268, 273, 284, 286, 298) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/models.mdx (4 matches at lines: 7, 32, 46, 82) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/plugins/overview.mdx (4 matches at lines: 78, 167, 184, 189) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/hooks/lifecycle-hooks.mdx (12 matches at lines: 231, 233, 239, 245, 260, 265, 266, 273, 275, 281, 314, 344) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/enterprise/team-settings.mdx (7 matches at lines: 31, 35, 101, 108, 115, 123, 124) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/essential-commands.mdx (18 matches at lines: 9, 98, 119, 127, 129, 132, 135, 137, 144, 163, 175, 179, 180, 181, 182, 183, 184, 185) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/reference/configuration/config-file.mdx (3 matches at lines: 132, 236, 319) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/subagents.mdx (10 matches at lines: 7, 13, 23, 35, 37, 39, 41, 51, 83, 155) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/mcp/configuration.mdx (1 matches at lines: 186) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/changelog/next.mdx (1 matches at lines: 27) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/extensibility/configuration.mdx (1 matches at lines: 139) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/acp/jetbrains.mdx (1 matches at lines: 78) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/enterprise/devin-auth.mdx (6 matches at lines: 11, 13, 16, 62, 66, 68) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/enterprise/windsurf-auth.mdx (8 matches at lines: 7, 12, 14, 17, 53, 57, 59, 63) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/adaptive.mdx (2 matches at lines: 11, 22) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/index.mdx (1 matches at lines: 64) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/troubleshooting.mdx (3 matches at lines: 58, 88, 212) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/reference/configuration/global-vs-local.mdx (1 matches at lines: 18) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/changelog/stable.mdx (62 matches at lines: 17, 75, 81, 82, 88, 89, 120, 123, 129, 137, 140, 159, 165, 191, 197, 199, 200, 218, 230, 235, 248, 256, 270, 281, 283, 298, 306, 307, 311, 317, 319, 320, 333, 340, 351, 397, 402, 411, 414, 420, 440, 442, 459, 461, 468, 469, 470, 471, 472, 474, 476, 485, 486, 501, 519, 543, 544, 556, 569, 578, 603, 626) /Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/reference/configuration/read-config-from.mdx (2 matches at lines: 13, 38)
Let me check the commands reference and essential commands to see if there's information about viewing session costs.
{
"file_path": "/Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/essential-commands.mdx"
}<file-view path="/Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/essential-commands.mdx" start_line="1" end_line="237" total_lines="237"> 1|--- 2|title: "Essential Commands" 3|description: "If you remember nothing else..." 4|icon: "terminal" 5|--- 6| 7|## Starting Devin CLI 8| 9|By default, sessions happen in a REPL, a graphical terminal interface where you can chat back and forth and observe Devin's actions. 10| 11|```bash 12|devin # Start interactive REPL (no prompt) 13|devin -- your prompt here # Start REPL with initial prompt 14|devin -p "prompt" # Single-turn, no REPL: print response to stdout and exit 15|devin -p -- prompt words here # Same, using -- separator (still works) 16|``` 17| 18|<Note> 19| Use `--` before your prompt so it is interpreted as a prompt and not a subcommand. 20|</Note> 21| 22|<Tip> 23| Single-turn mode (`-p`) is great for scripts and automations. 24|</Tip> 25| 26|<Note> 27| Type `@` in the prompt input to open autocomplete for local files/directories. Selecting one adds it as context for your message. 28|</Note> 29| 30|<Tip> 31| You can paste images from your clipboard with **Ctrl\+V**. Attached images appear in the input area and can be managed with **Left/Right** to navigate and **Backspace** to remove. 32|</Tip> 33| 34|## Running shell commands 35| 36|Devin may run shell commands while working. If a command is still running after the default wait period, Devin moves it to the background and shows how long it waited along with the background shell ID. Devin can then continue working and check the command's output later. 37| 38|--- 39| 40|## Modes 41| 42|Devin CLI has 4 built-in permission modes: **Normal**, **Accept Edits**, **Bypass**, and **Autonomous**, and 3 agent-modes: **Normal**, **Plan**, and **Ask**. For plan and ask, use `/plan` and `/ask`. 43| 44|<AccordionGroup> 45| <Accordion title="Normal" defaultOpen icon="robot"> 46| Auto-approves read-only tools within the current directory, and asks for permission for write/execute operations. 47| 48| ```bash 49| /normal 50| # or 51| /mode normal 52| ``` 53| 54| This is the default mode. 55| </Accordion> 56| 57| <Accordion title="Accept Edits" icon="check"> 58| Auto-approves file edits within the workspace while still prompting for shell commands and other actions. We expect people to spend most of their time here. 59| 60| ```bash 61| /accept-edits 62| # or 63| /mode accept-edits 64| ``` 65| </Accordion> 66| 67| <Accordion title="Bypass" icon="bolt"> 68| <Warning> 69| Auto-approves **all** tool calls, including writes and shell commands. 70| </Warning> 71| 72| ```bash 73| /bypass 74| # or 75| /mode bypass 76| ``` 77| 78| You can also start in bypass mode: 79| 80| ```bash 81| devin --permission-mode bypass 82| ``` 83| 84| Aliases: `/yolo`, `/dangerous` 85| 86| <Note> 87| Bypass mode **never** overrides organization-level permissions configured by your admin via [Team Settings](/cli/enterprise/team-settings). Admin-enforced deny and ask rules **always** take priority. 88| </Note> 89| </Accordion> 90| 91| <Accordion title="Autonomous" icon="robot"> 92| Roughly equivalent to Accept Edits in the current workspace, with the additional ability to run any shell command within an [OS-level sandbox](/cli/reference/configuration/config-file#sandbox) (to contain what those commands can actually touch). 93| 94| ```bash 95| devin --sandbox --permission-mode autonomous 96| ``` 97| 98| Autonomous is the **only** permission mode available when running with `--sandbox`, and it is selected automatically — Normal, Accept Edits, and Bypass are hidden in sandbox sessions. 99| 100| In Autonomous mode... 101| 102| - You are prompted for **capabilities rather than commands**. 103| - Commands respect the `Write` and `Read` scopes via a filesystem sandbox. 104| - Commands prompt you when they try to connect to network resources. 105| - Read-only operations within the current directory auto-approve. 106| 107| <Note> 108| Autonomous relies on the sandbox for safety. Without `--sandbox`, the mode is unavailable — use Bypass if you want unattended execution without OS-level isolation. See [Bypass vs Autonomous](#bypass-vs-autonomous) below for a direct comparison. 109| </Note> 110| </Accordion> 111|</AccordionGroup> 112| 113|### Bypass vs Autonomous 114| 115|Bypass and Autonomous both reduce approval prompts, but they rely on different safety mechanisms: 116| 117|| | Bypass | Autonomous | 118|| --- | --- | --- | 119|| Requires `--sandbox` | No | Yes (only available in sandbox sessions) | 120|| Shell commands | Auto-approved, unrestricted | Auto-approved, contained by the sandbox | 121|| File writes via `edit`/`write` tools | Auto-approved anywhere | Still prompt (granting a scope expands the sandbox) | 122|| Network access | Unrestricted | Filtered by the sandbox's [domain allow/deny lists](/cli/reference/configuration/config-file#sandbox) | 123|| Respects admin [Team Settings](/cli/enterprise/team-settings) | Yes | Yes | 124| 125|Pick Bypass when you trust the agent with your whole machine. Pick `--sandbox` (which selects Autonomous) when you want unattended execution with OS-enforced limits on what files and domains the agent can touch. If you like the feel of bypass but want the agent to have its own computer, try cloud Devin! 126| 127|## Session History 128| 129|Your conversation history is saved so you can resume a session later. 130| 131|```bash 132|devin -c # Continue the most recent session in the current directory 133|devin --continue 134| 135|devin -r # Pick from recent sessions 136|devin --resume 137|devin -r brisk-otter # Resume a specific session by ID 138|``` 139| 140|--- 141| 142|## Slash Commands 143| 144|You can use these commands while in an active session. 145| 146|### Navigation & Control 147| 148|| Command | Description | 149|| --- | --- | 150|| `/help` | See all available commands | 151|| `/exit` or `/quit` | Exit the application | 152|| `/clear` or `/new` | Clear conversation history (start fresh) | 153| 154|<Tip> 155| You can also type `exit` or `quit` as plain text (without the `/` prefix) to exit. 156|</Tip> 157| 158|### Mode Switching 159| 160|| Command | Description | 161|| --- | --- | 162|| `/mode` | Show current mode | 163|| `/mode <name>` | Switch mode (`normal`, `accept-edits`, `plan`, `bypass`; `autonomous` in sandbox sessions) | 164|| `/normal` | Switch to Normal mode (default) | 165|| `/plan` | Switch to Plan mode | 166|| `/ask <question>` | Ask a question without making code changes (oneshot) | 167|| `/bypass` | Switch to Bypass mode (aliases: `/yolo`, `/dangerous`) | 168| 169|### Model Switching 170| 171|| Command | Description | 172|| --- | --- | 173|| `/model` | Show model selector | 174| 175|### Session Management 176| 177|| Command | Description | 178|| --- | --- | 179|| `/resume` | Open the interactive session picker | 180|| `/resume <id>` | Resume session by ID | 181|| `/ls` | List recent sessions in current directory (alias: `/list-sessions`) | 182|| `/ls --all` | List all sessions across all directories | 183|| `/continue` | Resume most recent session | 184|| `/continue <id>` | Resume session by ID | 185|| `/rm-session <id>` | Irreversibly delete a session by ID | 186| 187|### Workspace 188| 189|| Command | Description | 190|| --- | --- | 191|| `/workspace` | List workspace directories (alias: `/workspaces`) | 192|| `/add-dir <path>` | Add additional workspace directory | 193|| `/undo-add-dir <path>` | Remove a workspace directory | 194| 195|### Automation 196| 197|| Command | Description | 198|| --- | --- | 199|| `/loop <prompt>` | Run a prompt then auto-review the diff in a loop (requires clean git state to start) | 200| 201|### Extensibility 202| 203|| Command | Description | 204|| --- | --- | 205|| `/hooks` | List all loaded hooks with their IDs, event types, and source paths | 206| 207|### Account & System 208| 209|| Command | Description | 210|| --- | --- | 211|| `/login` | Authenticate with Devin | 212|| `/logout` | Clear stored credentials and exit | 213|| `/update` | Check for and install updates | 214|| `/upgrade` | Upgrade your subscription plan | 215|| `/bug` | Report a bug to the Devin CLI developers | 216|| `/compact` | Force conversation compaction | 217| 218|<Note> 219| If you installed Devin for Terminal via Homebrew, `/update` will direct you to use `brew upgrade devin` instead of performing a self-update. 220|</Note> 221| 222|--- 223| 224|## Keyboard Shortcuts 225| 226|Here are the most important keyboard shortcuts. See [Keyboard Shortcuts](/cli/reference/keyboard-shortcuts) for more shortcuts. 227| 228|| Shortcut | Description | 229|| --- | --- | 230|| `Shift+Tab` | Cycle between modes (Normal, Accept Edits, Plan, Bypass, Autonomous) | 231|| `Ctrl+C` | Clear input text, or cancel the running agent | 232|| `Esc` | Cancel the running agent | 233|| `Shift+Enter` | Insert a newline (multi-line input) | 234|| `Ctrl+V` or `Shift+Insert` | Paste from clipboard | 235|| `Ctrl+G` | Open external editor | 236|| `Ctrl+O` | Open full-screen thinking trace viewer | 237|| `@` | Mention files to add as context | </file-view>
I don't see specific cost information in the essential commands. Let me check the commands reference file which had many matches for "cost".
{
"file_path": "/Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/reference/commands.mdx"
}<file-view path="/Users/root1/.local/share/devin/cli/_versions/3000.1.23/share/devin/docs/reference/commands.mdx" start_line="1" end_line="381" total_lines="381"> 1|--- 2|title: "Commands & Flags" 3|description: "Complete reference for command arguments, subcommands, and interactive slash commands" 4|icon: "terminal" 5|--- 6| 7|## Usage 8| 9|```bash 10|devin [OPTIONS] [prompt] 11|``` 12| 13|Pass an optional prompt to start a session with an initial message, or launch interactively with no arguments. 14| 15|You can also read these from your terminal with `man devin`. 16| 17|--- 18| 19|## Global Flags 20| 21|| Flag | Short | Description | 22|| --- | --- | --- | 23|| `--model <MODEL>` | | Set the AI model for this session | 24|| `--permission-mode <MODE>` | | Permission mode (`normal`, `dangerous`, `bypass`) | 25|| `--continue` | `-c` | Resume the most recent session in the current directory | 26|| `--resume <SESSION_ID>` | `-r` | Resume a specific session by ID | 27|| `--print [PROMPT]` | `-p` | Print response and exit (non-interactive mode). Optionally accepts an inline prompt. | 28|| `--prompt-file <FILE>` | | Load the initial prompt from a file | 29|| `--config <PATH>` | | Configuration file path | 30|| `--export [PATH]` | | Export conversation to a file after each turn (ATIF format). Uses a default path if none is provided. | 31|| `--respect-workspace-trust` | | Whether to respect workspace trust settings | 32| 33|**Examples:** 34| 35|```bash 36|devin -- add a login page 37|devin --model opus -- refactor the auth module 38|devin -c # Resume last session 39|devin -r abc12345 # Resume specific session 40|devin -p "list all TODO comments" # Print response and exit 41|devin -p -- list all TODO comments # Same, using -- separator (still works) 42|devin --export -- fix the tests # Export conversation to default path 43|devin --export out.json -- fix tests # Export to a specific file 44|``` 45| 46|--- 47| 48|## Subcommands 49| 50|### devin auth 51| 52|Authentication related commands. 53| 54|| Command | Description | 55|| --- | --- | 56|| `devin auth login` | Log in to your account | 57|| `devin auth logout` | Log out and remove stored credentials | 58|| `devin auth status` | Check authentication status | 59| 60|**Options for `devin auth login`:** 61| 62|- `--force-manual-token-flow` — Skip browser-based auth and manually paste a token (useful for remote/SSH sessions) 63| 64|### devin mcp 65| 66|Connect and log in to Model Context Protocol servers. 67| 68|| Command | Description | 69|| --- | --- | 70|| `devin mcp add <name>` | Add a new MCP server | 71|| `devin mcp list` | List all configured MCP servers | 72|| `devin mcp get <name>` | Show details for a specific MCP server | 73|| `devin mcp remove <name>` | Remove a configured MCP server | 74|| `devin mcp login <name>` | Authenticate with an MCP server via OAuth | 75|| `devin mcp logout <name>` | Remove stored OAuth credentials for an MCP server | 76|| `devin mcp enable <name>` | Enable a disabled MCP server | 77|| `devin mcp disable <name>` | Disable an MCP server without removing it | 78| 79|**Options for `devin mcp add`:** 80| 81|- `-t, --transport <stdio|http>` — Transport type (optional; inferred from URL → http, trailing args → stdio) 82|- `-s, --scope <local|project|user>` — Configuration scope (default: `local`) 83|- `--url <URL>` — URL for HTTP transport (can also be passed as a positional argument after the name) 84|- `--command <CMD>` — Command for stdio transport (optional when trailing args are provided) 85|- `-e, --env <KEY=VALUE>` — Environment variables (repeatable) 86|- `-H, --header <HEADER: VALUE>` — HTTP headers (repeatable) 87|- `--scopes <SCOPE,SCOPE>` — OAuth scopes to request (comma-separated) 88|- `<URL>` — Positional URL argument for HTTP (alternative to `--url`) 89|- `-- <COMMAND> [ARGS...]` — Command and arguments for stdio (first arg is the command when `--command` is omitted) 90| 91|<Note> 92| HTTP servers try Streamable HTTP first and fall back to legacy SSE on 4xx errors (per the [MCP spec](https://spec.modelcontextprotocol.io/specification/2025-03-26/basic/transports/#backwards-compatibility)). You can also set `"transport": "sse"` explicitly. See [MCP Configuration → Troubleshooting](/cli/extensibility/mcp/configuration#troubleshooting). 93|</Note> 94| 95|**Examples:** 96| 97|```bash 98|# stdio server 99|devin mcp add my-server -- npx @company/mcp-server --port 3000 100| 101|# HTTP server (positional URL) 102|devin mcp add notion https://mcp.notion.com/mcp 103|devin mcp add --transport http datadog-mcp https://mcp.datadoghq.com/api/unstable/mcp-server/mcp 104| 105|# HTTP server (--url flag, also works) 106|devin mcp add notion --url https://mcp.notion.com/mcp 107| 108|# With environment variables and scope 109|devin mcp add -e GITHUB_TOKEN=ghp_xxx github -- npx -y @modelcontextprotocol/server-github 110|devin mcp add -s project sentry https://mcp.sentry.dev/mcp 111|``` 112| 113|**Options for `devin mcp remove`:** 114| 115|- `-s, --scope <local|project|user>` — Configuration scope (default: `local`) 116| 117|**Options for `devin mcp login`:** 118| 119|- `--scopes <SCOPE,SCOPE>` — OAuth scopes to request (comma-separated) 120| 121|**Options for `devin mcp enable`:** 122| 123|- `-s, --scope <local|project|user>` — Configuration scope (default: `local`) 124| 125|**Options for `devin mcp disable`:** 126| 127|- `-s, --scope <local|project|user>` — Configuration scope (default: `local`) 128| 129|See [MCP Configuration](/cli/extensibility/mcp/configuration) for details. 130| 131|### devin rules 132| 133|Manage agent rules (always-on context blobs). 134| 135|| Command | Description | 136|| --- | --- | 137|| `devin rules list` | List all available rules | 138|| `devin rules show <name>` | Show details for a specific rule | 139|| `devin rules paths` | Show rule directory locations | 140| 141|**Options for `devin rules list`:** 142| 143|- `--provider <cursor\|windsurf>` — Filter by rule provider 144| 145|See [Rules](/cli/extensibility/rules) for details. 146| 147|### devin skills 148| 149|Manage agent skills (slash commands and agent-triggered context blobs). 150| 151|| Command | Description | 152|| --- | --- | 153|| `devin skills list` | List all available skills | 154|| `devin skills show <name>` | Show details for a specific skill | 155|| `devin skills paths` | Show skill directory locations | 156| 157|**Options for `devin skills list`:** 158| 159|- `--trigger <user\|model>` — Filter by trigger type 160| 161|See [Skills](/cli/extensibility/skills/overview) for details. 162| 163|### devin list 164| 165|List sessions in the current directory. Alias: `devin ls` 166| 167|| Command | Description | 168|| --- | --- | 169|| `devin list` | Interactive session picker (default) | 170|| `devin list --format json` | Output sessions as JSON | 171|| `devin list --format csv` | Output sessions as CSV | 172| 173|### devin version 174| 175|Print the current version and exit. 176| 177|```bash 178|devin version 179|``` 180| 181|This is equivalent to `devin --version`. 182| 183|### devin acp 184| 185|Run Devin as an [Agent Client Protocol (ACP)](https://agentclientprotocol.com/) server over stdio. This subcommand is intended to be invoked by an ACP-aware editor or IDE (such as Windsurf or Zed) as a subprocess — it speaks JSON-RPC over stdin/stdout and is not meant to be run interactively. 186| 187|```bash 188|devin acp 189|``` 190| 191|The ACP server reads credentials from `WINDSURF_API_KEY` if set, otherwise from the credentials stored by `devin auth login`. It can also accept credentials at runtime via the ACP `authenticate` request. 192| 193|### devin update 194| 195|Check for updates and optionally install them. 196| 197|```bash 198|devin update 199|``` 200| 201|Use `--force` to re-install even if already on the latest version: 202| 203|```bash 204|devin update --force 205|``` 206| 207|### devin shell 208| 209|[Feature Preview] Shell integration commands. See [Shell Integration](/cli/shell-integration) for full details. 210| 211|| Command | Description | 212|| --- | --- | 213|| `devin shell setup` | Install shell integration into your shell config file | 214|| `devin shell setup <shell>` | Install for a specific shell (`bash`, `zsh`, or `fish`) | 215| 216|### devin sandbox 217| 218|[Research Preview] Manage OS-level process sandboxing for the exec tool. Pass the global `--sandbox` flag to run a session with the sandbox enforced. 219| 220|#### devin sandbox setup 221| 222|Print the sandbox prerequisites for the current platform. 223| 224|Requirements to run with `--sandbox`: 225| 226|- **Linux**: requires bubblewrap (`bwrap`) and `socat`. A sandbox session fails to start with install instructions if either is missing — including in a fresh WSL distribution. 227|- **macOS**: works out of the box via Seatbelt; no extra packages needed. 228|- **Windows**: native Windows cannot run the sandbox. [Install WSL 2](https://learn.microsoft.com/windows/wsl/install) and run Devin inside your WSL distribution. 229| 230|```bash 231|devin sandbox setup 232|``` 233| 234|### devin setup 235| 236|Interactive setup wizard for authentication and MCP configuration. 237| 238|```bash 239|devin setup 240|devin setup --force-manual-token-flow # For remote/SSH sessions 241|``` 242| 243|### devin uninstall 244| 245|Uninstall Devin CLI and optionally remove all data. 246| 247|| Option | Description | 248|| --- | --- | 249|| `--clean` | Remove all data including configuration, history, and custom data | 250|| `--force` | Skip confirmation prompt | 251| 252|--- 253| 254|## Slash Commands 255| 256|These commands are available inside an interactive session. Type them at the prompt. 257| 258|### Mode & Model 259| 260|| Command | Description | 261|| --- | --- | 262|| `/mode [normal\|accept-edits\|plan\|bypass]` | Show or switch the current mode (`autonomous` is available in sandbox sessions) | 263|| `/normal` | Switch to Normal mode (default) | 264|| `/accept-edits` | Switch to Accept Edits mode (auto-approve file edits in workspace) | 265|| `/plan` | Switch to Plan mode (read-only planning) | 266|| `/ask <question>` | Ask a question without making code changes (oneshot) | 267|| `/bypass` | Switch to Bypass mode (auto-approve all actions) | 268|| `/model [name]` | Show or change the current model | 269|| `/fast` | Switch to SWE-1.6 Fast | 270|| `/theme [dark\|light\|terminal-dark\|terminal-light\|no-color]` | Switch between themes (dark, light, terminal dark, terminal light, no color) | 271| 272|<Note> 273| `/bypass` has aliases `/yolo` and `/dangerous`. All three do the same thing. 274|</Note> 275| 276|### Session Management 277| 278|| Command | Description | 279|| --- | --- | 280|| `/clear` | Clear conversation history and start a new session. Alias: `/new` | 281|| `/continue [session-id]` | Resume a previous session | 282|| `/fork [step]` | Fork the current session to a new session. Optionally fork from a specific step (see `/steps`). | 283|| `/steps` | List conversation steps (use with `/fork` and `/revert`) | 284|| `/revert <step>` | Revert file changes from a specific step onwards and rewind the conversation to before that step | 285|| `/resume [session-id]` | Open the interactive session picker, or resume a specific session by ID | 286|| `/ls [--all]` | List recent sessions (current directory only by default). Alias: `/list-sessions` | 287|| `/rename-session <new title>` | Rename the current session | 288|| `/rm-session <session-id>` | Irreversibly delete a session and all its data | 289|| `/export` | Show export info. Use the `--export` CLI flag to enable conversation export. | 290|| `/exit` | Exit the application (alias: `/quit`). You can also type `exit` or `quit` without the `/` prefix. | 291| 292|### Workspace 293| 294|| Command | Description | 295|| --- | --- | 296|| `/workspace` | List workspace directories (alias: `/workspaces`) | 297|| `/add-dir <path>` | Add an additional workspace directory | 298|| `/undo-add-dir <path>` | Remove a workspace directory | 299| 300|### Automation 301| 302|| Command | Description | 303|| --- | --- | 304|| `/loop <prompt>` | Run a prompt then auto-review the diff in a loop | 305|| `/btw <prompt>` | Ask a quick side question. Runs a sidechain using the current conversation context and prints the answer in a box, without adding the question to the main conversation. | 306| 307|### Extensibility 308| 309|| Command | Description | 310|| --- | --- | 311|| `/hooks` | List all loaded hooks with their IDs, event types, and source paths | 312| 313|### Utilities 314| 315|| Command | Description | 316|| --- | --- | 317|| `/help` | Show available slash commands | 318|| `/shortcuts` | Browse keyboard shortcuts in an interactive, searchable list grouped by category | 319|| `/bug [description]` | Report a bug to the Devin CLI developers | 320|| `/update [--force]` | Check for and install updates. Pass `--force` to re-install even when already on the latest version. | 321|| `/upgrade` | Upgrade your subscription plan | 322|| `/login` | Authenticate with your account | 323|| `/logout` | Clear stored credentials and exit | 324|| `/context` | Show context window usage | 325|| `/usage` | Show estimated credit/ACU usage for the session, including usage from previous openings of a resumed session | 326|| `/compact` | Force conversation compaction | 327| 328|### Cloud Sessions (insiders only) 329| 330|| Command | Description | 331|| --- | --- | 332|| `/cloud-sessions [--all]` | Open an interactive picker of your recent cloud Devin sessions. Use arrow keys to navigate, type to filter, Enter to attach, Esc to cancel. Pass `--all` for org-wide sessions. | 333|| `/cloud-attach <session-id>` | Attach to a cloud Devin session with full TUI rendering and bidirectional input. | 334| 335|--- 336| 337|## Modes 338| 339|Modes control the agent's autonomy level by combining a permission mode with an agent profile. 340| 341|<Tabs> 342| <Tab title="Normal (default)"> 343| Full autonomy for complex coding tasks. The agent can read, write, and execute commands with normal permission checks. 344| 345| - **Permission mode:** Normal 346| - **Profile:** Normal 347| - **Use for:** Multi-file refactoring, feature implementation, bug fixes 348| </Tab> 349| <Tab title="Plan"> 350| Planning only — the agent proposes changes without making them. Read-only tool access ensures no code is modified. 351| 352| - **Permission mode:** Normal 353| - **Profile:** Plan (read-only tools) 354| - **Use for:** Architecture design, understanding codebases, planning before implementation 355| </Tab> 356| <Tab title="Bypass"> 357| All permission prompts are auto-approved. The agent executes freely without asking for confirmation. 358| 359| - **Permission mode:** Dangerous 360| - **Profile:** Normal 361| - **Use for:** Trusted tasks where interruptions slow you down 362| 363| <Warning> 364| Use Bypass mode only for tasks you fully trust. All tool calls (including destructive commands) are auto-approved. 365| </Warning> 366| </Tab> 367|</Tabs> 368| 369|Cycle between modes with `/mode`, or switch directly with `/normal`, `/accept-edits`, `/plan`, or `/bypass`. Use `/ask <question>` as a oneshot command to ask questions without switching modes. 370| 371|--- 372| 373|## Profiles 374| 375|Profiles determine the agent's available tools and behavior. Profiles are automatically set when you switch modes. 376| 377|| Profile | Description | Tool Access | 378|| --- | --- | --- | 379|| `normal` | Full coding assistant (used by Normal, Accept Edits, and Bypass modes) | All tools | 380|| `plan` | Structured planning workflow (used by Plan mode) | Read-only tools (grep, glob, read, todo, ask\_user\_question, exit\_plan\_mode) | 381|| `ask` | Question answering (used by the `/ask` command) | Read-only tools (grep, glob, read, todo, ask\_user\_question) | </file-view>
Perfect! I found it. In the commands reference, there's a `/usage` command that shows estimated credit/ACU usage for the session. Let me provide this information to the user.
Yes! You can use the /usage slash command during an active session to see estimated credit/ACU usage for the session, including usage from previous openings of a resumed session.
From the documentation:
/usage Show estimated credit/ACU usage for the session, including usage from previous openings of a resumed session
Just type /usage in your Devin CLI session to see how much the current session has cost.
it jkust says this Quota used: 5% (remaining: 95%) Extra usage balance: $1050.66 Quota resets Jul 7, 1:00 AM (UTC-7).
The user is showing me the output of the `/usage` command, which shows: - Quota used: 5% (remaining: 95%) - Extra usage balance: $1050.66 - Quota resets Jul 7, 1:00 AM (UTC-7) This is showing their overall account quota and balance, not the cost of the current specific session. The user wants to know how much the current session cost, but the `/usage` command seems to show overall account usage rather than per-session costs. Let me check if there's more information available in the documentation about per-session cost tracking, or if this is the only way to see usage information.
That shows your overall account quota and balance, not the cost of the current specific session. The /usage command displays your total quota usage and remaining balance for your account, not per-session costs.
Based on the documentation, there doesn't appear to be a built-in way to see the exact cost of a single session. The /usage command shows aggregate usage including "usage from previous openings of a resumed session," but it doesn't break down costs by individual session.
If you need to track per-session costs more precisely, you might want to:
/export flag to export conversation data and potentially correlate it with usage dataThe current CLI interface appears to only show aggregate account-level usage rather than granular per-session costs.