Skip to content

Expose outgoing-request-decorator as a defcustom#398

Merged
xenodium merged 1 commit intoxenodium:mainfrom
emil-e:expose-outgoing-request-decorator
Mar 14, 2026
Merged

Expose outgoing-request-decorator as a defcustom#398
xenodium merged 1 commit intoxenodium:mainfrom
emil-e:expose-outgoing-request-decorator

Conversation

@emil-e
Copy link
Contributor

@emil-e emil-e commented Mar 11, 2026

Adds agent-shell-outgoing-request-decorator, allowing users to set a global request decorator used for all outgoing requests. This can be used for injecting system prompts and other implementation specific things into new sessions. Or any other request for that matter.

Fixes #379

Checklist

  • I agree to communicate (PR description and comments) with the author myself (not AI-generated).
  • I've reviewed all code in PR myself and will vouch for its quality.
  • I've read and followed the Contributing guidelines.
  • I've filed a feature request/discussion for a new feature.
  • I've added tests where applicable.
  • I've updated documentation where necessary.
  • I've run M-x checkdoc and M-x byte-compile-file.

Add `agent-shell-outgoing-request-decorator` so users can transform
outgoing ACP requests without advising internal functions.  This is
useful for injecting agent-specific metadata (e.g. system prompt
extensions) into requests from interactive `M-x agent-shell` sessions.

The keyword argument to `agent-shell-start` takes precedence over the
defcustom for programmatic callers.

Ref: xenodium#379
@xenodium xenodium merged commit fbb8225 into xenodium:main Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to append to the system prompt of agents

2 participants