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,1048576): 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.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.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;"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.protect_size(bytes,1e8): overwriting a larger object is a level-3 action.gptr.plan_handoff(logical,TRUE): hand a plan fromplanmode to the next call.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,1e8): objects up to this size are captured by reference before a change, even when the change was not predicted.gptr.undo_max_bytes(bytes,1e9): object images held in memory per session.gptr.undo_spill_max(bytes,2e9): the largest object image written to disk.gptr.undo_turns(integer,20): object 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 per-file and total size of tracked project files.gptr.checkpoint_capture_max(bytes,5e7): a larger changed file gets no stored copy.gptr.checkpoint_scan_budget(seconds,0.25): above this walk time the project is scanned once per turn.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.GPTR_WORKER,GPTR_SUBAGENT_DEPTHandGPTR_MCP_TOKEN: set by gptr in its own child processes only.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 gptr then replays recorded document blocks only and caps each child-process pool 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.