From 265d66b546c5a5a233cae18957a18774a22bcd52 Mon Sep 17 00:00:00 2001 From: Derek Misler Date: Fri, 23 Jan 2026 19:31:57 -0500 Subject: [PATCH 1/3] deleting things --- cmd/root/new.go | 6 ------ cmd/root/push.go | 7 +------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/cmd/root/new.go b/cmd/root/new.go index 6716e82ba..14fa4abcc 100644 --- a/cmd/root/new.go +++ b/cmd/root/new.go @@ -34,7 +34,6 @@ func newNewCmd() *cobra.Command { } cmd.PersistentFlags().StringVar(&flags.modelParam, "model", "", "Model to use, optionally as provider/model where provider is one of: anthropic, openai, google, dmr. If omitted, provider is auto-selected based on available credentials or gateway") - cmd.PersistentFlags().IntVar(&flags.maxIterationsParam, "max-iterations", 0, "Maximum number of agentic loop iterations to prevent infinite loops (default: 20 for DMR, unlimited for other providers)") addRuntimeConfigFlags(cmd, &flags.runConfig) return cmd @@ -61,11 +60,6 @@ func (f *newFlags) runNewCommand(cmd *cobra.Command, args []string) error { session.WithMaxIterations(f.maxIterationsParam), session.WithToolsApproved(true), } - if len(args) > 0 { - arg := strings.Join(args, " ") - sessOpts = append(sessOpts, session.WithUserMessage(arg)) - appOpts = append(appOpts, app.WithFirstMessage(arg)) - } sess := session.New(sessOpts...) diff --git a/cmd/root/push.go b/cmd/root/push.go index c3e7f22fe..8a4ffbac6 100644 --- a/cmd/root/push.go +++ b/cmd/root/push.go @@ -18,8 +18,6 @@ func newPushCmd() *cobra.Command { return &cobra.Command{ Use: "push ", Short: "Push an agent to an OCI registry", - Long: "Push an agent configuration file to an OCI registry", - GroupID: "core", Args: cobra.ExactArgs(2), RunE: runPushCommand, } @@ -38,10 +36,7 @@ func runPushCommand(cmd *cobra.Command, args []string) error { return err } - agentSource, err := config.Resolve(agentFilename) - if err != nil { - return fmt.Errorf("resolving agent file: %w", err) - } + agentSource := config.Resolve(agentFilename) _, err = oci.PackageFileAsOCIToStore(ctx, agentSource, tag, store) if err != nil { From da25f92ffaa5826d33e9f95290848694c327c317 Mon Sep 17 00:00:00 2001 From: Derek Misler Date: Fri, 23 Jan 2026 22:58:16 -0500 Subject: [PATCH 2/3] Revert "deleting things" This reverts commit 265d66b546c5a5a233cae18957a18774a22bcd52. --- cmd/root/new.go | 6 ++++++ cmd/root/push.go | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/root/new.go b/cmd/root/new.go index 14fa4abcc..6716e82ba 100644 --- a/cmd/root/new.go +++ b/cmd/root/new.go @@ -34,6 +34,7 @@ func newNewCmd() *cobra.Command { } cmd.PersistentFlags().StringVar(&flags.modelParam, "model", "", "Model to use, optionally as provider/model where provider is one of: anthropic, openai, google, dmr. If omitted, provider is auto-selected based on available credentials or gateway") + cmd.PersistentFlags().IntVar(&flags.maxIterationsParam, "max-iterations", 0, "Maximum number of agentic loop iterations to prevent infinite loops (default: 20 for DMR, unlimited for other providers)") addRuntimeConfigFlags(cmd, &flags.runConfig) return cmd @@ -60,6 +61,11 @@ func (f *newFlags) runNewCommand(cmd *cobra.Command, args []string) error { session.WithMaxIterations(f.maxIterationsParam), session.WithToolsApproved(true), } + if len(args) > 0 { + arg := strings.Join(args, " ") + sessOpts = append(sessOpts, session.WithUserMessage(arg)) + appOpts = append(appOpts, app.WithFirstMessage(arg)) + } sess := session.New(sessOpts...) diff --git a/cmd/root/push.go b/cmd/root/push.go index 8a4ffbac6..c3e7f22fe 100644 --- a/cmd/root/push.go +++ b/cmd/root/push.go @@ -18,6 +18,8 @@ func newPushCmd() *cobra.Command { return &cobra.Command{ Use: "push ", Short: "Push an agent to an OCI registry", + Long: "Push an agent configuration file to an OCI registry", + GroupID: "core", Args: cobra.ExactArgs(2), RunE: runPushCommand, } @@ -36,7 +38,10 @@ func runPushCommand(cmd *cobra.Command, args []string) error { return err } - agentSource := config.Resolve(agentFilename) + agentSource, err := config.Resolve(agentFilename) + if err != nil { + return fmt.Errorf("resolving agent file: %w", err) + } _, err = oci.PackageFileAsOCIToStore(ctx, agentSource, tag, store) if err != nil { From afd43fc92867f21456400538940f18c238436ff2 Mon Sep 17 00:00:00 2001 From: Derek Misler Date: Fri, 23 Jan 2026 23:02:41 -0500 Subject: [PATCH 3/3] fix: correct memory database cache path --- .github/workflows/agents/pr-review-feedback.yaml | 2 +- .github/workflows/agents/pr-review.yaml | 2 +- .github/workflows/pr-review.yml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/agents/pr-review-feedback.yaml b/.github/workflows/agents/pr-review-feedback.yaml index b1efc27f4..7ffa63cdb 100644 --- a/.github/workflows/agents/pr-review-feedback.yaml +++ b/.github/workflows/agents/pr-review-feedback.yaml @@ -18,7 +18,7 @@ agents: toolsets: - type: memory - path: .github/pr-review-memory.db + path: pr-review-memory.db - type: shell permissions: diff --git a/.github/workflows/agents/pr-review.yaml b/.github/workflows/agents/pr-review.yaml index 7473d39a9..f8540d6c3 100644 --- a/.github/workflows/agents/pr-review.yaml +++ b/.github/workflows/agents/pr-review.yaml @@ -76,7 +76,7 @@ agents: tools: [read_file, read_multiple_files, list_directory, directory_tree] - type: shell - type: memory - path: .github/pr-review-memory.db + path: pr-review-memory.db drafter: model: sonnet diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index 93e2cd195..93964e572 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -55,7 +55,7 @@ jobs: if: steps.check.outputs.is_agent_comment == 'true' uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 with: - path: .github/pr-review-memory.db + path: .github/workflows/agents/pr-review-memory.db key: pr-review-memory-${{ github.repository }} restore-keys: | pr-review-memory-${{ github.repository }} @@ -89,7 +89,7 @@ jobs: if: steps.check.outputs.is_agent_comment == 'true' uses: actions/cache/save@v4 with: - path: .github/pr-review-memory.db + path: .github/workflows/agents/pr-review-memory.db key: pr-review-memory-${{ github.repository }} # ========================================================================== @@ -131,7 +131,7 @@ jobs: - name: Restore reviewer memory database uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 with: - path: .github/pr-review-memory.db + path: .github/workflows/agents/pr-review-memory.db key: pr-review-memory-${{ github.repository }} restore-keys: | pr-review-memory-${{ github.repository }} @@ -203,7 +203,7 @@ jobs: if: always() uses: actions/cache/save@v4 with: - path: .github/pr-review-memory.db + path: .github/workflows/agents/pr-review-memory.db key: pr-review-memory-${{ github.repository }} - name: Add completion reaction