In 2026, GraalVM developers can run Atlas headless in CI pipelines to automate tasks like updating reflect-config.json entries and ensuring native-image compatibility. Atlas integrates directly with your Maven project, allowing you to invoke mvn -Pnative test and apply Spotless formatting, all while receiving machine-readable JSON output for downstream pipeline steps.
How to Invoke Atlas Headless for GraalVM Native-Image Builds in CI
In 2026, running Atlas headless in a GraalVM CI pipeline is straightforward, designed for non-interactive execution. The atlas run command, when invoked with a single prompt, streams events to stdout and exits upon session idle, making it ideal for automated native-image build tasks.
To initiate an Atlas session non-interactively within a GraalVM CI environment, developers use the `atlas run` command. This command's default behavior is to process a single prompt, stream all session events to standard output, and then terminate once the session becomes idle. This design is crucial for CI/CD pipelines where human interaction is absent. For GraalVM projects, this means Atlas can be tasked with operations such as analyzing `pom.xml` configurations that apply the `native-maven-plugin`, or identifying missing `reflect-config.json` entries that only manifest during native binary execution, not on the JVM. The `--command` flag allows direct execution of slash commands, while `--continue` or `--session` enable resuming or forking prior sessions, which is invaluable for multi-stage GraalVM build pipelines where an earlier Atlas run might have generated initial metadata.
How to Get Machine-Readable Output from Atlas for GraalVM Pipelines
For GraalVM CI pipelines requiring structured data, Atlas offers a `--format json` option, ensuring that all streamed events are machine-readable. This feature, introduced in a recent 2026 update, allows subsequent pipeline steps to parse Atlas's output directly, rather than relying on human-readable prose.
When integrating Atlas into a GraalVM CI workflow, obtaining machine-readable output is essential for automated processing. By passing the `--format json` argument to `atlas run`, all events streamed to stdout are formatted as raw JSON. This enables downstream pipeline steps, written in any language, to reliably parse Atlas's progress, tool calls, and generated artifacts. For instance, after Atlas identifies and proposes additions to `reflect-config.json` for a GraalVM native-image build, a subsequent script can parse this JSON output to verify the changes or trigger further actions. This ensures that the CI system can programmatically react to Atlas's findings, such as confirming that Atlas has successfully run `mvn -Pnative test` and applied `Spotless` formatting to the generated metadata.
Managing Permissions and Safety in Headless GraalVM Runs
Atlas ensures safety in headless GraalVM CI runs by enforcing permission-gated tool calls, a critical feature for automated environments. Every Atlas tool call, including those for `bash`, `read`, `edit`, or `todowrite`, is checked against pre-configured allow, ask, or deny rules before execution, preventing unintended modifications in 2026.
In a headless GraalVM CI environment, Atlas prioritizes safety through its robust permission system. Since there is no interactive user to respond to 'ask' prompts, all necessary tools must be pre-approved via the permission configuration. This includes critical operations like allowing Atlas to `edit` `reflect-config.json` or to execute `bash` commands such as `mvn -Pnative test`. Before any modifications are made, Atlas drafts a plan in a read-only plan agent and seeks approval before switching to a build agent. Furthermore, Atlas computes a unified diff for every file edit, such as changes to `META-INF/native-image` metadata, and surfaces it for approval before writing. For headless runs, this approval must be configured beforehand. Atlas also snapshots file changes as git patches, allowing edits to be easily diffed and rolled back, providing an additional layer of safety for GraalVM native-image projects.
Automating GraalVM Reachability Metadata with Atlas in CI
Atlas significantly streamlines the management of GraalVM reachability metadata, a common challenge in native-image builds. By allowing Atlas to read existing metadata under `META-INF/native-image` and trace reflective call sites, developers in 2026 can automate the generation and refinement of `reflect-config.json` entries.
One of the most complex aspects of GraalVM native-image builds is correctly declaring reflection, resources, and dynamic proxies ahead of time. Atlas simplifies this by integrating directly into the GraalVM toolchain. It can be configured to run in a JVM project where the `pom.xml` applies the `native-maven-plugin`. Atlas can then read your existing reachability metadata under `META-INF/native-image` and identify reflective call sites. When a class only fails in the native binary, Atlas can be instructed to add the missing `reflect-config.json` entry. A powerful feature is Atlas's ability to run the GraalVM tracing agent, diff the generated metadata against existing files, and commit only the entries your code actually needs. This process can be further refined by having Atlas run `mvn -Pnative test` behind a permission prompt to validate the changes, and then apply `Spotless` to format the resulting diff, ensuring code quality and consistency within your GraalVM project.
Step by step
- 01Configure `pom.xml` for Native-Image: Ensure your GraalVM project's `pom.xml` applies the `native-maven-plugin` to enable native-image builds.
- 02Pre-approve Atlas Tools: Configure Atlas permissions to `allow` tools like `bash`, `read`, `edit`, and `todowrite` for headless execution, especially for commands like `mvn -Pnative test` and `Spotless`.
- 03Invoke Atlas for Metadata Tracing: Run `atlas run --format json --command "trace-graalvm-metadata"` to have Atlas execute the GraalVM tracing agent, identify missing `reflect-config.json` entries, and stream machine-readable output.
- 04Validate with Native Tests: Instruct Atlas to run `atlas run --command "bash mvn -Pnative test"` to validate the generated metadata against your GraalVM native-image tests, ensuring runtime compatibility.
- 05Apply Formatting with Spotless: After metadata updates, have Atlas apply code formatting by running `atlas run --command "bash mvn spotless:apply"` to maintain consistency in your `META-INF/native-image` files.
- 06Review and Commit Changes: Atlas will compute a unified diff for any file edits; configure your CI to automatically approve and commit these changes, or use `--fork` to review in a separate session.
- 07Set Model Explicitly: Ensure the `atlas run` command explicitly sets the model using `provider/model` form, for example, `--model "ollama/llama3"`, to avoid ambiguity in the headless environment.
Frequently asked questions
- How do I run Atlas non-interactively in a GraalVM CI pipeline?
- To run Atlas non-interactively in a GraalVM CI pipeline, use the `atlas run` command. Its default mode sends a single prompt, streams events to stdout, and exits when the session goes idle. For machine-readable output, include the `--format json` flag. Ensure all necessary tools, such as `bash` for `mvn -Pnative test`, are pre-approved in Atlas's permission configuration.
- Can Atlas help with `reflect-config.json` issues in GraalVM native images?
- Yes, Atlas is specifically designed to assist with `reflect-config.json` issues in GraalVM native-image builds. It can read your existing `META-INF/native-image` metadata, run the GraalVM tracing agent, identify missing reflective call sites that only fail in native binaries, and propose or add the correct entries to `reflect-config.json`. Atlas can then validate these changes by running `mvn -Pnative test`.
- How does Atlas ensure safety when modifying GraalVM project files in CI?
- Atlas ensures safety by implementing permission-gated tool calls and a rigorous review process. In headless CI, all tools like `edit` or `bash` (for `Spotless` or `mvn -Pnative test`) must be pre-approved. Atlas drafts plans in a read-only agent, computes a unified diff for every file edit (e.g., to `pom.xml` or `reflect-config.json`), and snapshots changes as git patches, allowing for easy diffing and rollback.
- What GraalVM-specific commands can Atlas execute in CI?
- Atlas can execute any GraalVM-specific commands via its `bash` tool, provided it's pre-approved. This includes running `mvn -Pnative test` to validate native-image builds, applying code formatting with `mvn spotless:apply`, and interacting with `Maven` for dependency management. Atlas can also read and write to GraalVM-specific files like `pom.xml` and `META-INF/native-image/reflect-config.json`.
- How can I resume a failed Atlas session in a GraalVM CI pipeline?
- You can resume or fork a prior Atlas session in a GraalVM CI pipeline using the `--continue`, `--session`, or `--fork` flags with `atlas run`. This allows a pipeline step to pick up where a previous run left off, building on earlier work or replaying specific actions, which is useful for iterative debugging of complex GraalVM native-image build issues.
- Does Atlas support local embedding models for GraalVM code indexing?
- Yes, Atlas supports building its code index with local Ollama embeddings. This is particularly beneficial for GraalVM projects, as it keeps your proprietary code off third-party servers, enhancing security and compliance. Atlas indexes code by AST declarations using tree-sitter, providing precise context for GraalVM-specific code structures.
- How does Atlas integrate with `Maven` for GraalVM projects?
- Atlas integrates direct with `Maven` for GraalVM projects. It can read your `pom.xml` to understand project structure and dependencies, especially when the `native-maven-plugin` is applied. Atlas can then use the `bash` tool to invoke `Maven` commands like `mvn -Pnative test` or `mvn spotless:apply`, directly participating in the GraalVM build and quality assurance workflow.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Run Atlas Headless in CI with Atlas (2026 Workflow)
How to run Atlas headless in CI in 2026: atlas run sends one prompt and exits when the session goes idle, with --format json, --command, and --continue for pipeline steps.
Migrate a Deprecated API Across Every Callsite in GraalVM with Atlas in 2026
Streamline deprecated API migrations in GraalVM projects using Atlas. Discover how Atlas enumerates all callsites, applies context-aware patches, and validates changes with 'mvn -Pnative test' for robust native-image
Automate GitHub issue and pull request triage in GraalVM with Atlas in 2026
In 2026, GraalVM developers can automate GitHub issue and pull request triage using Atlas. Configure Atlas in a GitHub workflow to safely respond to events, ensuring only trusted users trigger actions and maintaining
Rename a symbol across the repo in GraalVM with Atlas in 2026
Streamline symbol renames in GraalVM projects using Atlas. Leverage LSP for precise refactoring, catch all occurrences with grep, and ensure safety with diff approvals for native-image builds.
Self-review your working diff before committing in GraalVM with Atlas in 2026
Catch your own mistakes in GraalVM code before committing. Atlas helps developers in 2026 self-review uncommitted diffs, ensuring `mvn -Pnative test` and `Spotless` pass.
Review a Pull Request in GraalVM with Atlas in 2026
In 2026, GraalVM developers use Atlas to review pull requests, catching subtle bugs by examining full file context and checking native-image configurations, ensuring robust native binaries.
Locate where a behavior is implemented in GraalVM with Atlas in 2026
Pinpoint GraalVM behavior implementation using Atlas. Leverage semantic search, grep, and LSP tools to find exact files and symbols in your native-image projects.
Audit a GraalVM Repo with Parallel Subagents in 2026
Sweep your GraalVM repository for specific problems without blowing your context window. Atlas launches parallel subagents to audit native-image builds, reflection, and resource configurations.