gptr reads each option with getOption() at the moment it needs it, so options set with
options() take effect at the next call. Options marked settings have no default of their
own: when unset, the value comes from the settings layers written by gptr_config()
(session, project .gptr/settings.json, user settings). The safety options (gptr.ui,
gptr.interactive, the guards, gptr.noninteractive_ask, gptr.protect_size, gptr.mode
and gptr.unsafe_no_permissions) are copied when a run starts, so code that the model runs
cannot change them for that run.
Interaction and output
gptr.quiet(logical,FALSE): silence notices and progress messages.gptr.interactive(logical orNULL,NULL): force the decision whether a person is present to answer questions and permission prompts. This does not supply a UI or an answer in an unattended process.gptr.verbose(integer orNULL,NULL): 0 silent, 1 progress on stderr (stdout in an ordinary IRkernel cell), 2 the streamed console, 3 debugging;NULLchooses by context (0 in knitr and testthat, 1 under Rscript, 2 at the console).gptr.ui(character, UI spec orNULL,NULL): the user-interface backend;NULLmeans the console when a person is present, else none.gptr.history(logical,TRUE): add console inputs to the R history.gptr.deprecations(character,"warn"):"warn"or"error"for deprecated calls.
Settings, models and replay
gptr.model,gptr.mode,gptr.preset,gptr.system1,gptr.small_model(character orNULL, settings): the option layer of the settings of the same names.gptr.project_root(character orNULL,NULL): the project root; also the environment variableGPTR_PROJECT_ROOT.gptr.replay(character orNULL, settings,"auto"): how recorded document blocks are used:"auto","replay","live"or"record"; thereplayargument ofpeter()wins.gptr.record(character orNULL, settings,"ask"): whether gptr may write into documents:"auto","ask"or"off".gptr.interpolate(logical,TRUE):{identifier}interpolation in literal prompts.
Sessions, turns and values
gptr.max_turns(integer,50): turns per programmatic run.gptr.max_turns_console(integer,200): turns per console prompt.gptr.max_nested_calls(integer,20):peter()calls per evaluation of model code.gptr.value_copy_max(bytes,2097152): designated result values below this size are copied; larger ones are kept by name.gptr.values_max_bytes(bytes,67108864): value copies held per session.gptr.background_tools(character,"idle"):"idle"or"wait"for experimental background sessions.gptr.out_keep(integer,20): results kept per session forpeter$out().gptr.spill_days(number,7): age in days after which spill files are pruned.
Concurrency and sub-agents
gptr.max_active(integer,8): concurrent HTTP transfers.gptr.subagents.max_active(integer,8): concurrent inline sub-agents; the default ofgptr_parallel()'smax_active.gptr.subagents.max_cli(integer,4): concurrent command-line sub-agents.gptr.subagents.max_workers(integer orNULL,NULL): worker processes;NULLmeansmin(4, cores - 1). UnderR CMD checkevery pool of child processes is capped at 2.gptr.subagents.max_tasks(integer,8): children per team or fan-out started by model code.gptr.subagents.max_depth(integer,1): nesting depth of child sessions (at most 2).gptr.child_text_max(bytes,51200): text returned per child task.
Transport and processes
gptr.connect_timeout(seconds,20),gptr.first_byte_timeout(seconds,120) andgptr.idle_timeout(seconds,90): network timeouts. High-effort reasoning on OpenAI or Google may needoptions(gptr.idle_timeout = 300).gptr.max_retry_delay(seconds,60): a longerretry-afterfrom a provider fails at once.gptr.max_attempts(integer,4): transport attempts per request.gptr.wire_log(logical or path,FALSE): write a redacted log of every request and response inside the workspace or the session temporary directory.gptr.supervise(logical orNULL,NULL): supervise child processes;NULLmeans yes except underR CMD check.gptr.stdin_timeout(seconds,60): time allowed to write pending input to a child.gptr.cli_path(named list orNULL,NULL): explicit paths of theclaudeandcodexcommand-line tools.gptr.cli_turn_timeout(seconds,3600): wall-clock time per command-line turn.
Evaluation and tools
gptr.r_timeout(seconds,3600): time limit of thertool when nobody is present. It stops R code that is computing; in a non-interactive R it does not endSys.sleep()orsystem(), whichpeter$sh(timeout = )does for a command.gptr.r_output_tokens(integer,4000): estimated tokens of onerresult.gptr.r_max_images(integer,3): plot images attached to onerresult.gptr.helper_output_tokens(integer,1500): printed size ofpeter$helper results.gptr.read_max_tokens(integer,12000): size cap of thereadtool.gptr.plot_width,gptr.plot_height,gptr.plot_res(integers,768,512,120): plots sent to the model.
Permissions
gptr.noninteractive_ask(character,"stop"): what a permission question does when nobody can answer:"stop"ends the run with statusblockedand agptr_error_permissioncondition (gptr_error_noninteractivewhen theasktool has no one to answer);"deny"returns a denial to the model.gptr.critical_guard(logical,TRUE): level-4 actions ask even inautomode.gptr.secret_guard(logical,TRUE): reads of registered secrets ask even inautomode; gptr_security lists the reads.gptr.protect_size(bytes,1e8): overwriting a larger object is a level-3 action. Each version of an object is sized once and the size reused: after code you run between requests (at R's prompt once a request ran, a console!line, a notebook cell, a knitr chunk) the next check sizes what it overwrites again; an edit in place made otherwise, by a callback say, counts once the object is rebound or Peter's code changes it. An object with more than 12.5 million strings is sized from a sample of them: an estimate, at or above its true size on average.gptr.plan_handoff(logical,TRUE): hand the plan aplanrun proposes, once, to the next top-levelpeter()call from the same environment, within an hour and in another mode; anotherpeter()call first, or a next call inside a loop or a run, discards it.gptr.unsafe_no_permissions(logical,FALSE): turns the permission gate off entirely; honored only when set outside a run, for sandboxed continuous integration.
Context, caching and compaction
gptr.compact_at(tokens orNULL,200000): the compaction soft cap;NULLdisables the cap.gptr.compact_cold_min(tokens,100000): the size above which a cold cache compacts.gptr.cache_ttl(character,"gap"): prompt-cache lifetime policy:"gap","5m"or"1h".gptr.cache_gap(seconds,240): a pause between requests longer than this switches the cache lifetime to one hour.gptr.check_prefix(character,"event"): what a broken cache prefix does:"event","warn"or"error".gptr.skills_budget(integer,1500) andgptr.mcp_budget(integer,1500): tokens of the skill and MCP tool catalogs.
Checkpoints and undo
gptr.checkpoint(character,"on"):"on","files"or"off".gptr.undo.capture_max(bytes, settings,1e8), the option layer of the settingundo.capture_max(seegptr_rewind()): every object up to this size is kept by reference before a call that runs R code.gptr.undo.memory(bytes, settings,1e9), the option layer ofundo.memory: an object the code is predicted to change is kept up to this size; the images of a session hold at most this many bytes in memory.gptr.undo.disk(bytes, settings,2e9), the option layer ofundo.disk: bytes of images spilled to disk per session.gptr.undo.turns(integer, settings,20), the option layer ofundo.turns: images older than this many turns are dropped.gptr.checkpoint_disk_bytes(bytes,2e9),gptr.checkpoint_days(days,30) andgptr.checkpoint_turns(integer,100): retention of the checkpoint store.gptr.checkpoint_track_file_max(bytes,1e6) andgptr.checkpoint_track_total(bytes,1e8): the largest file the first scan stores, and what one scan stores in all.gptr.checkpoint_capture_max(bytes,5e7): a larger changed file gets no stored copy.gptr.checkpoint_scan_budget(seconds,0.25): project scan time per request; past it, its calls back up the files they name and one scan at its end records the rest, edits you made to the project meanwhile included. An incomplete scan spends the budget at once.gptr.checkpoint_scan_timeout(seconds,2): the longest an automatic file scan runs. Scans inspect at most 2,000 entries and back up at most 256 files within the byte limits above. Incomplete scans are reported; unvisited files have no automatic undo coverage. Predicted write targets are backed up separately.gptr.checkpoint_rng(logical,TRUE): report changes of the random-number state in the rewind report (gptr never changes your random seed).gptr.checkpoint_close_devices(logical,FALSE): close graphics devices opened by an undone turn.
Secrets
gptr.redact_min_chars(integer,8): the shortest secret value that is redacted.gptr.redact_patterns(logical,TRUE): also redact text that looks like a key; known values are always redacted.gptr.stream_hold_max(integer,4096): characters held back while redacting a stream.gptr.env_export(logical,TRUE): the default ofgptr_env(set_env =).gptr.prompt_secrets(character,"redact"): secret-looking text in prompts:"redact"or"ask".
System 1
gptr.s1_max_active(integer,8): concurrent System 1 requests.gptr.s1_rounds(integer,3): retry rounds for failed elements.gptr.s1_state_max(integer,2000): characters of a session's state sent to System 1.gptr.s1_max_elements(integer,10000): elements per System 1 call.
Documents, MCP and artifacts
gptr.doc_output_lines(integer,12): output lines recorded per execution.gptr.doc_source_frames(logical,TRUE): let gptr find the calling line of a script run withsource().gptr.mcp_timeout(seconds,60) andgptr.mcp_probe_timeout(seconds,5): MCP request and protocol-probe time limits.gptr.mcp_debug(logical,FALSE): keep redacted MCP server logs in the user cache.gptr.artifact_max_bytes(bytes,5e8): the largest artifact data snapshot.
Environment variables
GPTR_REPLAY: the replay mode below thegptr.replayoption;GPTR_REPLAY=replayproves that a script makes no model calls.GPTR_PROJECT_ROOT: overrides the project root, likegptr.project_root.ANTHROPIC_API_KEY,OPENAI_API_KEY,GEMINI_API_KEY,TYPESAFE_API_KEYand the other provider keys: read at the first use of a provider; seegptr_env()for.envfiles.R_USER_CONFIG_DIR,XDG_CONFIG_HOMEandHOME(on Windows alsoAPPDATAandUSERPROFILE): they placetools::R_user_dir("gptr", "config"), which holds gptr's settings, permission rules, trust decisions and credentials, and your home directory. Setting or unsetting one of them from model code changes gptr's own configuration, as does a variable a registered provider reads (its key or base-URL variable, such asAWS_REGIONfor Bedrock, or a variable gptr keeps for theclaudeorcodexcommand-line tool: its login, its folder or the path of Git Bash, such asCODEX_HOME), aGPTR_*or*_BASE_URLvariable,R_ENVIRON_USER,R_PROFILE_USER,R_ENVIRONorR_PROFILE, whatever the letter case. Every mode butyoloasks you first,autoincluded, beforeSys.setenv(),Sys.unsetenv(),withr::local_envvar()orwithr::with_envvar()of such a name or of a name the classifier cannot read, beforereadRenviron()anddotenv::load_dot_env(), and before anos.environwrite inpeter$py()orpeter$knit("python", code)code that names one in a string or an upper-case word or whose name is not a plain string literal; gptr_security lists what it does not read.GPTR_WORKER,GPTR_SUBAGENT_DEPTH,GPTR_ARTIFACT_PORTS,GPTR_SHELL_CMDand the tree markersGPTR_PROC_<id>: set by gptr in its own child processes only.GPTR_MCP_TOKEN: the variable through which the Codex snippet ofgptr_mcp_serve()passes the server's bearer token to the client; gptr itself never reads it.GPTR_LIVE_TESTS:"true"enables the package's live tests; not used at run time._R_CHECK_PACKAGE_NAME_: set byR CMD check; outside the package's own tests a model call without its ownreplayargument then runs in replay mode (recorded answers or an offline provider, never a model server), and each child-process pool is capped at two.
See also
gptr_config() for settings stored in files, gptr_security and gptr_egress;
vignette("configuration", package = "gptr") for scope, precedence and grouped examples.