Skip to content

Edge Cases

Most Centaur tasks follow the short export, review, apply, and undo loop. These are the less common cases that are most likely to be surprising.

Centaur counts apparent Search/Replace blocks. If the response ends before the final >>>>>>> REPLACE, it rejects the complete payload and writes nothing.

Wait for the model to finish, copy the complete response again, and run a dry run first:

Terminal window
centaur --dry-run --clipboard

Bad (streaming ended early):

File: src/example.rs
<<<<<<< SEARCH
fn old() {}
=======
fn new() {

Centaur rejects this as malformed.

Good (complete block):

File: src/example.rs
<<<<<<< SEARCH
fn old() {}
=======
fn new() {}
>>>>>>> REPLACE

The model adds Markdown or explanations around the patch

Section titled “The model adds Markdown or explanations around the patch”

Complete blocks can still be recognized inside a Markdown fence and alongside accompanying explanations. File: and Path: labels are both accepted, including mixed capitalization.

When the task is informational or asks an architectural question without requesting code changes, the model responds in plain text or Markdown without patch blocks. An exact NO_CHANGES response must contain only NO_CHANGES and whitespace.

Centaur plans those blocks in response order. A later block sees the result of the earlier block, not the original file.

If any block fails, the whole transaction is rejected. No earlier block is written by itself.

If the SEARCH text appears multiple times in the file, Centaur refuses to guess which one you meant.

Bad (Ambiguous):

File: src/example.rs
<<<<<<< SEARCH
let x = 1;
=======
let x = 2;
>>>>>>> REPLACE

If let x = 1; appears twice in src/example.rs, this fails.

Good (Unambiguous):

File: src/example.rs
<<<<<<< SEARCH
fn initialize() {
let x = 1;
=======
fn initialize() {
let x = 2;
>>>>>>> REPLACE

Centaur tries an exact match first. It can then normalize line endings and tolerate indentation differences when the same line sequence appears only once.

Existing CRLF line endings and a UTF-8 byte order mark are preserved. Use a dry run to inspect the resulting diff instead of relying on the fallback silently.

An empty Search section creates a new file and any missing parent directories. Put the complete new file in one block rather than sending several empty-Search blocks for the same path.

Undo removes a file that the session created and restores existing files that the same session changed.

A valid-looking path crosses the workspace boundary

Section titled “A valid-looking path crosses the workspace boundary”

Absolute paths, .. traversal, and symlinks that resolve outside the active workspace are rejected. This also applies when only a parent directory is a symlink.

Move the file into the workspace or edit it through a separate Centaur workspace. Do not weaken the path check.

Some files appear in the tree but not in the context

Section titled “Some files appear in the tree but not in the context”

Centaur reports files it intentionally skipped:

  • Common lockfiles are omitted to preserve the token budget.
  • Files larger than 2 MB are omitted unless --force is used.
  • Binary or non-UTF-8 files are listed but not decoded as text.

For CSV and JSON Lines files, Centaur includes the first 50 lines and adds a truncation marker. --force lifts the 2 MB limit; it does not turn binary data into text or include skipped lockfiles.

Changed mode includes modified files, renamed destinations, and files inside new untracked directories. Staged mode includes only the index. Both modes add common project manifests when present.

Deleted paths are omitted because they have no remaining content. Filenames containing spaces are supported. If the Git selection is not the context you need, use explicit paths with a full export.

Centaur limits the number and size of attachments in one message. When it creates batch_01, batch_02, and later directories, upload them in numeric order and wait for the model to acknowledge each batch.

For MCP, get_context returns one numbered part at a time. The client must request the next part until the response says it is final.

A file changed after Centaur applied the patch

Section titled “A file changed after Centaur applied the patch”

Undo checks every target before restoring any of them. If one target no longer matches the applied state, Centaur refuses the whole undo instead of partially restoring the other files.

Inspect centaur history, preserve the later work, and recover from the named snapshot manually if needed.

The latest session belongs to another project

Section titled “The latest session belongs to another project”

History is scoped to the canonical workspace. Running centaur undo in one repository cannot restore files from another repository, even though the records share the same Centaur home directory.

Run the command from the original workspace or pass a session ID shown by that workspace’s centaur history.

Remote HTTP binds only to loopback and requires a bearer token of at least 32 characters. Request bodies are limited to 8 MB.

Browser origins are denied unless they exactly match a repeated --allow-origin <origin> value. Multiple Origin headers are rejected. Terminate public HTTPS and OAuth at the tunnel or reverse proxy, not in Centaur.

Website privacy