Prefer local reads for .svelte files to avoid ACP stdio failures related to additional newlines #204
Closed
rkboyce wants to merge 14 commits intozed-industries:mainfrom
Closed
Prefer local reads for .svelte files to avoid ACP stdio failures related to additional newlines #204rkboyce wants to merge 14 commits intozed-industries:mainfrom
rkboyce wants to merge 14 commits intozed-industries:mainfrom
Conversation
…cp and agent-shell, and change the client default to deny/limit.
Add filesystem sandboxing/approval for ACP read/write
allows a client to monitor token usage as a session progresses
…s models when called without args; with args it sets the model (and optional
reasoning effort) and confirms. /status and /approvals reply immediately and end the turn.
- Token usage now forwarded: TokenCount events emit a plain agent message like “Context usage: used …” so clients can show remaining context.
- Added helpers for status/approvals/model text and model arg parsing.
- Tests added for /status, /approvals, /model list/set; stub conversation updated to handle model overrides. cargo test --tests conversation passes
…mpletion instead of on every TokenCount event.
…-save-summary Feature/slash commands token count save summary
Testing/exploration 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This works around a transport issue seen when reading some .svelte files via ACP
fs/read_text_file. In the failing cases, raw Svelte content can leak outside the newline-delimited JSON-RPC envelope, causing parser failures and follow-on tool call errors. To keep patch flows stable, AcpFs now falls back to local filesystem reads for .svelte files while continuing to use ACP-backed reads for other file types.Expected behavior:
When Codex reads a .svelte file through ACP fs/read_text_file, the client should return the file contents as a valid JSON-RPC response, with the Svelte source contained inside the JSON string. The ACP stream should remain synchronized, and patching should continue normally.
Actual behavior:
The ACP stream becomes desynchronized while reading a .svelte file. See acp-codex-log-with-error.txt
In acp-codex-log-with-error.txt:22235, the parser reports this instead of a JSON-RPC object.:
failed to parse incoming message: expected value at line 1 column 12...
and the raw incoming payload starts with leaked Svelte markup such as
<thead class=\"bg-muted/20 text-xs text-muted-foreground uppercase\">